BEWARE!!! In this spooky maze game, you must find your crystals eight before the pawns hunt you down!
Created by Ethan Heffan
About the Project
This game was created for my Computer Graphics course. We were tasked with creating a 3D world using nothing but the low-level WebGL rendering API. Instead of making a simple 3D space, I decided to ambitiously create a game with objectives, an end state, and everything. But since this wasn't a sophisticated game engine, I had to understand how low-level features were built that I'd otherwise taken for granted. My game would be a first-person maze game about finding shiny gems whilst being chased by spooky giant pawns, which meant I had to create several systems.
For the player, it meant I had to implement the connected concepts of jumping, gravity, floor collisions, and, by far the most challenging one, wall collisions. The simplest method for the walls was doing AABB collision checking on the anticipated player movement and denying it if a collision would occur, however this meant if players barely contacted a corner or a wall, they'd entirely stop, which is very disorienting and could lead to catastrophic moments while running away from enemies. So, instead I made it so the predicted movement vector would be truncated up to the collision point which involved much more complicated calculations.
For rendering, I had to calculate or sometimes manually write-in the vertices, UVs, and normals for several primitive shapes, then write custom shaders to calculate the diffuse, ambient, and specular values that worked for each shapes unique surfaces.
Then for the enemies, I had to maintain an abstract grid containing walls, enemies, and the player, and use A* for pathfinding around it. But the trickiest element was definitely the keyframe animation. Rather than pieces simply sliding, I wanted them to jump like a pawn would which meant smoothly interpolating between several keyframes points in a given animation timeframe and ensuring that movement is also tracked in the form of the enemy's current position.
Because of my ambition, even amongst my unusually high achieving class, my game tied for 2nd favorite project in a class-wide vote between 100+ students, and is now memorialized on the class's "Hall of Fame" for future students to enjoy. This project was expanded upon in the sequel Spooky Chess.