3-D Hockey Game

Created by Trever McKee

For my final project I created a simple 3-D hockey game.

The models made were simple and looked a lot like minecraft models (simple textured cubes). The main part of the project was the physics simulation.


The camera is controlled using W, A, S, D and the mouse much like program 4. The player is rotated using Z (left) and X (right) and movement occurs using J, K, L I. To shoot the puck press P. All player controls are relative to the way he is currently facing


As the player moves along the ice his motion will slow accordingly, this occurs for the puck as well. Anytime the player or puck hits a wall or other object the players/pucks velocity is reflected along the normal of the obstacle and some velocity is absorbed. These are both important physics operations that occur duing hockey. If the player gets within a certain distance of the puck then the player will "pick up" the puck, meaning that the velocities of both the player and the puck will be equal.

Other information

The player can also shoot pucks at the net using P. If the player scores on the empty net then a goal is counted and the simulation restarts. A message is displayed in the console about the player scoring, and it keeps track of how many times the player has scored. There is no upper limit on number of goals scored, it is just a highscore game.

When the simulation first starts the player will be looking at the far goal motionless. The player will currently have the puck and the simulation will be awaiting input.