CMP 161 -- Programming Assignment 3
Due date:
10:00am, THU, 3/16/2006
Objectives:
Learn about real-time 3d video games by implementing a simple game involving all of the follwoing aspects:
- low-level mechanics (physical simulation of motion)
- high-level rules (scoring, goals)
- input (intuitive mapping of mouse and keyboard events to game actions, no more scanf/cin!)
- output (intuitive picture and sound representation of game state, no output files or console text)
Project Resources:
Feed the TA if he is still hungry!
Useful Links:
To Do:
-
Create a game where the player tries to roll a ball
on a board into a hole by tilting the board one way or the other.
You can assume that there's only one ball at a time,
and there's only one hole on the board.
-
Typically, the board has a simple maze on it,
but could also be played without the maze.
-
For development purposes, you may want to support a few pre-built mazes.
The simplest one is a rectangular board with no additional walls other
than the 4 bounding walls. The width of the rectangle just fits the
diameter of the ball to constrain its movement simply along the length
of the rectangle. Tilting the board along that dimension will cause
the ball to roll into the hole at the far end of that rectangle.
This is a nice easy test to see if
(a) your ball does not penetrate walls and floors, and
(b) your game knows about the hole, and knows that it has fallen through the hole.
-
You can also check if the ball is rolling or simply sliding by adding
a
texture map onto the ball.
-
Next, expand the rectangular area to a square area.
Position the hole near one of the corners.
This is good for testing the 2D tilt on the board.
Easy way to do this is map to tilt to mouse motion.
Moving left means you're tilting the board so that left side is lower than right side --
cause the ball to roll left, etc.
-
After that, you can put the hole in the center of the board --
makes the game harder.
-
Add other mazes and make the game more interesting.
-
"Required" Items:
- low-level mechanics: More than one board must be playable in your game (no hardcoding a single world).
- low-level mechanics: The ball should appear to roll smoothly and not penetrate obstacles.
- high-level rules: The user should get some feedback for completing or failing the maze by detecting when the ball fall through the goal hole or a timer expires.
- input: Allow user to tilt the board with both the mouse and the keyboard.
- input: Additionally, the user should be able to change camera modes between an overhead and ball-following mode.
- output: The graphical display should clearly display the game state and at least one sound should be played in response to game events (collision/goal/etc.).
-
Optional/bonus items of varying difficulty:
-
Allow user to change mass of ball (or friction of floor)
to make the ball more (or less) reactive to tilting.
-
Add different sounds e.g. rolling, bouncing, scoring.
-
Allow the user to graphically move the ball to a different
starting position; same thing for the hole.
Make sure the new positions are valid i.e. not in the middle
of a wall, outside the board, etc.
-
Add multiple balls and/or holes.
Balls could also collide with each other.
-
Others? .... Destructible level?
-
Other game possibilties: (see notes for some ideas)
- Before starting starting to code get your idea cleared with Adam (15 second conversation).
- Be prepared to explain how the equivalent of each of the above requirements will be met in your individual game.
- This project must be different than your final proposed final project. It's OK if your game project experiments with the same idea or mechanics but the final project must still have a final-projects-worth of work in it.
Items To Submit:
Your submission should be able to be played by anyone with a windows machine who downloads it.
Additionally, for interested users (and for grading purposes) the source should be included.
BEFORE you submit: remove all code that isn't important to your program!
This means getting rid of the spinny transparent cube, the soft screen mask example,
the 'reset' user event (if you don't use it), any references to and use of extra media
(unit circle). Also, remove any per-frame or per-collision printing from the console.
It is OK if the program prints any welcome, instruction, or game-related-status messages
to the console but it should not have any debugging stuff when you submit. Remove any comments
that say // TODO: something
as you should have either done what they suggested
or decided that your program won't use that aspect of the example code.
Test your package by unzipping it into an empty directory to make sure you have everything it needs to run!
< username-prog3.zip >
Source files:
game.cpp
game.h
Executable:
game.exe
Libraries:
glut23.dll
jpeg.dll
libpng13.dll
ode.dll
SDL.dll
SDL_mixer.dll
SDL_image.dll
zlib1.dll
Media:
textures (.png)
audio (.ogg)
Documentation:
README
name
email
brief description of game
how does input affect the game? ("WASD+arrowkeys move ball")
what do any status displays on the screen mean? ("the green bar is health, red is timer")
when does the game world create sound? ("collisions and losing trigger a sound")
what are the mechanics of the game? ("realistic ball-rolling-on-table-motion")
what are the rules of the game? ("falling off the table loses the game, user tries to stay alive for as long as possible")
attributions for anything you didn't create
textures, sounds, libraries
prog3.html
html-ify your README and add some screenshots
Grading:
This program nominally accounts for 6% of your final grade. Include a README in your
submission as to which platform to use. By the way, if you're doing your development
on PC's, you should be able to recompile your fltk/opengl code on the suns with little
or no modifications to your source. Programs turned in at least a full day early will
earn 1% bonus credit. Late programs will be charged 1% late points. In addition,
late programs will not be accepted 24 hours past due date.
Late programs and reports will not be accepted for the final project.
The bonus credits may be accumulated up to a total of 50% toward program and
final project credits.
Programs are graded 80% for functionality and correctness and 20% for style,
readability, documentation/writeup, and efficiency.
Additional points may also be earned for extra features.
Submission:
-
To submit use: submit cmps161-ap.w06 prog3 username-prog3.zip
-
To verify submission use: peek cmps161-ap.w06 prog3
These commands should work from any cats machine, but if there is a problem
try from unix.ic.
Last modified
Tuesday, 22-Jan-2019 09:42:15 PST.