Ghost

Design

PNG Texture Support

Previously, the game used 24 bit BMP images, but they did not support the alpha values needed for some of the transparent textures. The PNG image format was chosen because it supported alpha values and provided good image quality with its lossless data compression. In order to load PNGs, the ‘png.h’ library was used as well as open source code borrowed from PNG Texture Loader by David Henry.

Ghost

HUD

All images used in the HUD were hand-drawn and created in Photoshop CS4 with a pen tablet. The images were then saved as transparent PNGs. The HUD is the last element to be drawn. With the exception of the flashlight (bottom center), the item icons and the battery and health bar decors were drawn with the lighting disabled to achieve the effect of a 2D layer placed on top a 3D environment.

Ghost

Paintings and Windows

All images used in the HUD were hand-drawn and created in Photoshop CS4 with a pen tablet. The images were then saved as transparent PNGs. The HUD is the last element to be drawn. With the exception of the flashlight (bottom center), the item icons and the battery and health bar decors were drawn with the lighting disabled to achieve the effect of a 2D layer placed on top a 3D environment.

Images

The opening, transition, and ending scenes also used animated textures. Like the Windows and Paintings, the frame keys were put in a list in the ordered they should be shown. The one difference is that the frames now have different delay times because there is text for the player to read. Each frame was checked for their delay times in a set of conditionals that determined when frames would change.

Music and Sound Effects

Music and sound effects were set in the conditionals mentioned above. The sounds needed to be timed to the frames. The timing for the frames and sound effects required a lot of adjustments. Trial and error was the main process used to find the most appealing combination of images and sounds. The music was found through internet searches for royalty free music, and sound effects were found at freesound.com. Sound effects for the ghost attacking the player were added to further enchance the feel of the game. This also helped alert the player that they were being attacked. In addition, sound effects ere added to indicate that the player had spooked a ghost after retrieving a collectable item.

Ghost
Ghost
Ghost

Fishbowls

Transparent fishbowls are a big part of Kennedy Library’s second floor, so they have been represented in the game as well. In order to have collision detection work correctly, each wall of the fishbowl is separate. The player needs to walk in and out of the fishbowl so one large bounding box that wraps around the whole fishbowl would prevent the player from entering.

Maps

Two maps are placed on the first floor, and two more are placed on the second floor. The maps are positioned at the front of the second floor and back of the second floor (the “You are here” locations are where the corresponding maps are positioned). From user feedback, one of the most desired features order to keep the players wandering but not too lost, maps were provided.

Life System

A 3 life system was implemented to make the game appear more playable. The player can now have 3 tries to complete the game. If they lose a life, their collected items remain, but they will start over at the beginning of the level the last played.