Idea · Oct 11, 2026

Build Your Own BSP Level Renderer

A staged assignment in which students write a browser renderer for real Quake 1 shareware maps: parse the BSP file, walk the tree front to back, cull with the PVS, and texture surfaces with lightmaps, all on a software framebuffer before optionally porting to WebGL.

What it would do

Quake's level format is a compact tour of core CS: binary parsing, binary space partitioning trees, visibility sets compressed with run-length encoding, and perspective-correct texture mapping. Over five milestones students (1) parse the BSP lumps from the freely distributed shareware pak0.pak and draw a wireframe, (2) traverse the BSP tree to find the camera's leaf and render faces front to back, (3) decompress the potentially visible set and measure how much it culls, (4) rasterize textured, lightmapped polygons into a canvas ImageData buffer, and (5) add collision against the clip hulls so a player can walk the level. Each milestone ships with a reference screenshot set and an automated test harness that compares frame hashes and face counts from fixed camera poses, so grading is mostly mechanical. A stretch milestone ports the rasterizer to WebGL and compares frame times.

Key features

  • Binary lump parser for vertices, edges, faces, nodes, leaves, textures and lightmaps
  • Front-to-back BSP traversal with camera-leaf lookup
  • RLE-compressed PVS decoding with a culling statistics overlay
  • Software rasterizer with perspective-correct texturing and lightmap blending
  • Clip-hull collision and walkable first-person camera, plus an autograder comparing frames from fixed poses

More in Graphics & Simulation

Build Your Own Micropolis

A staged assignment where students build a SimCity-style city simulator from scratch: zoning grid, power-network flood fill, traffic pathfinding, diffusion-based land value and pollution, and a growth model that ties them together.

Graphics & SimulationClass assignmentLargeOct 7, 2026

Orbit Crowd Lab

Students render hundreds of thousands of real asteroids orbiting the Sun in the browser, starting from a naive per-object loop and working up through typed arrays, instancing, and a GPU shader, measuring frame time at each step.

Graphics & SimulationClass assignmentMediumSep 30, 2026

Physics Puzzle Engine Lab

Students build a 2D physics engine from scratch using the Canvas API, then use it to author five puzzle levels that each demonstrate a specific physics behavior.

Graphics & SimulationClass assignmentLargeAug 25, 2026

Generative Art Gallery

Students build a full-stack web gallery where users submit text prompts, an LLM generates live HTML5 Canvas or SVG artwork from those prompts, and the community can vote, remix, and tag each creation.

Graphics & SimulationClass assignmentLargeJul 29, 2026

All 12 ideas in Graphics & Simulation →