Greenfoot

From CompSciWiki
Revision as of 11:44, 3 April 2012 by AndrewS (Talk | contribs)

Jump to: navigation, search

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

On the right-hand side, 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");