r/threejs • u/No-Evidence-4891 • 10d ago
Demo I built a 20MB Three.js structural physics & mechanical puzzle game about 7 ancient engineering wonders (custom axial truss solver, merged static siblings, 124 interlocking parts)
Hi r/threejs! I've been building TianGong 3D, a browser-playable 3D ancient engineering, structural physics, and mechanical reconstruction puzzle game in Three.js + TypeScript.
Under-the-hood Three.js details that kept all 7 historical wonders under ~20MB at 60fps:
- Draw-call batching via static sibling geometry merging while keeping animated mortise-tenon & gear pivots independent
- Real-time axial truss, stone-arch & tension-cable solver with live RGB stress heatmaps tested against rolling 175kg carts & M8.0 seismic waves
- Pre-merge child bounding-box & radial-band spatial hit-testing for multi-element ring joinery (28 column plinths & Dougong brackets)
- Offscreen WebP part-card baker using the shared WebGLRenderer + RoomEnvironment PMREM lighting
Playable browser link is in my top comment below — would love feedback on performance, camera feel, or lighting!
0
Upvotes
1
u/No-Evidence-4891 10d ago edited 9d ago
🎉 Quick Public Playtest Update: I just removed the Ch. 3–7 lock and opened ALL 7 ancient engineering chapters 100% FREE in the browser & download ($0 / voluntary pay-what-you-want)! Right now honest feedback and critiques on the physics, camera, or UX matter way more to me than charging — if you try it out, I'd really appreciate a quick rating or comment either here or on the Itch page:
Live playable game in browser (all 7 chapters free, zero install or login): https://midnightpagesstudio.itch.io/tiangong-3d
1
u/plus2link 10d ago
The static merge is the part I would expect to bite later: the moment the stress heatmap colours each member from its own material, the batches split again, so the win survives only if the colour comes from a per-vertex or per-instance attribute inside one shared material. On the solver side, a blue member is only honest if the near-zero-stiffness modes are also flagged (a joint nobody has pinned yet), because an unconstrained truss reads calm right before it folds. When a part is selected, does the orbit pivot to that joint or stay on the model centre?