A ride for two
Lore of the Ember isn't only played on foot. I have added two-player parallax handling to the engine, with enemies coming from every direction.
Leaving the village
Alaric goes from level to level on foot. For the game to be memorable it needs different kinds of gameplay, and a ride in the style of Shock Troopers (the motorbike level) struck me as an interesting thing to build.
The result is a side-on level: you're in the saddle, you move forward, you shoot, and the landscape streams past. The tone changes completely from the rest of the game. Where crossing the village is slow and tense, here everything is fast, shots come from everywhere, and there is no time to think. That contrast is exactly what I was after.
Two layers, two speeds
For a chase to give a sense of speed, sliding one image isn't enough. The different layers of the scenery have to move at different rates. The famous parallax.
So I cut the screen into two zones. At the top, the sky and mountainous scenery, drifting slowly. At the bottom, the ground, streaming past. Between the two, the cut-out silhouette of the dunes, drawn rather than computed, so you don't see a straight line between the two parallax layers.
The sky advances one pixel per frame, which is the finest possible step and therefore the softest. On a machine from 1989, computing that offset at display time costs far too much to hold the cadence. So I prepared sixteen versions of the sky, each shifted one pixel further than the last, and I simply display the right one. The work is done once, at load time, instead of being redone fifty times a second.
This kind of trade-off comes up constantly on this machine: pay once in memory to free up processor time.
Two in the saddle
The sequence is played by two. Two riders, two lines of fire, and the same route. It's the first place where I really felt the game gained from being shared: with one player it's a race, with two it's a collaboration, and you divide up the targets without saying a word.
The same thing on STf and on STe
The trap with parallax is that it holds up on the STe and collapses on the STf. I imposed the opposite rule on myself: one program, and the same smoothness on both sides. The STe leans on its graphics chip, the STf recomputes everything, and the player must not see a difference.
That is the part that took the longest, by far.
What comes next
The ride exists and is playable. It will become a level in its own right, with its own enemies and its own place in the story. For now it has mostly served to prove one thing: the game can change rhythm without changing engine.
The scenery is the Shock Troopers scenery, which I will redo with my designer.
To see where the game is at, see the homepage.
Leave a comment