Difference between revisions of "Greenfoot"

From CompSciWiki
Jump to: navigation, search
m
(Added paddle image)
Line 10: Line 10:
 
== Step 1: Making a New World ==
 
== Step 1: Making a New World ==
 
== Step 2: Adding a Paddle ==
 
== Step 2: Adding a Paddle ==
On the right-hand side, there are two boxes: One under "World classes" called "World" and another under "Actor classes" called "Actor".
+
First, right-click the following image and select Save As... and save it in the folder where you created your Greenfoot program.
 +
 
 +
[[Image:Paddle.gif]]
 +
 
 +
On the right-hand side of your Greenfoot window, there are two boxes: One under "World classes" called "World" and another under "Actor classes" called "Actor".
  
 
Right-Click "Actor" and select "New subclass..."
 
Right-Click "Actor" and select "New subclass..."

Revision as of 11:59, 3 April 2012

COMP 1010 Home > Back to Extra Labs

Introduction

This lab is an introduction to Greenfoot. Greenfoot is an interactive tool for building Java programs using a mixture of programming and interactivity. With Greenfoot, you are able to get a 2D graphic program up and running much faster than you would using regular Java.

To familiarize you with Greenfoot, we will show you how to build a simple Breakout game.

Step 0: Starting a New Scenario

Step 1: Making a New World

Step 2: Adding a Paddle

First, right-click the following image and select Save As... and save it in the folder where you created your Greenfoot program.

Paddle.gif

On the right-hand side of your Greenfoot window, there are two boxes: One under "World classes" called "World" and another under "Actor classes" called "Actor".

Right-Click "Actor" and select "New subclass..."

Name your subclass Paddle by entering it into the New class name textbox.

Step 3: Creating a Bouncing Ball

Step 4: Breakout Needs Bricks

 System.out.println("Hello Greenfoot");