Student Hazard's Game
This is an example game for the course CS-12GP: Game Programming in Java. The game is about the problems that a student faces taking classes. The game shows interesting student worlds with hazards a student often sees in real life. You, as the student, must avoid the hazards and retain a passing score to make it to the next level. After completing all the levels, you graduate to bigger and better things!
Installing the Game
There are several different ways to install and run the game. Note that you need Java J2SE 5.0 or later installed to run the game.
- To install as a full-screen application, click: Launch the Student Hazard's Game using Java WebStart
(Since this is a digitally signed file, you will need to chose Run or Open with Java WebStart...)- To play as an applet, click: Launch the Student Hazard's Game applet
(Requires Java 6)- To download an executable JAR file that runs using the full screen, click: Download the full screen Student Hazard's JAR file
(For Windows, save to the Desktop and double-click to launch the downloaded JAR file)- To download an executable JAR file that runs in a window, click: Download the windowed Student Hazard's JAR file
(For Windows, save to the Desktop and double-click to launch the downloaded JAR file)Playing the Game
You can use either a keyboard or a mouse to move the player shown here:
To use the mouse, you just move the mouse back and forth and press the left mouse button. The player will move to where your mouse to where your mouse pointer is positioned. To jump, click the right mouse button.
Also, you can use these keyboard controls to play the game:
- A or Left-arrow key: move player left
- D or Right-arrow key: move player right
- Space or Up-arrow key: jump
- Releasing either arrow key stops the player movement
The keyboard has some other game controls as well:
- H key: turn help off or on
- Esc key: exit game
- C key: open the configuration dialog
- F key: turn the frames per second counter off or on
- P key: pause or unpause the game
- S key: start a new game
Scoring and Wining
You start with a score of 100. However, every tick of the clock reduces the score. The goal is to run around looking for power ups to improve your score. You must end the time period with a passing score to move onto the next level. If you do not get a passing grade, then you must repeat the level.
Each world has a number of hazards. If a hazard bites you, then it reduces your score. However, you can jump on top of a hazard to destroy it. Destroying a hazard improves your score.
Ed Parrish
May 20, 2007