Summary

In this chapter, we wrote a lot of code. But, it gave us the possibility of bringing our game to life. In fact, we first programmed the PlayerController, which is responsible for moving the player's spaceship as well as shooting according to the player's input. Then, we saw how it's possible to automate the process of moving and shooting with just a few lines of code by writing the EnemyController. Also, we explored a variant in case you would like to use the second, or maybe both at the same time, to create variety among enemies' behaviors. Finally, we implemented our BulletController, which is responsible for moving the bullet on the map, but also for hitting an enemy or the player, creating an explosion.

In Chapter 7Getting Serious About Gameplay, we will explore how to incorporate power-up, score, and health into our game, as well as building the environment for our game, and we will finish up by polishing the game. So, without losing any more time, let's jump to the next chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset