Chapter 3. Enemies and Controls

In the previous chapter, we saw how to include a character and make it move around. We also saw the start of shooting mechanics. In this chapter, we will improve upon the shooting mechanics and also add enemies that will spawn from the right-hand side of the screen and shoot bullets. The player uses the new control scheme, where they will be boosted up by taps on the left-hand side of the screen and can shoot the enemy by firing rockets as well as avoiding the enemy bullets. We have a lot to cover in this chapter, so let's gets started.

The things you will learn in this chapter are as follows:

  • Creating the enemy class
  • Adding the enemy movement
  • Adding gameplay layer class
  • Creating the projectile class
  • Adding hero controls ...

Get Learning Cocos2d-x Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.