Version 2.

Slides:



Advertisements
Similar presentations
Create a Simple Game in Scratch
Advertisements

Create a Simple Game in Scratch
Getting to know Greenfoot
Games and Simulations O-O Programming in Java The Walker School
Program: Little Crab Mr Gano.
Asteroids Games and Simulations O-O Programming in Java The Walker School The Walker School – Games and Simulations
Wombats Creating Games with Greenfoot The Walker School – Games and Simulations
Write Your First Computer Game!. Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to.
Chapter 1 - Getting to know Greenfoot Bruce Chittenden.
Chapter 1 - Getting to know Greenfoot Acknowledgement: Michael Kolling & Bruce Chittenden.
Java Programming Working with TextPad. Using TextPad to Work with Java This text editor is designed for working with Java You can download a trial version.
Games and Simulations O-O Programming in Java The Walker School
GAME:IT Junior Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Created by NW 2012 – please note all copyright on images used is property of copyright holder. Note: some of the more complicated descriptions are taken.
StarLogoTNG 101 Treasure Hunt Game Unit Lesson 3: Treasures and Hazards.
GAME:IT Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
VIDEO GAME PROGRAMMING Video Game Programming Junior – DigiPutt INSTRUCTOR TEACHER’S ASSISTANT.
Greenfoot. Getting Started Open the Greenfoot download site: Select Greenfoot
Chapter 1 - Getting to know Greenfoot
Lecture 4. Greenfoot 1 Pablo Romero, Department of Informatics Greenfoot Programming simulations and games in Java.
Greenfoot Game Programming Club.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Lesson 1: Writing a program. Java Java is a programming language Computer cannot understand it, though it can be translated ( compiled ) so a computer.
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
Lesson 2: Reading a program. Remember: from yesterday We learned about… Precise language is needed to program Actors and Classes Methods – step by step.
Kakihijau.googlepages.com Introduction To Greenfoot Part-2.
Introduction To Greenfoot
Scratch for Interactivity Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
How to create a basic game in Scratch. The Scratch Stage The Scratch stage is 480 pixels wide and 360 pixels high x increasesx decreases.
Chapter 2 – The Little Crab Program:. Little Crab Scenario Inheritance: The Arrows Denote Hierarchy Crab is an Animal Animal is an Actor Therefore, It.
Adding and Eating Worms Mrs. C. Furman August 23, 2010.
Kakihijau.googlepages.com Introduction To Greenfoot Part-3.
Newton’s Lab Games and Simulations O-O Programming in Java.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
Chapter 4 - Finishing the Crab Game
Index Background Costumes Making object walk smoothly Controlling an object with the keyboard Control an object with the mouse Changing costume when hit.
Greenfoot.
Chapter 4 - Finishing the Crab Game
Create a Halloween Computer Game in Scratch
Scratch for Interactivity
Keyboard Input.
Chapter 3: Variables, Functions, Math, and Strings
Chapter 3: Variables, Functions, Math, and Strings
Chapter 3 – Improving the Crab Game
Intro CS – Keyboard and mouse input
Introduction To Greenfoot
PowerPoint Activity 5: To Be Determined…
Barb Ericson Georgia Institute of Technology June 2007
Scratch for Interactivity
Creating Games with Greenfoot
The Little Crab Scenario
Introduction to TouchDevelop
Go to =>
Run Java file with Window cmd
Games and Simulations O-O Programming in Java The Walker School
Breakout in Greenfoot Barb Ericson
ICT Gaming Lesson 3.
MACROS MUST BE ENABLED FOR THIS FILE TO WORK
MACROS MUST BE ENABLED FOR THIS FILE TO WORK
Building a Game in Scratch
Greenfoot November 8, 2009.
Creating a Simple Game in Scratch
WJEC GCSE Computer Science
CSC 221: Introduction to Programming Fall 2018
Agenda for Unit 5: Control Structures
Bishopston Comprehensive School
Presentation transcript:

Version 2

Skills required from the exam Create a new Greenfoot world Populate a given world with one or more objects Edit the objects so that they turn and move randomly Edit the program code to make the objects move in the direction of the arrow keys when pressed Edit the objects to detect object collision and remove these objects from the world Add a sound which will play when objects requires it to Add objects which can receive messages from other objects Edit objects so that they can change the image/value displayed on the Greenfoot world Save completed worlds as file names stated.

Populate a given world with one or more objects Scenario > New Java Scenario Right click on Actor Class and add new subclass Choose an item and name it. Right click on the new subclass item and add to world (stage) holding shift allows for multiples items. Right click on stage and Save The World (Note – the editor will briefly open at this point – close it)

Edit objects so that they turn and move randomly Right click on the item and open editor Add code to move 4 steps Compile and close editor Run to see your new act ‘method’ work Re-open editor and add an isAtEdge if method to turn

