Book Image

Creative Greenfoot: RAW

By : Michael Haungs
Book Image

Creative Greenfoot: RAW

By: Michael Haungs

Overview of this book

Table of Contents (17 chapters)
Creative Greenfoot
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The MazeWorld scenario


In the preceding chapter, we learned how to create tile-based worlds. We will augment the Hiking World scenario we created using the tile-based method to create our new scenario entitled MazeWorld. In this scenario, our hero will need to navigate around obstacles and avoid three intelligent actors, in order to reach the gold at the end of the maze. Figure 1 contains a screenshot of the completed scenario.

Figure 1: This is the completed version of MazeWorld

There are a few significant differences between the HikingWorld scenario from the previous chapter and the new MazeWorld scenario we are building in this chapter. The redundant area will be quickly explained, and we will slow down and explain in detail the changes necessary to create our intelligent actors. Please review Chapter 6, Scrolling and Mapped Worlds, if needed, for a full description of tile-based world creation.

The MazeWorld class

Create a new scenario and call it MazeWorld. In the new scenario, create a...