-
Book Overview & Buying
-
Table Of Contents
Creative Greenfoot: RAW
By :
It is beneficial to the learning process to discuss topics in the context of complete scenarios. Doing this forces us to handle issues that might be elided in smaller, one-off examples. In this chapter, we will build a simple platform game called Cupcake Counter (shown in Figure 1). We will first look at a majority of the code for the World and Actor classes in this game without showing the code implementing the topic of this chapter, that is, the different forms of projectile-based movement. We will then present and explain the missing code in subsequent sections. This is the same approach we took in the preceding chapter, in order to study collision detection.

Figure 1: This is a screenshot of Cupcake Counter
The goal of Cupcake Counter is to collect as many cupcakes as you can before being hit by either a ball or a fountain. The left and right arrow keys move your character left and right and the up arrow key makes your character jump. You can also use the space...
Change the font size
Change margin width
Change background colour