Joy of code: Java programming with Greenfoot
Greenfoot is a programming environment for the coding language Java. It has been designed primarily to assist game design; featuring an introduction to object oriented programming it enables students to create 2D games with sound relatively easily whilst introducing key programming concepts.
In this series of thirty three video tutorials, Michael Kölling from King’s College, London, guides students through the process of installation, creation and improvement, using a range of games as exemplars.
By this stage in the series of video tutorials, students have created a game in which a turtle eats lettuces whilst being chased by snakes. In this tutorial, students are shown how to implement keyboard controls so that they can control the turtle. This is achieved using the Greenfoot application processes...
In this video tutorial students are guided through the process of adding sound to their game. They are shown how to access pre-existing sound libraries and also how to create, record and input their own sounds to bring their game to life.
More resources can be found here
In this video tutorial students are asked to pause their creative endeavours and check they understand the structure of the code they have created so far in their turtle game. It involves a detailed explanation of class structure, headers, the value of commenting and how to use brackets.
In this video tutorial students are introduced to the use of variables, specifically how to add a counter to their game to show how many lettuces their turtle has eaten. This introduces how to end the game, the ++ statement and the concept of ‘fields’ – a variable within a class.
More resources can be...