The 8-ball Pool End Game
Ian Parberry's "Introduction to Game Physics"
|
This is the Pool End Game, a simple Windows application that uses hand-written physics code based on Euler integration. The aim of the game is to sink the 8-ball while not sinking the cue-ball. In addition to being a minigame that you can actually play, the Pool End Game allows the player to toggle in and out of Step Mode in which the ball advances by 1/30th of a second each time the space bar is pressed and leaves a trail of markers as shown below. Step Mode is intended to help the player visualize the discrete nature of video game time.
The player can also toggle in and out of Collision Mode, which displays yellow circles at the positions of the balls at time of impact with each other and with the rails.
Step Mode and Collision Mode are mutually exclusive, which means that if the player toggles one mode on, then the other mode is switched off.
F1 | Help (this document) |
F2 | Toggle frame rate |
F3 | Toggle step mode |
F4 | Toggle collision mode |
Up arrow | Move cue ball upwards on the base line |
Down arrow | Move cue ball downwards on the base line |
Left arrow | Rotate impulse vector counterclockwise |
Right arrow | Rotate impulse vector clockwise |
Page up | Rotate impulse vector counterclockwise fast |
Page down | Rotate impulse vector clockwise fast |
Space | Fire cue ball/start new game/take step in Step Mode |
PrtScr (hold down) | Save screenshot to a PNG file |
This code uses the LARC Engine and is part of the LARC Code Base.