Write an archetype ECS in 300 lines of Rust
An archetype ECS built from nothing: generational handles, struct-of-arrays tables, runtime component migration, and two caches. Then the engine layer on top. No proc-macros, no unsafe, std only.
Long-form notes on the systems I write in my own time.
Posts are organized by tags and categories. Subscribe via RSS or browse the full archive.
An archetype ECS built from nothing: generational handles, struct-of-arrays tables, runtime component migration, and two caches. Then the engine layer on top. No proc-macros, no unsafe, std only.
A whole Breakout, modeled with no objects. Bodies are plain data structs, behavior is free functions over queries, and the game's globals are a handful of resources. Part 1 builds the base game.
How nightshade answers "what is under the cursor, where in the world is it, and what is the surface normal there" using a multiple-render-target mesh pass, a compute shader that samples a 5x5 window of the depth and entity-id textures, and an async readback.
A retained UI built on top of an archetype ECS. Part 1 lays down the components, the tree, and a small builder that produces a working widget hierarchy.
How bamboo is shaped: the SSG I wrote in Rust and use to build this site. Content walks, frontmatter, syntect, Tera, shortcodes, parallel rendering, and incremental rebuilds.
An ECS, built from nothing, in three posts. Part 1 lays down the storage. Generational entity handles and archetype tables in struct-of-arrays layout.