Thursday, January 21, 2010

Rewriting the Alien Spawn control

Aliens to me are the things that move around a screen, usually by some sort of AI, even if it is a simple AI consisting of velocity direction. These aliens are usually the enemies of the player as well, so their name is appropriate.

I have spent a bit of time rewriting the one i had in Pellmell, as the one in Pellmell was very organic. In fact the whole spawning system in Pellmell was truly unique. I do not think i have ever seen a triggering system like it before, in any sort of game, and certainly not a shooter. Shooters tend to be very organized and set in their triggering sequences and amounts etc. Working on Pellmells system recently has made me very proud that i oucld make the living triggering system work and not just blow up in 'certain circumstances'.

Anyway, the rewrite is a case of taking what i had and splitting it into three distinct parts. Each with a solid job to be done. This separation will allow me and Paul to more easily construct the Alien waves that we need and also tweak more personal alien data etc.

1. Spawn timing control - This routine works out just When a spawn of an alien should happen. It also knows what kind of spawn, wave #1 vs wave #2 etc. This data usually comes from the spawn data.

2. Alien Initialise - This routine actually sets up an alien in the appropriate place, or places (could be random area etc).

3. Spawn Group Control - This routine will spawn all the extra aliens needed to create the group if once was requested.

So by using these 3 routines we can have a nice easy to understand separation of functionality, and also allow us to avoid combination bugs all over the place.

tonioght i will finish up these systems and test them more thoroughly. Yes, testing is important at all stages of development.

No comments:

Post a Comment