| 16-Aug-04 |

Atari XL/XE Space Harrier Conversion Project

| Home | Diary | Movies | Download | FAQ |

| Latest | Mar-07 | Aug-06 | May-05 | Feb-05 | Oct-04 | Aug-04 |
| Dec-03 | Mar-03 | Jan-03 | Dec-02 | Jun-02 | Apr-02 |

6th Mar 2003

Yet another month where things haven't proceeded as smoothly as planned. This has mostly been a month of bug finding and fixing, so there's nothing new or exciting to share. Still, I didn't want you all to think I was just sitting around twiddling my thumbs, so I thought I ought to write something...

I've finished doing the colours for the sky on Stage 4 and most of the top "grid" routines mentioned last month. To make things quicker and easier during this designing, I make the game start straight into the stage I'm working on. Normally the next phase of testing, which is playing the whole game all the way through from the start is a formality. After all, the stages are using all the same routines, and they have all been played to death on their own by this time. But no formalities last month - things would screw up badly shortly after moving on from Stage 3 to Stage 4. But not always at the same place. Took an embarrassingly long time to find out exactly why.

Since I have nothing new, I thought I'd share with you my take on how the aliens and bosses work in the game - by the way, I expect this will be tedious as hell. But believe me, you won't be as frustrated as I was trying to figure out the cause of the problems this month. Somehow it all seems worthwhile when you finally crack them - even if you sometimes feel a little stupid at what caused the problem in the first place.

The way the Space Harrier aliens seem to work is actually pretty simple (luckily for me). All they do is start from the same positions and follow the same fixed pattern of movements every time the game plays. They don't react to anything around them (well, OK, some of them will try to Kamikaze into you later on), and when they shoot, they always aim straight at your current position (this is why one of the tips for playing the game is to move in circles - to keep from moving back on yourself). The aliens also like to Conga - they all follow each other with just a varying delay between them.

Things only start to get more complicated with the bosses at the end of each stage. For example the dragon on the first stage; the dragon's segments all follow the head, like any other pattern, but the head is the only thing that can be shot - shooting the segments has no effect. The segments all have to be exploded (or change colour) when there are enough hits to the head.

Another feature that seems to be required on some bosses, is the ability for the aliens to be controlled by more than one pattern of movement at the same time. The spinning heads at the end of Stage 2 are an example of this - they all follow each other round in a circle, but also, they move in and out of the screen simultaneously. I call my version of this feature a sum pattern, because it adds its movements to all the other aliens positions, not just its own aliens. If that's hard to picture, here are those spinning heads from the arcade game (reduced colours and size)

And that's mostly it. Not a lot else is required. After that you just need to string the different patterns together in the right order to create a whole stage.

Although it may seem a fairly trivial piece of programming (and it probably is, to good programmers), the routines for controlling the aliens are some of the more complex routines in my version of Space Harrier, even though I like to keep things as simple as possible. Although I had tried to plan out how everything was supposed to work with controlling the aliens and bosses before I started programming the routines - I have had to revise the plan several times. This meant even I got confused over how things were supposed to work - especially when setting up more complicated boss scenarios some time after having written the routines. After ages spent looking for bugs (and finding some that were not the cause of the problem), it turned out my crash problem was actually mostly due to me forgetting I had changed the sum patterns to work in a different way. A little tweaking and things were sorted out pretty quickly after that realization. Shame on me for poor specifications and documentation.

Let's hope next month is better...but that's not very likely - I should be getting on to the dragon riding bonus stage, for which not many routines have been written yet - so plenty of scope for new bugs. Actually I'm quite looking forward to this, as trying to convert the stages is a pain, and writing code is much more interesting.

Top