Monthly Archives: February 2003

Stage 4 Top Grid

Most recently I’ve been implementing the top grid which comes down on Stages 4,9 and 14. Here’s a screenshot of the original to give you some idea.

Space Harrier Arcade Stage 4 - Showing Top Grid

I thought I had already been through the code for doing the floor grid and the sky, but when I started going through it to incorporate the top grid, I found things could have been better. So I took some extra time out to try and improve them, while I was at it.

Another thing was adding the mirror function to the sprite loader. In Space Harrier you’ll notice there are often objects that are exactly the same, expect one is a mirror image of the other. E.G. The robot can face to the left with its gun pointing right, or it can face to the right with the gun pointing to the left. The arcade machine can mirror its sprites easily by telling the hardware just to draw it the other way round. Unfortunately the Atari is too slow to do this and has to waste memory by storing another sprite drawn facing the other way already. But during the loading of each stage there is enough time to do this, so we don’t need to store or load the extra sprite from the disk, just calculate it for use later.

I also did some fooling around with the sample playback routines. Although you don’t notice on a real Atari, on an emulator, you can hear some clicks and pops as the sample plays back. Part of this is due to the emulator having to resample to playback at a different rate from the original, but it highlights some timing difficulties in the game. Moving the position of when the horizontal colour changes (done with Display List Interrupts on the Atari), to either odd or even scan lines, makes a difference. I think it will sound a bit better now on emulators.

AtariAge Discussion Thread

Creating Sprites for Stage 4

I’ve been pretty busy on Space Harrier the past few weeks. Below are some extra objects created for Stage 4. The process of creating them is a bit tedious, mainly because of the much greater graphical capabilities of the original arcade machine compared to the Atari:

The arcade machine uses a screen resolution of about 320×224. That may sound rather low compared to machines these days, but at only 160 pixels across the Atari is limited to half even that resolution. What’s more the Atari allows only 4 colours at that resolution too, whereas the original has 256.

Of course there are some tricks to get around this limitation – in the case of this game I’m overlaying two of these 4 colour screens, and swapping rapidly between them. With the right colour choices this can produce the illusion of about 12 real colours, although the selection is somewhat limited. The real downside of this technique is the flickering that occurs on overlapping pixels of different brightness.

The sprites are all drawn and scaled by hardware on the arcade machine of course. All the Atari’s hardware sprites put together could not even do one of the Space Harrier objects, and they cannot be scaled to any size (unless you count 2 or 4 times bigger as scaling). The software sprite routine I have produced barely has time to draw all of the objects, let alone scale them as well. It also runs at a frame rate that is only 1/3 the speed of the original – and it has been heavily optimized too. The simple solution to the lack of scaling is to have many different frames of the objects drawn at progressively smaller sizes.

So the whole tedious process goes something like this:

  • I create a screen grab from MAME, when the object is at its largest size
  • Then into Paint Shop Pro to extract the object from the surroundings
  • Then scale it down to Atari resolutions and colours, and centre it up nicely.
  • It usually looks a mess after this, so tidy it up and simplify the object
  • Next the harder bit – make all the smaller frames by scaling down the object more…it was a mess at the largest size, even more of a mess at the smaller sizes!
  • Save it, and run my custom tools (sadly written in MS Access and VBA) on the object and its frames to get it into a file suitable for the Atari and calculate the sizes for collision detection.

Tedious enough? Here are some of the sprites:

Space Harrier XL/XE 4 Colour Sprite - DomSpace Harrier XL/XE 4 Colour Sprite - Tower of Doom

Space Harrier XL/XE 4 Colour Sprite - BinzBean

AtariAge Discussion Thread