Haunted Mine

Haunted Mine, a game for the 'viewpoint' assignment by Jeff Carlson. Code help: cplusplus.com, gpwiki.org, "C++ In A Nutshell" (O'Reilly Media, Inc., 2003 ed.), Introduction to Ray Tracing, Chapter 2, others as indicated in code comments. Textures: 1, 2. Random bothering about C++ nuances: Dmitry Portnoy, Owen Durni. Testing: Owen Durni.

Goal

Target stationary objects in 3D while "on rails" (forced player movement).

Method

I spent quite a bit of time getting the coordinate system, player movement, and free-look systems to work correctly and naturally. Next, I made a basic lighting effect that simulated a flashlight. I then wrote a basic Rock class that allowed me to quickly place many objects in the scene. Finally, I developed the collision detection mechanic and tweaked the scene to deliver some actual gameplay.

My original idea was to have "ghosts" (floating textured boxes) fly at the player, who would have to defend using the flashlight. However, the stationary boxes makes the game a bit more contemplative, as strategies can be developed for hitting multiple boxes at once (due to the "feature" of no occlusion).

Novelty

The only subset of games that requires players to focus on targets while the player is forced to move, and the target is not, is the arcade rail-shooter (as far as I know). This game differs from the rail-shooter in that it is much slower paced, and the player is in no risk of dying. The tradeoff where larger cubes are easier to target, but take longer to crack, forces players to think about where to best spend their limited time, given where the rails will take them next.

Results

As mentioned above, the game is surprisingly contemplative, and the pace of the game differs drastically from my previous two games. Even with the minimalistic graphics, the flashlight adds some excitement, as the player must keep mental images of parts of the scene that are not illuminated, or that are hidden behind large rocks. Elements of randomness seem to be balanced here; the only major flaw is when rocks are fully contained inside other rocks, which the player can't see.

The game obviously needs refinement; perhaps some cave backgrounds, and some ghostly images for more continuity with the backstory. A more interesting rail pattern, and more varied objects, would also add to the game's atmosphere. Unfortunately, the author cannot devote as much time as he would like to every week's game.