The problem

Until now my whole game fitted in a single screen. A fixed arena, the hero moving inside it, and when he reaches the edge, he stops. That is fine for a prototype, but it's not a world. And I wanted a real space to explore: rooms, corners, a boss that gives chase, the plague settling in out of sight. None of that fits in a box the size of the screen.

So the goal of this step was easy to state: terrain bigger than the screen, and a camera that follows the player and keeps him centred, pixel by pixel, without stutter. And I still have The Chaos Engine in the back of my mind at all times, which is to say the bar for perfection is set fairly high.

A decision I kept putting off

Before getting there, I had to settle an old promise I had made to myself. Since the beginning of the project I kept saying that Lore of the Ember would be written entirely in assembly, with no shortcuts. It was a constraint I imposed to learn the machine inside out. Two years on, I know it.

The trouble is that with every new feature (camera, bigger world, organising the code into reusable blocks), I was spending an age hand-unrolling mechanics that add nothing to the game. So I let go of my aesthetic rule to focus on what matters. I keep assembly for the sensitive parts, the ones that have to be lightning fast on screen, and I hand the rest, the orchestration and the game state, to more comfortable tools.

What I want to say clearly: I have rewritten nothing that already worked. Sprite drawing, keyboard reading, the whole graphics core stays exactly as it was. What changes is only the glue around it, the code that decides what to do and when. And that code isn't in the critical path, it doesn't slow the game down.

The answer: one world, a window wandering over it

The idea fits in a single image. Instead of drawing exactly what you see, I prepare a world wider than the screen, and the screen only shows a window onto it. The STe can slide that window on its own, without the processor having to redraw the scenery on every frame. That is what is called hardware scroll, and it's precisely what makes scrolling so soft on this machine.

The camera then becomes a small, quiet piece of arithmetic: I aim to keep the hero centred, and I clamp the window when it touches the edges of the world so it never shows empty space. The hero wanders, the window follows, the scenery scrolls pixel by pixel.

While reorganising all this, I took the opportunity to sort the code into two families: a generic engine on one side, reusable for a future STe game, and everything that belongs specifically to Lore of the Ember on the other. A week of meticulous tidying, but now every new piece finds its place without hesitation.

A plague that sleeps when your back is turned

A bigger world raises a new question. If the player lets the plague settle in one corner, then wanders off to the other end, should that invisible plague keep being simulated? Constantly recomputing corruption nobody can see is wasted work.

So I put the plague to "sleep" off-screen. As long as an area isn't on screen, its corruption freezes: its state is preserved, but it stops spreading. As soon as the player comes back, it picks up exactly where it left off.

And the best part is that it fits the fiction perfectly. The plague has no awareness, it doesn't crawl towards the player. It spreads where it is, locally, without intent. That it pauses when you move away reinforces that idea. An optimisation that serves the story is rare and precious.

How it turned out

The hero wanders without flicker, the camera sticks to the player pixel for pixel, the Ashen Wolf boss gives chase across the whole terrain, and the plague waits patiently for the player to come within range before it starts nibbling again. For the first time it really feels like a place to explore rather than a demo in a box.

What comes next

The engine is ready to take content. The next job is building the real first room of Act I, the Edge of the Forest of the Hanged, drawn by hand rather than generated at random. That means a small scenery editor, a system of transitions between rooms, and the first narrative ambushes.

The build for this step is downloadable here (94 KB, historical archive). Run it in Hatari in STe mode, arrows to move, fire to clean the plague, R to restart, Esc to quit. Wander around the world and you will see the scroll follow the player and the plague freeze as soon as you move away. For the current version of the game, see the homepage.