Drone Grid Case Study: Creating the Player
This chapter covers a case study for a 3D game called Drone Grid. The objective of the game will be to protect your pyramid, which is located in the center of the playfield, from attacking enemies. You will do this by touching the screen and launching projectiles toward the enemies to destroy them. You will be in a fixed location on the edge of the playfield, and you can turn left or right 90 degrees. First, the creation of the classes representing the player’s graphic in the game is presented. Next, we create classes relating to the player’s viewpoint and the player’s input. This is followed by the creation of the classes dealing with the player’s weapons and ammunition. Next, we create classes dealing with explosions and a class dealing with game object properties. Finally, we present a hands-on example illustrating the use of our new classes, with which you will use your weapon to hit cubes.