The second player joins in
Lore of the Ember is now played by two. The second player isn't just an extra: he is the Ardent, a champion of embers summoned by the lantern, with his own weapon, his own lives and his own score. He can join the game at any moment to help Alaric.
A second hero, not a second cursor
Two-player co-op is in place. It had been planned for a long time, but now it's done.
Player 2 plays the Ardent. Alaric keeps the lantern: it's the lantern that summons this champion of embers. The second player arriving and leaving doesn't happen in a menu but directly in game.
He has his own weapon, a staff that fires a volley of three orbs, one large then one medium then one small. It plays differently from Alaric's lantern, and that is deliberate: with two players you don't want the same thing twice on screen.
For now these are Chaos Engine sprites, which will be replaced once I find a designer ;)
Joining mid-game
So in short, the second player presses the fire button, and there he is. No selection screen, no going back to the menu, no game to restart. Someone walks into the room, picks up the joystick, and plays.
For that to work, the invitation has to be visible without being intrusive. The top banner, which I talked about in an earlier article, had been designed with this very moment in mind. It displays "PRESS FIRE" in the place player 2's hearts will occupy.
What joining costs
An invisible detail that took a fair bit of work: originally, pressing the button to join caused a hitch. The whole right half of the banner had to be redrawn all at once, mid-game, and it showed, I was getting slowdowns.
The solution I put in place is to prepare that half of the banner at game startup, while the screen is still black. It's genuinely drawn, but painted in the background colour, so it's invisible in single player. When the second player joins, I redraw nothing at all: I simply change the colours concerned. Player 2's banner appears at once, without the game slowing by a single frame.
The palette is only sixteen colours, but you can change it at will without touching a single pixel, and it costs almost nothing. Many of the game's effects rest on that.
And the camera, in all this
The real headache of co-op on a single screen is framing. Two players each heading their own way, and you have to choose who the camera follows.
So the camera follows whoever is moving forward, while keeping the other in frame, and it moves gradually rather than jumping when the situation changes.
📷 Capture to come: the banner in co-op, the two health and score areas side by side, while the scenery scrolls.
What comes next
Co-op works on both machines, STf as well as STe. What remains is to put it through long testing with two joysticks, over real sessions, because it's the kind of mechanic whose flaws only show up after a long play session.
To see where the game is at, see the homepage.
Leave a comment