In the first part of our tutorial in Chapter 8, Mobile Game Engines, we prepared the game scene. In this second part we will show how to make things behave properly.
Let's begin thinking about the game logic we are going to implement in our game.
In Space Invaders the player controls a ship located at the bottom of the screen, which moves left and right and shoots bullets.
The goal is to destroy wave after wave of aliens approaching towards the player's ship from the top half of the screen, before they reach the bottom of the screen, while avoiding the bullets they fire.
Aliens move according to a snake-like pattern; they begin moving right and as they reach the right boundary of the screen, they invert direction and move ...