So that bits pretty much done. On to other stuff.
The sprite management engine is a complex beast. It currently handled all sprites including ground based sprites (such as Tanks, vehicles and gun turrets) and air based sprites (such as planes, player crafts, projectiles).
To always ensure air based sprites appeared infront of ground based ones, the process was two pass.
However just recently i have found a way to make this a single pass method. This means things run faster since instead of two big loops, we use just one.
Each Sprite has a number of attributes associated to it such as X, Y, ID, Group, etc. These are all held in separate tables such as Sprite_X, Sprite_Y, etc. and are all 32 long. This means there are a total of 32 sprites that can exist at any one time.
The Sprite index runs from 31 to 0 and during this process a unique script is called to process the sprites on-screen behaviour, delete and plot them.
This means that sprites appearing at index 31 will appear first(Ground) and at index 0 will appear last(Air).
So when we need a new sprite we either insert at the start or end of the list and when we want to delete a sprite we remove it from the list.
However we can further simplify the process.
For example we have 5 sprites..
With Sprites 0,1,2 being air and 3,4 ground.
Now i want another Air sprite, so i find the last air sprite (2) and move the ground sprite beyond it(3) to the end of the list(5).
Now i make 3 the new air sprite.
Now i want to insert a new ground sprite. Thats easy, just lace a new one at the end..
To delete air sprite 2, i replace it with the last air sprite which is 3 and replace 3 with the last ground sprite which is 6. I then decrease the count by one.
Finally to delete ground sprite 3 i replace it with the last sprite 5 and decrease count by one.
I've also been back on the background story, deciding on some nice images to appear whilst the story unfolds.
I can tell you now that the game will be disk based. Technically it is possible to make it tape based since its very much sequential in gameplay.
For example, road to airfield, cut to unfold story, fly to Germany, cut to unfold story, etc.
It might have also been possible to load the game from tape whilst playing which would have been so, so cool. Except it would only have worked on the real machine because afaik no emulator would have supported it.
