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
About the Author
About the Reviewers

Chapter 2. Animation


"Study without desire spoils the memory, and it retains nothing that it takes in."

 --Leonardo da Vinci

It is fairly simple to move actors around in Greenfoot scenarios by handling keyboard or mouse events and using setLocation() appropriately. However, we can do better. By animating our actors further, we can breath life into them. We can give our players/users the illusion of a vibrant, living world.

In essence, programming animation is the art of illusion. By adding small movements or image changes at the right time, we beguile our users into believing our creations are more than just static pixels on a screen. In this chapter, you will learn the following techniques for animating Greenfoot actors:

  • Image swapping and movement

  • Timing and synchronization

  • Easing

Greenfoot is a wonderful platform for creating interactive and engaging applications that you can share on the Internet or use as a desktop application. It is your desire to create these types of applications that...