This game review is part of our ‘Game of Code Week’ series.
By Kris M.
What is Java?
Java language is very much a workhorse and can run in web browsers, stand alone on PCs and Macs, or packaged as part of an Android application or Minecraft modification. Its versatility has a big drawback: Often, rather large software development environments must first be configured in order to run Java, using Integrated Development Environments (IDEs) such as NetBeans, Eclipse, or IntelliJ IDEA. Environments like web-based ideone are already configured to compile and run Java code, but aren’t designed specifically for game play.
Typically, Java is used to teach Object Oriented Programming (OOP) techniques such as classes, methods and instances. The concepts can be rather abstract for new programmers. For example, both motorcycles and cars are both vehicles (classes). Cars can turn left or right but they can’t do wheelies like a motorcycle (methods). Specific vehicles can be a red Ford Fusion car and a black Harley Sportster motorcycle (instances). See it’s not hard to discuss these ideas - but it’s not easy either.
Play and learn Java with Greenfoot
Greenfoot is an interactive Java environment designed primarily for educational purposes at the high school and undergraduate levels. Its graphical nature makes it good for interactive games and simulations in a 2-D cartoon type format. Greenfoot was developed and is maintained at the University of Kent with support from Oracle.
Greenfoot’s environment allows people to experiment with Java concepts without the need for extensive configuration. In addition, instead of relating these concepts to something that cannot interact or change, complex concepts are done and shown using common items such as an animal eating an apple for food (cartoon images) to illustrate classes, inheritance, and methods.
Classes are shown by building items from different components (hedgehog and apples are built from actor). When more animals are made or apples disappear, instances are then created and destroyed. Methods are used to interact with the world to move around or see how many apples have been eaten.
With Greenfoot, students can bring to life what can be difficult and complex. I thought that made learning fun. Sample projects are available for illustration and modification. I was disappointed that there weren’t several examples included with the installation. However with a little exploration, you can find several examples on the site.
To extend and fully understand the Greenfoot environment, it is better to purchase the book. I was disappointed to find that it was so expensive (nearly $100). I expect college level technical books to be around this price, yet this is quite expensive for someone at the high school level. True, a high school class might be able to get by with the teacher having a book, but extended learning with Greenfoot is difficult without it. On the other hand, Greenfoot is a companion tool for learning Java and cannot be the sole resource.
For Java students, I’d recommend Greenfoot for reinforcing skills. It is still necessary to have main books for learning language syntax and design patterns.
- Greenfoot: http://www.greenfoot.org/download
- Textbook: Introduction to Programming with Greenfoot: Object-Oriented Programming in Java with Games and Simulations (2nd Edition) by Michael Kölling