• Pool
  • Othello
  • Mastermind
  • JavaHouse
  • Amazon
  • Asteroids
  • Mario
  • ATC
  • Soy

Pool (Chris Wetzel '03)
Pool Source Code (.html)
Pool Game (Windows .exe)

This project was written in C++ and was compiled as a Windows .exe using the CMU Graphics Package. You can download the .exe and double click to run the program (in Windows). Physics equations (Law of Conservation of Momentum and Frictional Force models) were used to calculate the velocity of each ball before and after the collisions as a function of time.

Othello


Othello (Tyrone Cheng '04)
Othello.zip

Once the project is open, you can run the program with either the 2 player mode (Othello_2P) or 1 player (Othello_CPU). Right clicking on either will run the corresponding program. Othello

Othello






Mastermind (Kenny White '05)
MastermindProject.zip

Right click on the "Mastermind" class to start the game.
Mastermind

Mastermind


JavaHouse (Bijan Beglari, Matt Newsom, Luis De La Torre,
Ayinde Armour (graphics), George Villalobos (graphics) '08)

JavaHouseProject.zip

JavaHouse

JavaHouse


Amazon Rainforest (Lew '08)
Amazon.zip

This GridWorld project simulates an Amazon rainforest ecosystem. The simulation includes three subclasses of Critters: a Fly, and Bird, and an Agouti (a type of rodent). Other types of "Actors" in the simulation are a Larvae, a Seed, a Nut, a Tree, and a VenusFlyTrap, all of which are subclasses of the Actor class. The basic interaction of the ecosystem is as follows:

1. Flys lay Larvae which turn into a Fly in five steps
2. VenusFlyTraps eat Flies
3. Tree drop Nuts and Flies can "rest" in Trees (in an ArrayList)
4. Agoutis eat Nuts
5. Agoutis drops Seeds
6. Birds eat Seeds

Asteroids


GridWorld Asteroids (Sam Ordonia '09 / Alex Aristov '09)
Asteroids.zip

Asteroids



This is a post-AP GridWorld project which uses multi-threading to play music (.wav files) while the game is being played. Here are some details/features of the project:

  a) To move: "a" = left, "d" = right, spacebar = "shoot", "f" = megashoot

Some interesting features:
Feature 1: Asteroid, Ship and Boolet (aka bullet) extend Critter.
Feature 2: Galaxy extends ActorWorld.
Feature 3: Threads are used to play music in background so game can run "uninterrupted".
Feature 4: A second JFrame accepts keystrokes to control your ship.
Feature 5: The "AeWavePlay.java" file is third party code that my students integrated into the GW Asteroid project.


GridWorld Mario (Cameron Mott '10 )
MarioGame.zip

Mario

Mario



This is a GridWorld-based project that simulates the game MarioBros. It includes a simple form of "gravity" to bring Mario back to the earth as well as simple "message-sending" method to display status with the GridWorld board. Here are some details/features of the project:

a) Run "main" in the "Controller" class to start game
b) The keystrokes for moving are: "A" for left, "W" for jump, and "D" for right

Some interesting features:
Feature 1: The methods that were overridden in Mario from "Critter" were getActors(), selectMoveLocation(), and makeMove().

Feature 2: "Gravity" was implemented for each actor in the grid except for blocks and Power Flowers. A good example of the gravity is in Mario's makeMove() method and starts in line 143.

Feature 3: To get "scrolling" to work I used two methods in the Controller class, resetLevel() and setLevel(). The resetLevel() method clears the board of all actors and then adds a basic row of two blocks to the bottom. The setLevel() method adds different actors according to the level number. It scrolls each time that Mario is located in the far right column. This occurs in line 494 of the setLevel() method.

Feature 4: In the SuperMarioWorld class in step() I added a line of code that uses the setMessage() method to constantly update the score and the number of lives (located at line 67)


GridWorld AirTrafficController (Daniel Noe '10 )
ATC10.zip
ATC
ATC
UML



This is a post-AP GridWorld project that alters the functionality of the GridWorld "board". One features is the ability to click directly on the "grid" to control objects as the game is being played. Gridlines can also be removed from the board...see "Feature 3" below.

a) The game can be started through the ATCRunner class.

b) The object of the game is to land the planes on either side of the runway all the while avoiding other planes, mountains, birds, trees, and the air traffic controller tower.

c) Clicking on a plane changes its direction by 90 degrees counter-clockwise.

Some interesting features:
Feature 1: All of the GridWorld files were imported into project. Note that the headers of these imported GridWorld classes must be edited to remove references to the gridworld.jar file. If you do not remove the references, BlueJ will not see the changes you make in the GUI .java files that you explicitly pull into the project.

Feature 2: The mouse has been enabled while the game is running. This was done by editing the file GUIController.java at line 211-213. The "Step", "Run" and "Stop" buttons can also be edited in GUIController.java

Feature 3: The gridlines can be removed by editing GridPanel.java at line 110.

Feature 4: Planes have a Traffic Collision Avoidance System which puts a red border around the plane if it gets too close to another plane.

Feature 5: An image pops up when a plane crashes into mountains, flocks of birds, other planes, or a tree.


Soy (Jeff Butterfield '10 )
Soy.zip
SoyScreenShot SoyUML

§¤¥ (or Soy) is a project that mimics the format of popular internet games like Collapse. An interactive GUI allows for players to click clusters certain bricks to remove them from a board. This is NOT a GridWorld Project but makes the GridWorld page because of it is "griddish" quality. The graphics were implemented using the standard Java library instead of the GridWorld interface. Mouse actionListeners were implemented to capture mouse clicks directly on the board.

a) Select bluej file in .zip folder and run the main method in SoyDriver class.

b) After a splash screen appears, press Start to begin playing or About for information on the project.

c) How to Play: Score points by clicking clusters of 3 or more adjacent bricks of the same color. When clicked, these groups are removed from the board and the other blocks “collapse” to fill the empty space. Your score determines your level and the speed of added bricks. (Soy bricks, labeled with §, ¤, or ¥, remove ALL bricks of a certain color.)

Some interesting features:
Feature 1: GUI environment created by repainting JLabels (each containing ImageIcons) onto a JPanel after every change on the screen (eg. after bricks are removed, after score changes). All graphics are homemade.

Feature 2: A Swing Timer class adds bricks to the grid after a specific interval of milliseconds (the interval becomes smaller/faster as the level number increases). A second Swing Timer also prints the grid rapidly after the score is increased to visually show an increase in score.

Feature 3: The game’s collapse logic checks the neighbors of a clicked brick and stores each neighbor matching the original brick’s color in an ArrayList. The same checking method is recursively called on each of the bricks in that ArrayList to find those more matching neighbors. Once all neighbors of the same color have been found (and if there are at least 3 in total), they are removed.

Feature 4: The bricks are vertically and horizontally “consolidated” after every removal (ie. bricks with space below them drop until they hit another brick or hit the ground; empty columns are filled by sliding columns to the left)

Feature 5: Level 7 is the highest level. 25 bricks are added to board each second. The score and level labels flash rapidly in different colors while playing this level.
* AP is a registered trademark of the College Board
2007-2013 Michael Lew
projectsAPCS