If you're arriving here, read why I'm pulling this old engine back out first. This journal isn't a project started from zero: it's the final stretch of an STe/STf engine I've been dragging around for years.

The challenge

Pick up my old engine skeleton and get it standing straight again, so I can finally run a real game on the Atari 1040 STe and STf. The goal hasn't changed since day one: push the machine as far as it will go. Before thinking about enemies, levels or story, I need a solid base. Something that moves, and moves well.

What I got running again

I'm starting from the base I had already written and rewritten over the years: take full control of the machine and lay the foundations back down.

The first building block is avoiding screen tearing. When you draw straight onto the screen the player is looking at, they sometimes see half of one frame and half of the next, which gives an ugly horizontal split. The classic answer is to work on a hidden image while the other one is displayed, then swap the two at exactly the right moment, right between two sweeps of the screen. The player never sees the drawing in progress, only finished images.

The second building block is rhythm. I lock the whole game to the screen sweep, fifty times a second, so that every image is computed and displayed in perfect cadence. No stutter, no jerk.

A character that moves pixel by pixel

The hero is still just a red rectangle, a simple placeholder. But it moves pixel by pixel in all four directions, with a real sense of glide. The tricky part was making it advance finely without leaving a smear when it straddles two areas of the screen: it needed a clean drawing at every intermediate position.

Gravity and jumping work too, with a capped falling speed so that landings stay readable and controllable rather than turning into uncontrolled dives. Nothing spectacular yet, but it already feels like a game, and that is exactly what I wanted to feel before going any further.

Next step

Scenery and horizontal scrolling. The STe can shift its display finely, almost for free, and that is the capability I want to exploit to get perfectly smooth scrolling. Combined with reloading the scenery at the edge of the screen, it's the centrepiece that will turn this prototype into a real platform game.

Result

The red character moves smoothly on a black background with a grey floor, at fifty frames per second. It's a graphical placeholder, but the engine is in place and the movement already feels good. The rest can begin.

Download morteveille-001-moteur.prg (1.5 KB) - Historical archive of this step. Run it in Hatari in STe mode, 1 MB of RAM. Arrows to move, up to jump. For the current version of the game, see the homepage.