Presentation is loading. Please wait.

Presentation is loading. Please wait.

GREENFOOT CLUB RESOURCES Brian Cullen – Rossett School

Similar presentations


Presentation on theme: "GREENFOOT CLUB RESOURCES Brian Cullen – Rossett School"— Presentation transcript:

1 GREENFOOT CLUB RESOURCES Brian Cullen – Rossett School Email: bcullen@rossettschool.co.ukbcullen@rossettschool.co.uk Twitter: @mrbcullen

2 Approach Something working at end of session Allow more able to progress independently Plenty of opportunity for creativity

3 Resources http://www.computingatschool.org.uk/index.php?id=cb- programming-club http://www.computingatschool.org.uk/index.php?id=cb- programming-club 10 Sessions covering 3 different scenarios. Guide and Exemplar Code for each Session. Starters / Plenary (usually) / Customisation

4 Overview Session Num Programming Concepts (only new concepts are listed) Greenfoot SkillsScenario Outcomes 1 Classes represent objects in a program. Use of methods and parameters. Use of conditional statements (if). Layout of the Greenfoot IDE Creation of Actors. Use of act method to set Actor behaviour. Using Greenfoot class to access keyboard input. Simple scenario where a ship is moved around the screen using the arrows. All objects added to world manually. 2 Use of local variables Use of coordinates in graphical systems. Class constructors Collision detection Use of sounds Accessing the world object. Automatic setup of world. Improvement of scenario from session one. Able to collect crates. Enemy ships are included and hitting one ends the game. 3 Use of random numbers for unpredictable behaviours. Boolean operators in conditionals (OR). Boundary checking in graphical system. Generating random numbers. Changing Actor location. Improved enemy ship behaviour. Crates reappear elsewhere rather than removed. 4 Instantiation of objects. Removal of objects. Creating new actors. Removing objects from world. Add objects on the “fly” Rotating objects to direction. Add all 4 classes (plane, launcher, rocket, crate). Movement of the launcher and ability to fire. 5 Class properties. Use of random numbers. Delaying actor actions. Movement of plane and ability to drop crates. Delays between rocket launches. 6 If/else statements. Accessor methods. Return types. Use of World class to hold game level information. Calling methods from the IDE. Added collision detection so that rockets can hit planes and crates. Add methods to allow score to be tracked. 7 Casting object to correct type. Using predefined classes. Delay program for a period of time. Stop program execution when game is over. Added facility to track lives and stop the game when all lives are lost. Used StatusBoard actor to display score. Add intro sound with delay. 8 Importing java classes. Finding the size of a collection. Use of the modulo operator. Adding a Game Over screen as an actor. Getting list of all actors of a particular type. Changing images used. Last refinement of the game. Puts a plane back in if all are shot down. Increase the number of planes every 5 points. Game over screen displayed at the end. 9 Using Colours in Java. Use of loops to repeat tasks (for). Displaying text on an actor. Complete setup for cannon game. Creation of all the elements of the cannon game and the initial setup for the game. 10 Using vectors to calculate motion. Actor behaves as if gravity present.Added the cannon balls to the game and get them to behave as if there was gravity.

5 Common Pitfalls Just copying the code – not reading the text. Brackets and indentation. Where to put semicolons? Every line with instructions must end with a semicolon EXCEPT if it is immediately followed by an curly bracket! Boredom because I didn’t challenge them enough!


Download ppt "GREENFOOT CLUB RESOURCES Brian Cullen – Rossett School"

Similar presentations


Ads by Google