Edit objects so that they turn and move randomly Edit the turn command to move a random angle To add a like-like ‘wobble’ movement to the object. Add a second if statement that asks if the random number (from 1-100) is less than 10… (i.e it has a 1/10 chance)… It will then turn 10 Test and then amend to turn a random number

Make objects move in the direction of the arrow keys Add another object to the stage (this example creates a new Actor subclass called Player) Open it’s editor Add code that will allow it to continually move 4 steps and turn 3 degrees left and right (back)

Make objects move in the direction of the arrow keys Develop code to allow more control

Detect object collision and remove these objects from the world Open the editor for the Player object and add: New ‘invisible’ actor eat created for the purposes of this method Basically means is touching (intersecting with…) … the Food Actor If this is actually happening (not nothing) Remove the item from the world

Add a sound which will play when required to Add into the eat IF statement the Greenfoot command to play a sound and specify the exact file name. (that should be stored in the project sounds folder.)

Adding a score counter (messages from other objects and changing values) Edit > Import Class > Import Counter Edit the MyWorld class to allow the counter to be accessed by all world objects (This example creates a new counter called counter and a new method called getCounter which adds the counter to an x,y position and then returns the counter to other objects) Looking inside the counter class code you will see the existing method add (to increment the score) We will now instruct the player to ‘get’ the counter and use it’s add method

Adding a score counter (messages from other objects and changing values) In the Player eat IF statement, add the following. This basically allows the Player to get the Myworld world and it’s counter then run the add method (by 1)

2014 Exam Open the WJECCrabs scenario in Greenfoot. Populate the world with a crab and some wombats. Edit the wombat so that it turns and moves randomly. Edit the program code to make the crab move in the direction of the arrow keys when pressed. Edit the crab so that it “eats” a wombat (removes the wombat from the world) if they collide. Add a sound which will play every time a crab “eats” a wombat. Add a counter and edit the crab’s code so that the counter displays how many wombats the crab has “eaten”. Save your completed world as FinalWJECCrabs

2015 Exam Open the WJECIceBreaker scenario in Greenfoot. Populate the world with a Ship (Icebreaker) and some Icebergs. Edit the Icebergs so that they turn and move randomly. Edit the program code to make the Ship move in the direction of the arrow keys when pressed. Edit the Ship so that it “breaks” an Iceberg when they collide (removes the Iceberg from the world). Add a sound which will play every time the Ship collides with an Iceberg. Add a counter and edit the Ship’s code so that the counter displays how many Icebergs have been broken (removed from the world). Save your completed world as FinaIIceBreaker

2016 Exam Open the WJECChase scenario in Greenfoot. Populate the world with a cat, a mouse hole and at least two mouse objects. Edit the mouse so that mice turn and move randomly. Edit the program code to make the cat move in the direction of the arrow keys when pressed. Edit the cat so that it “catches” a mouse when they collide (removes the mouse from the world). Add a sound which will play every time the cat “catches” a mouse. Add a counter and edit the cat code so that the counter displays how many mice have been caught. Edit the mouse so that it “escapes” from the world if it collides with the mouse hole (removes the mouse from the world). Edit the mouse code and the counter code if necessary so that the counter loses a point (1 point is deducted) if the mouse “escapes”. Save your completed world as FinalWJECChase

From Spec Paper 1 Open the Wombats scenario in Greenfoot. Populate the world with a wombat and some leaves. Check that the scenario is working. Edit the program code to make the wombats turn when the left or right cursor (arrow) keys are pressed so they can move back off the edge of the world. Add a sound which will play every time a wombat eats a leaf. Add a stationary predator to your world which will eat the wombat if they touch and end the game. Add a counter to display how many leaves the wombat has eaten. Save your completed world as Wombatswjec.

From Spec Paper 2 (2016 spec) Populate the world with an athlete, at least two water traps and at least two gates. Edit the gates and water traps so that they turn and move randomly. Edit the program code to make the athlete move at an appropriate speed in the direction of the arrow keys when pressed. Edit the athlete so that it “jumps” a gate when they collide (removes the gate from the world). Add a sound which will play every time the athlete “jumps” a gate. Add a counter and edit the code so that the counter displays how many gates have been “jumped”. Edit the code so that the counter loses a point (1 point is deducted) if the athlete collides with a water trap. Save your completed world as FinalTrain8

Youtube Links Leigh Quince (covers almost all WJEC skills) Daniel Sydes (rushed, but covers all WJEC skills) Mr Gauvain (covers WJEC skills and beyond – links hard to follow) Michael Kölling (Slow but clear explanation of many skills) Jim Stewart (Lots of simpler tutorials) Kevin Rowan (Lots of advanced tutorials) Oracle Academy – (wordy – mostly text based)