P4Games at Montbello
Game State Step 1
Submitted by leut on Tue, 07/01/2008 - 13:40.Create a simple game with one keyboard-controlled sprite and one object to capture. The win condition is the player must move their sprite into the other object. When the player hits the other object they win. Make this game have a splash screen, a win screen, and a lose screen. The transition between these screens is to be controlled by the world class variable "gameState" and the code to make the transitions should be found in the World's act( ) method. See game7 for example code.
Assignments
Submitted by leut on Tue, 07/01/2008 - 13:17.Here is a list of programming assignments.
- GameState Step1. Goal: to learn how to write the code that drives game state changes.
- GameState Step2. Goal: to learn how to write the code that drives game state changes.
- Animation. Goal: to learn how to support multiple levels with game states.
Scenario Examples
Submitted by leut on Thu, 06/26/2008 - 18:50.Programming Text (2008)
Submitted by leut on Thu, 06/26/2008 - 18:37.This page has (will have) all the programming chapters attached.
Text Object Class
Submitted by malbow on Tue, 05/13/2008 - 05:07.import greenfoot.*; // (World, Actor, GreenfootImage, and Greenfoot)
//Added to allow text...
import java.awt.*;
/**
* Write a description of class EndGameScreen here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class TextObject extends Actor
{
private int length;
private String currentText ;
public TextObject(String text)
{
// setImage("rect.png") ;
// getImage().scale(55,25) ;
int fontSize = 14;
Book08
Submitted by leut on Sun, 05/04/2008 - 14:49.The latest version of the book.
Here are links to some sample video tutorials. Note, they are referenced in the
yellow boxes in chapter 1 of the book. Chapter 1 is attached in .doc format.
