The problem

My hero refused to move cleanly. As soon as he shifted, he flickered and left trails behind him, and the projectiles jumped. On screen it looked like a thoroughly buggy game.

The cause lies in the way the Atari displays its image. To shift a character by a few pixels, the machine has to rework its data on every frame, fifty times a second. For a sprite that size that is a considerable amount of work, repeated in a loop, and the 68000 simply doesn't have time to do it for the hero, the projectiles, the scrolling scenery and the game logic all at once. Something had to give, and it was the hero's display.

The dead ends

I first tried to hand the job to the Blitter, the STe's graphics acceleration chip. On paper that is exactly its role. In practice, tuning it correctly for my case proved discouragingly fragile: stray bands, trails, defects that were almost impossible to isolate.

I then tried alternating between two images on screen. That fixed one defect and created another, ghost sprites reappearing a fraction of a second later.

Neither path was the right one. The solution came, as it often does on this machine, from a simpler idea.

The answer: prepare everything ahead of time

The trick is to compute almost nothing live. Rather than reworking the hero on every frame, I prepare once and for all, at game startup, every possible intermediate position of the character. Then, during play, the machine only has to pick the right one and display it. The bulk of the work is done before the player even presses a key.

It costs a little memory, but on the STe memory is the resource you have and processing time is the one you lack. That is exactly the right trade.

The whole thing is automated: I draw the hero in a plain image file, and a tool builds all the variants I need. If I touch up the drawing, I rerun the tool and the game updates.

The result

The flicker is gone. The hero moves cleanly, the projectiles follow, and there is still plenty of headroom to run the rest of the game at full speed. This is the foundation the walk animations, the enemies and the fighting will rest on.

What comes next

Now that the sprites hold up, on to what brings them to life: animations, enemies, and the first confrontations.