Monday, 9 April 2012

Blackout!

9th April 2012

Quite a lucky day today. I had a little trick up my sleeve, which worked a treat. On Saturday I was struggling to get the whole set of lights go out in TranceSector, where the player could switch off the lights, but when moving across the screen. The lights are all switched on (Oh dear). . However, I came up with a clever little trick to solve this problem. I had 3 sprites spare, so I decided to use one as a ghost sprite (Trivia: A ghost sprite is a sprite which is being used, but is not visible in the game.).The ghost sprite was set at exactly the same position of the player's ship, but the Y-axis of the ghost sprite was positioned 8 sprites above the player's sprite. This was used to make it look as if the player is extinguishing all of the lights wherever it gets positions. Next. I copied and pasted the sprite/background collision routine to get the ghost sprite correcting the mistakes that were left to the player. Tested everything. It seems to working pretty good now.

Well, I got all of the lights to eliminate, but there is something missing. The concept of this game is simply to eliminate all of the lights in each level, without getting hit by the rockets that zoom towards you when you're spotted. There seems to be no detection of all lights being eliminated. So I added a routine that will check the whole game screen for any lights visible. At first it didn't work, but I found out why :). I made a silly mistake. After correcting it, I got the routine to work. Here's a little video of the game WIP 2 :)

video

I will be making some changes for the additional objects. :)

Blockers - They can destroy the player if the player crashes into those.
Compactors - These shall be converted into temporary forcefield prison cells. If the player touches the cell. It will be stuck there for a short period of time until it has been released again
Conveyor belt's ... Erm, well, they will be moving the player, although the player will be able to move over those.

No comments:

Post a Comment