A decision that I took very early on in the development of Invaders from Mars was to contol rather strictly the number of alien bombs that were on the screen at any one time. I’d figured (largely from playing Do Don Pachi and other manic shooters) that this was key to the difficulty of the game. I’ve since found that there’s a fair bit more to controlling a game’s difficulty but the design decision stuck none the less.
The logic for an alien firing is quite simple. Each alien has an aggression setting. If a randomly generated number between zero and the alien’s aggression falls between a set threshold then the alien will become interested in firing. Previously I’d left it at that and randomised the direction (3, 4 or 5 – SE, S or SW) and speed. The result was unsatisfactory since the player had nothing to rely on. No pattern ! I’d found that playing other arcade games revealed that the player responds best to aliens firing in bursts but hadn’t really wanted to go down that route since I imagined it was a pain to implement.
So as a simple workaround I opted to only have one alien type (Squid) firing in random directions. All others would fire south all of the time. It made for a more comfortable game in that the player could predict the alien’s behaviour 90% of the time but ultimately fell flat for the same reason.
When I load the game first time in I build “pots” of bombs for each level. Essentially I define a set amount of bombs that will be at the alien’s disposal for each level that increases in size throughout the game. For example, level 1 (pot 1) will contain a maximum of 5 available bombs. As bombs are spawned they dip in to the bomb pot. When a bomb reaches screen edge it is “killed” and becomes available again. For level 1 therefore you will only ever find a maximum of 5 bombs on screen at once. This proved to be a useful way of controlling difficulty.
Towards the later levels the screen could become full with 60 bombs which when firing in all random directions provides (I think) a sloppy experience for the player.
It was time to implement aliens firing in bursts.
To my surprise it was extremely simple. I set a flag to on or off to indicate whether the alien was in firing mode and then counted down through a preset number to zero. On each count the alien would attempt to launch a bomb by dipping in to the pot. The result was perfect. Aliens would fire up to 5 consecutive bombs in the same direction. On the later levels (where it matters most) the screen would soon become a kaleidescope of alien bombs. This was just the result I was after and provides a far more satisfactory game experience.
The more I play Invaders the more I realise that I am edging closer to the “no brain” style of gaming that Don Pachi, Esp RaDe et al all present. It really is possible to almost switch your brain in to neutral and just move between patterns erasing the screen of aliens in delightful waves of lasers whilst avoiding the shapes.
A worthwhile and significant development.