Skip to content

Brick Wars: Spirit Quest — graphics-first brick-toy parody game (browser, CDN-served)#10

Draft
ilikevibecoding wants to merge 9 commits into
mainfrom
cursor/bc-a9d7f41c-76dd-4702-9e55-dfef9095a961-8f96
Draft

Brick Wars: Spirit Quest — graphics-first brick-toy parody game (browser, CDN-served)#10
ilikevibecoding wants to merge 9 commits into
mainfrom
cursor/bc-a9d7f41c-76dd-4702-9e55-dfef9095a961-8f96

Conversation

@ilikevibecoding

@ilikevibecoding ilikevibecoding commented Jun 10, 2026

Copy link
Copy Markdown
Owner

What this is

A self-contained browser game in brick-wars/: a third-person 3D collectathon set on a desert diorama built entirely from procedurally generated plastic construction bricks. Find all 7 glowing spirits, smash crates for studs, and hold-to-build a rattling brick pile into a staircase up the mesa.

Unofficial fan parody for personal, non-commercial use. Not affiliated with the LEGO Group or Lucasfilm. Every asset is original and generated procedurally in code — no third-party assets, logos, or trademarks.

Play it (no deploy needed)

githack shows a one-click "External Content Notice" first — click Open the page. The existing GitHub Pages workflow (ehpurple.com) is untouched; merging this does not deploy the game there.

Graphics (the focus)

  • True construction-toy ratios (8 mm module: plates 0.4, bricks 1.2, studs Ø0.6×0.21), flat-chamfered molded edges, logo-free stud tops
  • Glossy "ABS plastic" materials with PMREM environment speculars and per-brick molded-batch color jitter
  • Terraced dunes of stacked 1×1 plates over a studded baseplate; huts laid brick-by-brick in running bond with slope-brick roofs; vaporator towers, brick cacti, rock builds, flat-top mesa
  • ACES tone mapping, cadenced PCF shadows (sun azimuth tuned so shadows face the camera), selective half-res bloom only on the sword blade and spirits
  • Properly proportioned minifig rig: studded cylinder head with canvas-painted face, tapered torso, claw hands, rigid toy-joint walk/idle/swing animation; ghost spirits share the rig with an emissive translucent material
  • Whole static world renders in a handful of InstancedMesh draw calls

Performance

  • ~390k triangles/frame (was 2.7M at first build — a 7× cut) via a custom 44-tri flat-chamfer box (replaces ~108-tri rounded boxes), plain 12-tri boxes for buried terrain layers, 8-segment studs with no buried caps
  • Single directional light + hemisphere; no clearcoat on the large instanced fields
  • Shadow map 1536² PCF refreshed on a frame cadence; bloom blur targets at half resolution
  • Per-tier absolute pixel budgets (high 2.1MP / med 1.45MP / low 0.95MP / potato 0.55MP) so hi-DPI/4K screens never rasterize at native resolution
  • Adaptive quality: starts at med, auto-promotes to high on fast machines, steps down through low to potato (no shadows + blob shadow, no post, ~half-SD render scale) when frames run slow
  • Software-rendering detection: if the browser has no GPU acceleration (SwiftShader/llvmpipe), the game starts at potato and shows a banner telling the player to enable hardware acceleration
  • ?quality=high|med|low|potato locks a tier, ?nobloom=1 skips post entirely; __bw.info() in the console reports GPU, tier, and frame time for diagnostics

Gameplay vista
Diorama with shadows
Hero close-up
Crate smash debris
Win screen

Mechanics

  • Pointer-lock third-person controls (WASD / Space / Shift), terrace step-up, prop collisions, camera occlusion pull-in
  • Energy sword swings (click/F) burst crates into tumbling bricks; golden studs bounce out and magnet to you with an escalating pickup tick
  • 7 spirits to collect by walking into them — each becomes a wisp following you; Subnautica clone graphics #7 sits atop the mesa behind the hold-E build set piece
  • Win screen with studs/smashed/time stats; fully synthesized WebAudio (sword hum, chimes, snaps, fanfare)

Testing

  • Headless-Chrome smoke test (software WebGL): walks, smashes, collects studs + spirit by proximity, completes the build, reaches win state — zero console errors; also validates the software-GL → potato path end-to-end
  • Verified the actual rawcdn.githack URL boots and renders the game end-to-end after each perf pass

Vendored Three.js v0.170 under brick-wars/vendor/ (works offline / from any static host; no build step).

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

cursoragent and others added 6 commits June 9, 2026 23:54
Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
…ic sim step hook

Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
…nifig arms/face/sword, ghost readability, crate placement

Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
…ighter emissives

Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
…ranch links)

Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
my-projects Ready Ready Preview, Comment Jun 10, 2026 6:52pm
my-projects-kf1f Ready Ready Preview, Comment Jun 10, 2026 6:52pm

… instanced fields, PCF + cadenced shadow updates, half-res bloom, pixel-ratio cap, adaptive quality tiers (?quality= override)

Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
…xes for buried plates, 8-seg studs), drop second directional light, per-tier pixel budgets, start med + auto-promote

Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
… shadow) + GPU notice banner, gpu info in debug hook

Co-authored-by: ilikevibecoding <ilikevibecoding@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants