Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Creative Greenfoot: RAW
  • Table Of Contents Toc
  • Feedback & Rating feedback
Creative Greenfoot: RAW

Creative Greenfoot: RAW

By : Haungs
4.7 (3)
close
close
Creative Greenfoot: RAW

Creative Greenfoot: RAW

4.7 (3)
By: Haungs

Overview of this book

This book is for coding students and Java programmers of all levels interested in building engaging, interactive applications with Greenfoot. Familiarity with the very basics of Greenfoot is assumed.
Table of Contents (12 chapters)
close
close
11
Index

Chapter 1. Let's Dive Right in…

 

"It does not matter how slowly you go as long as you do not stop."

 
 --Confucius

In this chapter, you will build a simple game where the player controls a character using the mouse to try to avoid oncoming enemies. As the game progresses, the enemies become harder to avoid. This game contains many of the basic elements needed to create interactive Greenfoot applications. Specifically, in this chapter, you will learn how to:

  • Create introduction and game-over screens
  • Display a user score
  • Use the mouse to control the movement of an actor
  • Play background music
  • Dynamically spawn enemies and remove them when appropriate
  • Create game levels

Throughout this chapter, we'll learn basic programming concepts and gain familiarity with the Greenfoot development environment. As you proceed, think about the concepts presented and how you would use them in your own projects. If you are new to Java, or it's been a while since you've programmed in Java, be sure to take the time to look up things that may be confusing to you. Java is a well-established programming language, and there are endless online resources you can consult. Similarly, this book assumes a minimal understanding of Greenfoot. Be sure to look at the simple tutorials and documentation at www.greenfoot.org when needed. Experiment with the code and try new things—you'll be glad you did. In other words, follow the advice of Confucius, quoted in the first line of this chapter.

Many of the chapters in this book are independent; however, most are dependent on this chapter. This chapter provides the framework to create Greenfoot applications that we will continue to use, and refer to, in later chapters.

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Creative Greenfoot: RAW
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon