I wrote this simple engine as the final project for my Introduction to Computer Graphics course. The objective of the project was to create an explorable maze-like environment and demonstrate the effects of lighting and texturing.
The user can move the camera with the W, A, S, D keys, can turn a flashlight on and off with the F key, and can place one of the three colored lights at his current position with the E key. The user can also use the C key to toggle an "insanity" feature that warps the entire scene.
The user can place up to three lights in the world, each of which has a different color and is represented by a small, transparent sphere.
The user is able to toggle a spotlight-shaped flashlight that attenuates towards the edges. A battery meter at the top shows how much flashlight power is remaining.
Using the W, A, S, D keys, the user can navigate the dungeon. The dungeon layout is defined using a 2D array and collision detection prevents the user from walking through walls.
The walls, floor, and ceiling of the dungeon use different textures, each with separate coefficients for diffuse and specular reflection.
Multitexturing is implemented to allow textures to be swapped out when exposed to lights of different colors.
The user can toggle an "insanity" feature that warps the view by altering the perspective matrix over time, essentially shrinking and enlarging the camera's field of view.