Teaching with Greenfoot

Slides:



Advertisements
Similar presentations
In this tutorial, we are going to create: A race car that the user can control with the arrow keys for direction and speed. A simulated road with a striped.
Advertisements

BPEL Development with ActiveBPEL Brendan Tansey. What is BPEL? Business Process Execution Language for Web Services (BPEL4WS) Web service orchestration.
Windows XP Basics OVERVIEW Next.
of Kent A practical introduction to Greenfoot David Barnes Lecturer in Computer Science University of.
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
1 CS 106, Winter 2009 Class 4, Section 4 Slides by: Dr. Cynthia A. Brown, Instructor section 4: Dr. Herbert G. Mayer,
CS320n – Elements of Visual Programming Introduction to Alice Mike Scott (Slides 1-1)
Computer Science - I Course Introduction Computer Science Department Boston College Hao Jiang.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Pencilvania: Architecture Review Presenters: Christopher Buska (Art Director) Michael Gourlay (Developer) Alfred Sterphone, III (Project Manager) Special.
CPSC 371/872 UML / SysML Modeling J. YATES MONTEITH, CLEMSON UNIVERSITY, FALL 2014.
Computer Science - I Course Introduction Computer Science Department Boston College Hao Jiang.
CSCI-383 Object-Oriented Programming & Design Lecture 15.
INTRODUCTION TO SCRATCH. About Me Resources Scratch Website Learn Scratch Washington-Lee Computer.
Games and Simulations O-O Programming in Java The Walker School
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Comparing Python and Visual Basic
Platforms for Learning in Computer Science July 28, 2005.
Chapter Introduction to Computers and Programming 1.
INTRODUCTION TO THE SCRATCH PROGRAMMING ENVIRONMENT.
CW-V1 SDD 0201 Principals of Software Design and Development Introduction to Programming Languages.
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
Week 4-5 Java Programming. Loops What is a loop? Loop is code that repeats itself a certain number of times There are two types of loops: For loop Used.
Chapter 3 Working with Symbols and Interactivity.
Tux Paint Reviewed by team iTeach Jodi Hovest, Scottie Fetters, & Melanie Stainbrook.
Creative Commons Attribution 3.0 creativecommons.org/licenses/by/3.0 Key Abstractions in Game Maker Foundations of Interactive Game Design Prof. Jim Whitehead.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
GREENFOOT CLUB RESOURCES Brian Cullen – Rossett School
FUNDAMENTALS OF PROGRAMMING SM1204 SEMESTER A 2012.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
YourClassPage.com TM Inservice Quickstart Guide Getting YOUR classpage up and running!
IE 411/511: Visual Programming for Industrial Applications
Introduction to Alice Alice is named in honor of Lewis Carroll’s Alice in Wonderland.
A Spring 2005 CS 426 Senior Project By Group 15 John Studebaker, Justin Gerthoffer, David Colborne CSE Dept., University of Nevada, Reno Advisors (CSE.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
Se Over the past decade, there has been an increased interest in providing new environments for teaching children about computer programming. This has.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Visual C++ Programming: Concepts and Projects
Objected Oriented Programming & Design JAVA Shishir Gupta (704) (704)
Java is an object oriented programming language In this model of programming all entities are objects that have methods and fields Methods perform tasks.
Sample Video Game & Sound. The Plan 1.Game Theme 2.Game Structure 3.Sprites 4.Trackers 5.Collisions 6.Score 7.Levels 8.Splash Screens 9.Design 10.Implementation.
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
C++ and Ubuntu Linux Review and Practice CS 244 Brent M. Dingle, Ph.D. Game Design and Development Program Department of Mathematics, Statistics, and.
Game Maker – Getting Started What is Game Maker?.
Middle School Grades 6-8 Advanced Features of Inspiration.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Lesson 6 – Libraries & APIs Libraries & APIs. Objective: We will explore how to take advantage of the huge number of pre-made classes provided with Java.
Introduction to OOP in VB.NET using Robots ACSE Conference, Nov 2004 Michael Devoy Monsignor Doyle C.S.S., Cambridge
Introduction To Greenfoot
Motivates, interests and engages. Teaches problem solving skills. Allows for creativity and imagination. Demonstrates project design. Encourages teamwork.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
11 Computers, C#, XNA, and You Session 1.1. Session Overview  Find out what computers are all about ...and what makes a great programmer  Discover.
Using Greenfoot and a Moon Scenario to Teach Java Programming in CS1 Randy J. Gallant Randy J. Gallant& Dr. Qusay Mahmoud ACMSE 2008.
Greenfoot Workshop Bobby - Snake.
Chapter 1: Introduction to Computers and Programming.
The Stingray Example Program CMT3311. Stingray - an example 2D game May be useful as a simple case study Most 2D games need to solve generic problems.
CSCI 383 Object-Oriented Programming & Design Lecture 15 Martin van Bommel.
Introduction to CSCI 1311 Dr. Mark C. Lewis
Chapter 4 - Finishing the Crab Game
Reference: Object Oriented Design and Programming (Horstmann)
Object-Orientated Programming
Concepts of Object Oriented Programming
Chapter 8: More About OOP and GUIs
Game Engines By James Tedder.
Teaching Computing to GCSE
Unit 20 Software Part 2.
Game Loop Update & Draw.
Presentation transcript:

Teaching with Greenfoot For teachers of ICS3U/4u

NOTE TO TEACHERS Everything you see here (these slides, code samples, programs) are on your complimentary USB drive.

Agenda Intro – What is Greenfoot (5 minutes) Greenfoot Basics – (15 minutes) First look at Greenfoot – Creating a World and Actors Basic Concept Demo Important Elements of a good scenario Hands On Part 1 (20 minutes) Create your World, your Actor and create movement Collision Detection Tutorial (10 minutes) Detect Objects colliding and triggering events Adding Sound Hands On Part 2 (remaining time…)

What is greenfoot? Greenfoot is: A simple yet useful Java IDE similar to BlueJ An easy-to-use 2D graphics engine An object based programming tool that allows for easy demonstration and instruction of object oriented programming through visual examples Easy to learn for any experienced Java programmer

Why Greenfoot? Java is a great academic language – it’s strict structure and object oriented nature makes it ideal for UCS3U/4U However, Java has an antiquated, tedious set of graphics commands. Students quickly tire of text-only programming in Java, and often struggle with Java’s built in graphics Greenfoot provides an easier approach to creating games and visual simulations

Getting started Greenfoot is available for Mac OSX, Windows and Linux – (Java must be installed) Can easily be installed by your TST If it is not possible to have it installed, there is a Windows-only “Greenfoot on a Stick” version that can be run from a USB key – which is what we will be working with today

Pros and cons PROS CONS Easy to start programming games and simulations complete with 2D graphics and sound Mouse support Extensible with the full Java programming language Makes for fun tasks and assignments Effective way to teach and demonstrate OOP Poor support for text(although you can use the System console) No 3D Ultimately limited to games of moderate complexity Must use included IDE

Some additional benefits Good for teaching Linked Lists – some Greenfoot methods return a linked list of objects Useful for teaching inheritance – all sub-classes of Actors can be further inherited from, leaving the potential to create and use different super classes to good effect Grade 11 students can usually have basic functionality of some sort working within 1 period Module available for XBox360 Kinect module – It is possible to use Greenfoot to program for body motion capture! (although I haven’t tried…)

Greenfoot Resources The development staff of Greenfoot is active in creating a plethora of resources on an on-going basis, including: The Greenroom – Discussion forum and resources for teachers, requires registration from teacher email address - http://greenroom.greenfoot.org/ Numerous online resources for learning Greenfoot - http://www.greenfoot.org/doc Scenario (and code) sharing - http://www.greenfoot.org/scenarios Discussion Forum for students – http://www.greenfoot.org/topics And more…

First look at Greenfoot IDE, Actor and World creation Tutorial

Actor All objects that will move within the game world should be sub-classes of Actor (It is possible to create non-Actor classes within Greenfoot – useful for advanced projects) You can declare abstract sub-classes of Actor and then create sub-sub-classes – useful for creating related types of objects (I.e. different enemies in a game)

World Your program begins by you creating a sub-class of World – defining your own game world Typically, the World will own the Actors. Includes a number of global variables – world size, act() order, state of execution (is the game currently running), etc.

Persistent Actors In many programs, you will want to keep a permanent reference to your Actors This is best accomplished by defining your Actors within the constructor of your World class Your World can contain methods that allow Actors to communicate

Persistent Actor DEMo

The “main” method No main() method in Greenfoot The scenarios are run in “acts” where the act() method of every class gets called once per frame Use your World (the class you created which inherits from World, not World itself) as you would a main method. You can add an act() method to your World (and you should!)

Building your World Some things that you should consider for your World: setPaintOrder() – allows you to control which Actors are displayed on top and which will appear behind setActOrder() – set the order in which classes’ act() methods get called in each act. Store permanent references to Actors which you will need to manage later Instance variables for your data and for program flow

Your first game! Frogger Game! Little Frogger must cross the road without getting smushed Example solutions (basic and advanced) on your USB key

Process Part 1 – Create the basic objects A World with a background image A little Frogger Actor that takes input from the keyboard Cars (or other Enemies) (Actors) that cross the road and threaten to kill our poor frog! Part 2 – Add collision detection and associated actions Part 3 – Finishing Touches, polish, as time allows Sounds Displaying Text (score, level, etc)

Various Resources Greenfoot on a Stick – Greenfoot and all associated Java libraries, runnable off of a USB key Paint.net – best free paint program I’ve been able to find. Does transparency. Frogger! (my 3-4 hours of coding version) A few other scenarios