Devlog
Building Awaken
Notes from building a browser-native WebGPU game engine - imports, architecture, rendering, and the occasional rabbit hole.
- #1Why build a browser-native game engine - and why WebGPU, not WebGLThe goal, the technical reason for WebGPU over WebGL, and the plan to ship the same games to browser, desktop and mobile.
- #2Awaken architecture: the core documentThe package graph, the ECS data model, the editor/player boundary, and the frame loop.
- #3Reading Unity, Unreal and Godot files by handA format-level teardown of four asset pipelines - magic bytes, where the geometry hides, and the one trick every non-glTF format forced on us.
- #4Exporting a whole 3D game as one HTML fileHow Awaken bundles a game into a single self-contained file, the geometry-shrinking pipeline (with real numbers), and the plan to export the same game to desktop and mobile.
- #5TypeScript that compiles in the browser (with real autocomplete)The libraries behind Awaken's in-tab scripting, how we wire IntelliSense for our own API, how compilation works with no toolchain, and how a script hooks the engine.
- #6Physics: I wrote my own, then chose Rapier over JoltWhy I deleted my hand-rolled physics, how I picked Rapier over Jolt, the abstraction that keeps it swappable, and two Rapier footguns that make a player fall through the world.
- #7Making WebGPU run on every GPU (including ones you can't test)WebGPU means every GPU on earth - feature detection, a fallback that never rots, and a GPU picker built on the one knob the API gives you.
- #8Editor scripting: the size-cull that made my buildings dissolveModular buildings pop because size-aware distance culling judges every part on its own - small tiles cull close, big walls stay far, and the house comes apart as you move. The fix is an editor tool that merges each building into one object. (Plus a memory rabbit hole I climbed out of empty-handed.)
- #9Precomputed occlusion: how it works, and why it's an option not a defaultThe full PVS pipeline - voxelisation, ray-cast visibility, sparse storage - why it's hard to tune on imported open worlds, and what Awaken does for now instead.