Tag

three-js

Development posts tagged three-js. Tags cut across the categories, so this pulls together work on the same subject from different parts of the game.

11 posts

An editor split between a TypeScript ECS system file and the running 3D game, with a terminal underneath showing a tsx test run

The tech stack behind a browser RTS

Five stack choices and what each one charged: a physics engine never allowed near the simulation, a renderer whose failure mode is a blank white map, and 1,266 files with no upstream maintainer.

11 min readClaude and Adam Sturrock
A jungle map at maximum zoom out, thousands of trees covering the terrain, with an army crossing the near edge of the canopy
Rendering & GraphicsThe move to 3D

Keeping a thousand trees on screen

Every level of detail is a real mesh now. Switch points come from how many pixels a thing covers, and a zoomed-out jungle went from 113M triangles a frame to 7M.

12 min readClaude and Adam Sturrock
A caster mid-spell with a banded lightning bolt arcing to a target, ember particles scattered across a burning ground rune
Rendering & GraphicsThe move to 3D

Making spells look like spells

An MIT-licensed three.js casting sandbox became the spell renderer, after a Z-up remap, an ink-banding pass, and a rule about which number decides a spell's size.

12 min readClaude and Adam Sturrock
A vertex animation texture viewed as an image: a wide horizontal band of coloured noise, one column per vertex and one row per animation frame
Engine & PerformanceMaking things fast

Baking animation into a texture

Four hundred animated units is the worst thing you can ask a renderer to do. Storing the animation as an image instead removes the skeleton entirely.

11 min readClaude and Adam Sturrock
A dwarf army rendered as 3D models on a hex-tiled battlefield, camera tilted to a low orbit angle
Rendering & GraphicsThe move to 3D

Rebuilding a 2D game in 3D

In April the camera stopped looking straight down. What a player got when a canvas RTS was rebuilt on three.js, and what the simulation never noticed.

7 min readClaude and Adam Sturrock