The 8-ball Pool End Game
Ian Parberry's "Introduction to Game Physics"
The 8-ball Pool End Game

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.

Step Mode after the space bar has been depressed about 16 times.

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.

Collision Mode.

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.

Keyboard Controls

Key
Action
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

The LARC Engine

This code uses the LARC Engine and is part of the LARC Code Base.