Greenfoot
| Company type | Free software |
|---|---|
| Industry | Software development, Educational software |
| Founded | 2003 |
| Founder | Michael Kölling |
| Headquarters | London , United Kingdom |
Area served | Worldwide |
Key people | Michael Kölling |
| Products | Greenfoot IDE |
| Owner | Computing Education Group at King's College London |
| Parent | King's College London (Computing Education Group) |
| Website | greenfoot |
Greenfoot is an integrated development environment designed for educational purposes, utilizing either Java or Stride. It is mainly targeted at learners in high school and undergraduate programs. The platform facilitates the straightforward creation of two-dimensional graphical applications such as simulations and interactive games.
The software is developed and supported by Michael Kölling alongside the Computing Education Group at King's College London, with backing from Oracle. Distributed as free software under the GPL, Greenfoot operates on multiple operating systems including Windows, macOS, Linux, and Solaris, provided a modern JVM is installed.
History
Initiated in 2003 by Michael Kölling, the Greenfoot project began with a prototype co-created by Poul Henriksen and Kölling during 2003/2004. Progress continued from 2005 with contributions from the BlueJ Group. The development team later moved their base from the University of Kent to King's College London.
The first official release, Greenfoot 1.0, launched on 31 May 2006, followed by a series of updates over time. The project earned recognition through the "Duke's Choice Award" for "Java Technology in Education" in 2007 and received the "Premier Award for Excellence in Engineering Education Courseware" in 2010.
In March 2009, Greenfoot transitioned to an open-source model under the GPL-2.0-or-later license with the Classpath exception. Later that year, in August, a dedicated textbook was introduced to aid programming education using Greenfoot.
In 2017, support for the Stride programming language was incorporated to make coding more accessible for beginners and younger students. This addition included a frame-based editor designed to facilitate an easier shift from block-based coding environments.
Use and programming model
| <syntaxhighlight lang="java">
public void act() { setLocation (getX() + 4, getY()); // Moves the Actor 4 cells to the right setRotation (getRotation() + 2); // Rotates the Actor 2 degrees clockwise } </syntaxhighlight> |
| Sample implementation of a basic act method in Greenfoot |
| <syntaxhighlight lang="java">
Actor a = getOneIntersectingObject(Asteroid.class); if (a != null) { // Collision with an asteroid detected! explode(); } </syntaxhighlight> |
| Illustration of simple collision detection |
Greenfoot’s programming paradigm revolves around a World class representing a rectangular display area, alongside multiple actor objects that operate autonomously within this space. Both are instances of Java classes. The environment offers built-in methods enabling actors to move, rotate, change appearance, and detect collisions.
Developers create new behaviors by subclassing two fundamental classes: World and Actor. The world subclass instance sets up the runtime environment, while actor subclasses embody entities that exist and perform actions within it. The system automatically instantiates the world object.
Program execution is driven by a main loop that invokes each actor’s act method repeatedly. Crafting scenarios primarily involves defining these act methods through standard Java coding. Greenfoot’s API supports features such as animation, audio playback, randomization, and image handling, while all conventional Java libraries remain accessible for more complex tasks.
Design
Greenfoot is crafted to quickly captivate learners by providing straightforward access to animated visuals, audio, and interactive elements. Its highly engaging environment fosters curiosity and hands-on experimentation. From an educational standpoint, it aligns with constructivist and apprenticeship teaching methodologies.
The system focuses on fundamental object-oriented programming principles—such as the relationships between classes and objects, methods, parameters, and interactions among objects—through visual aids and structured guidance. This method supports the development of precise cognitive frameworks for contemporary OOP architectures.
Learner community
The Greenfoot Gallery serves as a platform where users can publish their projects and engage in discussions. Registered users can share scenarios that operate directly within web browsers, allowing immediate worldwide accessibility. This straightforward online publication feature acts as a significant incentive for younger learners.
Educator community
Educators benefit from the Greenroom, a dedicated community space designed for exchanging teaching approaches, sharing experiences, and distributing educational resources. It includes a discussion forum alongside a collective repository containing teaching materials such as worksheets, project concepts, presentation slides, and other instructional tools.
Releases
The 2.0 release brought substantial improvements over version 1.5.6, enhancing the editor and API with features like code completion, color-coded scope highlighting, a more effective find-and-replace function, and a new navigation pane. It also introduced an integrated sound recorder and expanded audio capabilities through the GreenfootSound class, supporting pause, looping, and MP3 playback. Version 3.0 added compatibility with the Stride programming language and unveiled an innovative frame-based editor.
See also
References
Bibliography
- {{cite book|title=Introduction to Programming with Greenfoot – Object-Oriented Programming in Java with Games and Simulations|last1=Kölling|first1=Michael|publisher=Pearson Education|year=2009|isbn=978-0-13-603753-8|}
External links
- Screenshots
- The Greenfoot Gallery – A showcase featuring live Greenfoot scenarios
- Greenroom – A resource hub for educators
- Free software programmed in Java (programming language)
- Integrated development environments
- Pedagogic integrated development environments
- Free integrated development environments
- Java development tools
- Programming tools for Windows
- MacOS programming tools
- Linux programming tools
- Educational programming languages