It would seem creating worlds that are dynamically generated and potentially endless would be the concluding topic of this chapter, instead of the introductory one. On the contrary, dynamically creating a world is easy, and we have already seen all the coding necessary to do so. In Chapter 1, Let's Dive Right in…, we dynamically created enemies in Avoider Game that streamed down from the top, and later, in Chapter 2, Animation, we added a dynamically generated star field. We will use the same techniques to create a seemingly endless world. Imagine that the enemies in Avoider Game were generated less frequently and looked like planets. It would look like we were travelling through space. Imagine we had a green background and used an image of a tree for our enemies. It would look like we were walking through a forest. Next, we will create a Greenfoot scenario that displays a user-controlled rocket flying through a cloudy sky.
Creative Greenfoot: RAW
By :
Creative Greenfoot: RAW
By:
Overview of this book
Table of Contents (17 chapters)
Creative Greenfoot
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Let's Dive Right in…
Animation
Collision Detection
Projectiles
Interactive Application Design and Theory
Scrolling and Mapped Worlds
Artificial Intelligence
User Interfaces
Gamepads in Greenfoot
What to Dive into Next…
Index
Customer Reviews