Overview
A third-person endless runner game where the player controls Joe Bruin skating through the hallways of Boelter Hall, trying to reach Floor 8. It's inspired by Run and Subway Surfers, with continuous forward motion, a tracking third-person camera, and difficulty that ramps up. It was originally built for CS 174A in Three.js, as part of a 3 person team.
What I Contributed
- The Boelter hallway model — tiled floors, walls, doors, ceiling, basically the environment the whole game runs through
- The segment recycling loop — the heart of the endless hallway effect (below)
- The collision system — coins, obstacles, and boundary enforcement (below)
- Level objectives and progression — the coins required per floor and the advancing to the next floor when they're collected
The Infinite Hallway
The game never generates an infinite hallway, it just recycles five segments on a treadmill. Five hallway pieces are placed along the z-axis, sliding toward the player each frame. When the front segment passes the camera, it's removed and reattached at the back, and and the group is cleared and regenerated with fresh coins and obstacles. Its placement is lane-based with spacing checks, so the run stays visually busy without coins spawning on top of obstacles. This gives us memory and frame time that stay flat while Joe looks to be skating endlessly deeper into the building.
An early version of the shadow generation only reached about the first 10 objects, but enlarging the shadow map fixed it. Reusing the five segment meshes instead of allocating geometry every frame taught us to do the work in simple plain numbers first, and attach Three.js objects last.
Collision Detection
- An invisible box tracks Joe's position at every frame
- For coins, the box is tested against each coin in the active segments. With an intersection, the coin mesh is removed and the score increments
- For obstacles, the box is tested against each obstacle's computed bounding box. Any hit costs one out of the given five lives and starts a 2-second invulnerability window, demonstrated by a blinking Joe
- Boundary enforcement keeps Joe from walking through walls or dropping through the floor
Rest Of The Game
One of my teammates handled level design, theming, UI, obstacles, difficulty curves, input, movement, and the Joe Bruin character. The other handled the scene, camera and camera tracking, lighting, audio, and the 3D coin model.
Why It Mattered
I took this computer graphics elective out of pure curiosity, wanting to get an understanding of baseline 3D graphics techniques and what happens mathematically at the foundational level. My teammates and I had the opportunity to apply and provide a whimsical twist to a classic endless runner concept. Never hurts to learn what else you can apply your brain to!