Breakout 3D

Try playing the game breakout installed on our Linux machines to get an idea of basic game play. We will be building a three dimensional version of this game.

The goals of this assignment are:

  1. Work with cameras, geometry and lighting in Ogre.
  2. Construct a scene in 3D space.
  3. Implement user interaction.
  4. Use scene queries to implement collisions of objects.
  5. Create a GUI for your game.
  6. Create a complete game.

If you have a game idea that fulfills the goals above, you may propose it as a replacement for this game, but I will expect a "Milestone" schedule similar to this project.


Phase 1: The Court

Implement the createScene method of your game. Create a court for your game with 6 walls. You will want to have the walls face inward since your camera view will be looking into the box created by them. The wall facing closest to you will only be visible from above, but you will want it for collisions with the ball.

We used a plane to create the kind of surface you will need in the OgreTutorial project. The OgreInput2 project provides an example of buffered input as well as a way to disable camera motion from keys and the mouse.

The images on this page contain two view ports each with a different view of the same scene. You may or may not choose to implement this.

Experiment with materials. Ogre uses scripts loaded at run-time to describe materials. You can find these scripts within the media directory of the Ogre installation. On our Linux machines look in /usr/local/share/OGRE/Media. The names of different materials can be found within the material scripts. Some materials are meant to be mapped onto complex objects (such as the robot) and look strange when stretched out across a plane.

I have also provided some of my own materials in http://cs.gettysburg.edu/~cpresser/cs391/examples/materials/. The script "MyMaterials.material" contains some basic solid and translucent colors. You may copy them to your own project and edit them freely.


Phase 2: The Paddle

Create a paddle using a cube mesh. Allow the user to move the cube around using the keyboard (or mouse). Make sure the paddle stops at the edges of the court. You should encapsulate the code for a paddle object into a class and call methods of the class when the paddle needs to be moved or updated.


Phase 3: The Ball

Create a ball that moves up and down the court. The ball should bounce off of the walls when it collides with them and should bounce off of the paddle. If it misses, the ball should reset in the court. Implement some way to launch the ball at the start of the game and when it gets reset.

We will use Scene Queries to manage collisions.


Phase 4: The Obstacles

Create obstacle objects in your court. When the ball runs into an obstacle it should bounce off and remove (or hide) the obstacle. You can simply implement them as cubes, or load other meshes. We will be doing simple collisions (planes, boxes and spheres) complex models may behave strangely.


Phase 5: Graphical User Interface

Build a graphical user interface using CEGUI. Display the score, number of balls remaining and any additional information required of your game.


Phase 6: The Complete Game

Keep score in your game. How a player accumulates (or loses) points is up to you.

Implement a way of losing the game. Limit the number of attempts a player has to play. There is nothing keeping you from implementing "1 up" or other bonuses.

Use your HighScore class to track and save game scores. Use the GUI to display the scores at some point.

Breakout 3D screen shot


Milestones

Phase 1 and 2 due in class Tuesday 2/24
Phase 3 and 4 due in class Tuesday 3/3
Phase 5 and 6 due in class Tuesday 3/24


Grading

This project is worth 200 points broken up as follows:

Category Points Description
Phases 1 and 2 milestone 20 A demonstration showing your court and operational paddle.
Phase 3 milestone 15 A demonstration showing your ball movement in the scene and its interaction with the paddle.
Phase 4 milestone 15 A demonstration showing your ball interacting with blocks/obstacles in the scene
Code Organization 25 Create appropriate classes and objects for your implementation. Your game should NOT be entirely implemented in the createScene and frameRenderingQueued methods.
Follows specifications 75 The game runs more or less as described. You may make modifications in the specifications in order to satisfy the functionality and creativity portion of the assignments.
Functionality 25 Include some additional features in your game: moving targets, "power ups" etc.
Creativity 25 Add your own style to the game. You might want to experiment with your own material scripts and textures.


Submission

The first milestones I would like to see running in class on the day they are due, you do not have to submit anything. For the final deadline, turn in all of your source files as well as an other files you created or edited to build this project. You must also include a README containing instructions for playing the game as well as descriptions of what you did for the functionality and creativity portions of the project.


Other Options

Please get approval from me if you wish to pursue one of the options below.