Tuesday, 12 April 2016

Blogging about Space Invaders

Reason for choice

The reason I chose space invaders over the blackjack game was because I am not confident enough with my coding skills to be able to make a good blackjack game.


Sprites
For the sprites I tried to make them look as close to the original game as possible to give it a retro look, some parts of the game were changed however to make it a bit more unique



Player
This sprite is an exact lookalike of the original space invaders sprite however I made it a much higher resolution so that it would look sharper when enlarged  


Aliens
As with the player I made replicas of the original sprites, with this game I added bosses which are just enlarged aliens, for these I made higher quality sprites since they would be bigger and would look worse if they were just stretched sprites

Barriers
The barriers work slightly different from the original game as instead of using code I made these sprites to represent different levels of damage and then stacked them on top of each other so the fully fixed barrier is destroyed first and then the sprites get more damaged until there isn't anything left 


Bullets
I made different looking bullets for the player and enemy, the player has a straight line for a projectile whilst the enemies have a lightning bolt shaped bullet, the bullets can collide and cancel each other out in-game.



Spaceship
The spaceship in this game is used as a boss instead of a way to get extra points, I made the sprite a bigger version of the original sprite and used it as a boss in the final level



Objects
Player: inside this object I used a mix of code and the drag and drop options to give the player the ability to shoot and move. Most of the things required to make the game work are in this object.


The code to the left is what allows the player to fire bullets and the delay between firing as it creates a bullet object that will then rise. The code above makes the game restart once the player loses all their lives. I also included a drag and drop command to make a spark effect that makes a trail from the player to add a bit more visual flair to the game







The only other important stuff is in the bullet objects as it has to collide with the enemies and kill them which is a core element of the game, no code is required as I just had to set vertical speed and make it kill enemies and cancel out other bullets whilst also destroying itself when it connects to these objects




Gameplay















No comments:

Post a Comment