Maze!!!

David Nussbaum

CPE471 Winter 2011

Overview


Maze!!! is a 3D maze game that takes a text file with 10 to 50 characters per column and row. The user can interactly explore the maze to find the goal marker of a thumbs up sign.

Controls


The following keys are used to control the character:

Concepts


Custom Maps

Solving labyrinths like this would not be very fun, if you limited choice. So I developed a simple file format that would be able to generate maps of varying size into the world. In a labyrinth file, the characters have each their representation in the world:

Collision Detection

In a labyrinth, collision detection is very important, because the walls represent actual physical barriers. Because of the nature of the representation of the maze, collision detection can be position-based instead of purely geometric sphere-plane collision.  All collisions were calculated by looking at where a movement plus a buffer would take the player, if it would be in a wall.  This buffer is meant to prevent the camera from moving to close to the wall and allow see through it.  To allow fluid movement against walls, all types of movements separately check the x and z movement components for collisions.

With the ability to jump came the need to check for collision with the ground and the ceiling.  To make matters more difficult, the maze has two different types of elements with different ground heights.  To make jumping look natural, the location of the player was calculated based on a sine wave.  In collision with the ground, the collision would be check, if both the height of a player was equal to the ground at the current spot and past 90 degrees or the climax.  With different heights came the need to check if you were at the appropriate height to allow movement. In the case going from the higher to lower heights came the need to be able to fall far enough away that it would not interfere with other collision detections and but not fall through.

Lighting

For lighting, the light is set always as the current position as the player.  To make the labyrinth more mysterious and to simulate reality, the amount of light decreases with distance from the light source.

Texture Mapping:

The textures were placed on all objects within the world.  I found these textures through the use of Photoshop and looking for texture ideas on the web.  In addition, all objects have normal maps placed on them to make objects look more realistic.  On the fences, an alpha map was applied to allow only the fences to show up and not show white space in the fence.

References

CSC471 lecture notes and slides