Boogy
Jeffrey Lam CPE 471
Introduction
Boogy appears before you at the start of the program and disappears when you flick on the lights. Approaching him will cause him to disappear and reappear in a new location.
Boogy will reappear in random locations in the living room for you to follow him and explore the living room.
This program was build with C++ with GLEW, GLFW, and OpenGL. Non-simple objects were provided by other sources.
Features
Object/Collision Detection
Simple object detection was implemented with distance. Each object has its center coordinates saved, and the radius surrounding it restricts movement through that object.
Lighting
Multiple Lighting Sources
The main source of light comes from either the ceiling or the back right corner (which represents a night-light). The ghost provides additional lighting from its location. Each normal is calculated with each light source's coordinates to increase the brightness of its respective area. For this implementation, the diffusion, specular, and ambience for each lighting source is calculated so that the total lighting can be added together.
Here is the night-light without the ghost and with the ghost.
Distance Attenuation
This lighting effect adds distance as a factor to the calculation of lighting. More information about this can be found here: Light Attenuation Experiment
Controls
Player
- WASD Keys to move forward, backward, and side to side.
- Mouse movement to orient the camera's directions.
- Left click to switch the lights.
- Right click to re-orient the camera upright.
- '4' to transport to the center of the room.
Ghost
- 'O' will toggle the ghost on and off
- IJKL Keys will move the ghost along the X and Z axis
Resources