Giant Escape
A walled town on sloping ground, three 18-metre giants, and a fire that spreads the way fire does — cell by cell, with the wind, through whatever there is to burn. You command the giants. The town's people look for a way out, or don't. Built for the browser with three.js. The giants' walk is held to laws taken from real humanoid robot controllers, and replayed through MuJoCo to check the books.
- Version0.9.0 — the first hosted release, 3 December 2026. A build under construction: it plays from the first town on, and its known bugs are listed below, as they are on the game's own start screen.
- Playqalarc.com/games/giant-escape — desktop browser, keyboard and mouse, nothing to install. One game mode for now: get the people out alive.
- The fireA cellular field on 48,400 one-metre cells, stepped at a fixed 20 Hz, deterministic by seed. Roads are firebreaks because they are bare, not because a script says so.
- The walkA baked animation for the body, a gait that owns the ground, and 15 laws from MuJoCo-validated humanoid controllers. A MuJoCo rigid-body pass replays the game's own motion and reports where physics would object.
The game
Type a seed. Every seed is its own town — walls, gates, roads, houses and keep laid out by the shape of the land — and a level begins: people leave their houses and look for a gate, and three giants walk in. A level is held when enough people are out past the border. Each level is a new town with a steeper ask, and before each one you take a single card that changes the rest of the run.
| Key | What it does |
|---|---|
| 1 2 3, then click | Choose a giant and order it to walk there. Giants also act on their own: they hunt the crowd and set fire to houses. |
| Space | Smash — a shockwave from the selected giant. |
| F + click | Fire: the giant's beam, aimed where you click. |
| H J L | The powers: wind, a tornado, a comet. |
| E | Raise an earth wall. |
| C | The ground view — a camera at a person's eye level. For now it is only a camera: playing on the ground is coming soon. |
| Enter | Next level, once a level is judged. |
| Zombie button | Send a zombie in at a gate. Zombies bite; the townsfolk glow no colour, the zombies glow red. |
The town finds its own way out: every person is steered by a navigation mesh over the real ground (Recast and Detour), re-cut as buildings come down. When a giant takes a house apart, the rubble blocks the lanes until a giant wading through grinds it clear.
How the fire is simulated
The fire is not a particle effect painted over the town. It is a simulation that runs whether or not anyone is looking: every square metre of the played area carries a heat, a fuel and a char, and everything you see burning is drawn from that state.


