ABSTRACT

This chapter discusses the code for DotRobot and Bombs from the 2D game. It presents the new DotRobot model. The chapter incorporates code for Dottima picking up and dropping bombs so we can destroy DotRobots and create a brand new and much larger level. Dottima can now push the DotRobot around the level just like the blockade. Dottima can now change the orientation of a DotRobot by colliding with it or by shooting it. The direction and dirVector variables are public because that’s one way to enable us to observe them while playing the game. This can help with debugging and with understanding the code. The big difference between this 3D code and the 2D code is the way the DotRobot orientation is handled.