The model
Fire is a cellular field on a one-metre grid: 220 × 220, so 48,400 cells over the played area, ±110 m. Each cell has three numbers. Heat rises toward 1 in a burning cell at 0.85 a second. Fuel is what there is left to burn, and it falls at 0.075 a second, give or take a quarter at random — about 13 seconds of flame from a full cell. Char is one minus the fuel left, and it stays: burnt ground is burnt.
A cell hotter than 0.5 tries to light each of its eight neighbours on every step. The chance is
dt × 0.34 × strength × wind × (0.4 + 0.6 × the neighbour's fuel)
where wind runs from 0.3 upwind to 3.2 straight downwind at full strength. A tired front also spends reach on every hop — 0.018 to 0.043 downwind, 0.04 to 0.10 across or against the wind — so a front can arrive somewhere and die. Ground that is bare, already burnt, or water never catches.
| Setting | Value | Why it is that |
|---|---|---|
| Grid | 1 m cells, 220 × 220 | Fine enough that a road 5 m wide is a real break; small enough to hold in one texture. |
| Time step | fixed 20 Hz | The field advances in equal steps from an accumulator, clamped at 0.12 s. A stalled frame cannot make the fire jump. |
| Cost | per burning cell | Only the active set is visited each step. A quiet town costs nothing; a town fully alight is bounded by the grid. |
| Randomness | seeded (mulberry32) | No Math.random. The same seed and the same ignitions give the same fire; the test suite checks the state byte for byte. |
| Wind | one vector | The same wind drives the spread and the way every grass blade leans. |
What there is to burn
Fuel is a property of the ground, read from the town itself. Open grass carries a full load. A worn road carries 0.02 — effectively bare — which is the whole reason a road acts as a firebreak: there is nothing on it to carry the front across. Steep soil carries less, down to 0.38. Buildings burn part by part: timber ignites, chars and fails where it stands; stone chars but never burns through; a burning house sets fire to the grass beside it. Trees light from hot ground, their canopy chars to soot and the crown carries flames.
From state to screen
The field is exported once per change as one byte-quad per cell — red is char, blue is burning-now, alpha is fuel left — in a single texture. Three different drawings read that one texture through one shared sampling function, with a world-space warp so the fire's edge is never a straight grid line: the ground's scorch; every grass blade, which burns, shrinks, turns to ash, and is not drawn at all where the fuel is gone; and the flames — instanced crossed tapered strips, each with its own up-axis, so fire stands up from the ground, out of a wall's face and normal to a roof slope, with a white-hot core, haze and ember glow, and smoke. The drawings are capped (2,200 flames, 1,400 smoke, 640 glow, 320 ground glow); the simulation underneath is not.
Where it is wrong. The smoke hangs in the air instead of rising and thinning out, and fire can start by itself. Both are on the known list, in the game and below.
How the giants move, and where robotics comes in
An animation clip on its own will put a giant's foot inside a hill. A physics engine on its own cannot animate anything. Giant Escape splits the job into four parts, ties them together with laws taken from controllers built for real humanoid robots, and then replays the result through MuJoCo to check the books.
Four parts
- The animationA 19 KB baked walk — the town's citizens' own walk, baked onto the giant's 65-joint skeleton — owns the body: arms, torso, timing.
- The gait
procgait.js, plain JS, owns the ground: where each foot plants, on what slope, with no slide while it is down. - The rig
skinned-giant.jssolves the clip's legs onto the gait's ankles in world space: a two-bone solve with a knee-speed limit. - The meter
feasible.js, plain JS: 15 laws as arithmetic on the pose stream. Could a real biped do this? - The witness
physics_check.py: the game's own motion replayed through MuJoCo, a rigid body on real contacts.
Over uneven terrain
The gait is the part that knows about the ground, and it reads it every frame for every foot, from the same heightfield the town is built on. What it does with what it reads:
- The sole goes on the ground's own plane. On a slope the foot is flat on the slope, not level with the horizon — on crests and cross-slopes too.
- It lands heel first. The sole arrives toe-up and settles through its heel line over 0.35 s, then rolls over the toe as it lifts.
- The toe pad has a limit. It follows the foot in swing, but never further toe-down than the ground under its tip allows.
- Swing clearance. The heel line, the toe pivot and the pad's tip must each clear the ground under them; a sole still low lifts, eased.
- Reach is corrected sideways, never down. When the leg cannot make the landing spot, the correction is taken horizontally ("in, not down"). An earlier version pulled it toward the hip and dropped the pad 9 cm under the ground.
- Turning. A swinging foot turns with the body in the air and lands splayed by at most 0.45 radians; a planted foot pivots slowly, and only past that twist.
Where the laws come from
The rules the giants are held to are not invented for the game. They are the contact constraints two open-source humanoid controllers enforce, and both of those controllers were built and validated in MuJoCo:
humanoid-control— nonlinear model-predictive control with whole-body control, on the OCS2 framework. From it: a friction cone of μ = 0.7; a foot on the ground has zero velocity (no slip); a foot in the air carries zero force; every joint has a torque limit; stance and swing keep to gait timing.LearningHumanoidWalking— policies trained by reinforcement learning in MuJoCo on the JVRC-1 and Unitree H1 robots. From it: the foot-force and foot-velocity clocks that say when a foot is really down, and the H1's joint ranges, which are the meter's limits.
The meter is those rules as arithmetic: two centres of mass (the true one, and the pelvis path with the legs hanging under it), the centre of pressure over a 170 ms window judged at its 95th percentile, sole lines tested against the heightfield, and the rig's own two-bone solve with its knee-speed limit. A harness runs both walks — the baked clip and a fully procedural one — over eleven drives: flat, ±20° slopes, two crests, a cross-slope, a steady turn, a turn about, fast, slow, and start·stop. It takes seconds and runs in the test suite on every change. On the uneven drives it reads: balance — the centre of pressure inside the stance sole for 95 % of single support, on both walks; contact and no penetration on the crests; foot yaw, legs clear and continuity on the turns. The game's own foot probe — the foot it drew against the ground it drew — passes 15 of its 16 runs.
The rigid-body pass: the game's motion, replayed through MuJoCo
The meter is arithmetic. MuJoCo is the witness that adds what arithmetic leaves out — angular momentum, the distribution of force over a sole's contact points, and torque. The game writes a trace of its own walk, and physics_check.py hands it to a rigid body:
- The traceAt 60 Hz: the pelvis, its heading, and where both ankles are.
- The bodyThe giant's leg chain — hip yaw, roll and pitch, knee, ankle pitch and roll, each side — the trunk as one rigid body with a human's mass distribution, 35,000 kg, four contact spheres a sole, μ = 0.7.
- Solve the legsThe pelvis is put where the game drew it and each leg is solved by damped least squares so its foot lies where the game's foot lies. The residual is the unreachable part.
- What the motion requiresInverse dynamics with contacts switched off: the force every joint would need, τreq.
- What the ground can giveThe forward constraint solver, with τreq applied: the contact forces the friction cone and one-way contacts permit.
τreq minus what the contacts gave, on the floating-base rows, is the missing wrench: what a real body of this motion would need from nowhere. The centre of pressure of the forces that are permitted, read in the loaded sole's own frame, is the ZMP law as the solver sees it. No policy is trained and no controller is tuned: the harness only replays and reports.


plot_check.py from the pass's own readings.| Reading | The walk in the game (baked clip) | The procedural walk |
|---|---|---|
| Frames replayed | 1,035 | 918 |
| Unreachable part of the legs | 0.00 mm | 0.00 mm |
| Missing wrench — force the ground cannot give, 95th percentile | 0.16 % of body weight | 0.08 % |
| Centre of pressure outside the sole | 0 % of single-support frames | 0 % |
| Friction demand over μ = 0.7 — median / 95th / worst | 0.21 / 2.25 / 37.6 | 0.24 / 1.05 / 5.79 |
| Torque against a scaled human's peaks, 95th percentile — hip / knee / ankle | 1.21 / 3.49 / 1.33 | 0.94 / 1.70 / 1.46 |
| Frames past a Unitree H1 joint range | none | none |
Readings of 3 December 2026, on the 18 m giant, on level ground. Torque per kilogram grows with size (weight times lever), so a human's walking peaks are compared after scaling by the height ratio — 10.65× here.
Read plainly. The walk is balanced: the ground never has to supply a force it cannot, and the centre of pressure never leaves the sole. It is not inside a scaled human's strength — the knee needs three and a half times a human's peak at the 95th percentile — and in the spikes it asks for more grip than μ = 0.7 gives. The giants are stronger and grippier than any real biped. That is stated here rather than tuned away.
What has and has not been replayed. The traces run through MuJoCo so far are level-ground walks. Over uneven terrain the checks are the meter's and the foot probe's — the same laws, solved in the game; the probe's one miss is a toe tip 11.6 cm under rising ground at 79 % of a swing, against a 10 cm law. Replaying the slope drives through MuJoCo, with the ground as a heightfield and the contact spheres on it, is the next step. It is on the list.
Where it stands
Version 0.9.0 is a live build under construction, published so it can be played and judged as it is. The game says so on its start screen, with the same two lists:
Known bugs
- Smoke hangs in the air where it should rise and thin out.
- Fire can start by itself.
- A giant sometimes walks through a house instead of breaking it.
- Playing on the ground is not in yet: for now C is a camera at eye level.
Next on the list
- Smoke that rises and dissipates.
- Fire only from a cause: a beam, a comet, the house next door.
- A giant breaks whatever it walks into.
- Playing on the ground.
- The MuJoCo pass over uneven terrain.
- The ground gives way under a comet.
- Soldiers who fight the zombies.
Credits
Where every part came from.
| Part | From | Licence |
|---|---|---|
| Engine, navigation, ambient occlusion | three.js; Recast and Detour by Mikko Mononen through recast-navigation-js; N8AO with postprocessing | MIT and zlib |
| The giants' body | The character “Ch30” from Adobe Mixamo, as in DUSKRUNNER 2 | Adobe Mixamo terms — used inside the game, not redistributed separately |
| The giants' walk, the citizens and their animation | Qalarc's own mannequin with clips from Quaternius' Universal Animation Library, baked onto the giant's skeleton | CC0 |
| Town and castle pieces | Kenney — Fantasy Town Kit and Castle Kit | CC0 |
| Type | Red Hat Mono | SIL Open Font License |
| The real-terrain windows | Copernicus DEM GLO-30 | Produced using Copernicus WorldDEM-30 (c) DLR e.V. 2010-2014 and (c) Airbus Defence and Space GmbH 2014-2018; Copernicus Programme. |
| The rigid-body pass | MuJoCo; the laws quoted from the open-source humanoid-control and LearningHumanoidWalking controllers | open source |
| The fire | Grown out of the Grass-Fire Lab | — |
Everything else — the gait, the meter, the town generator, the collapse engine, the fire model, the sound, which is synthesised as it plays — is Qalarc's, built in-house.
