Layers

A game is a stack.
Each layer, one brick.

Battlefield Blitz turns sideways and lifts apart into its layers, one at a time, each labelled with the bytes its own code costs. One layer faults, a scan patches it, and the stack snaps back into the game. It plays on its own; the play key pauses it. Scroll or swipe over it to fan the layers by hand (it holds the page while you do, like every demo here), or focus it and step through with the arrow keys.

A stylised mobile tank game. The board turns and its eight stacked layers lift off one by one, each labelled with its measured size: board grid, characters, movement, collision, rules, effects, input and HUD. The collision layer turns red with a fault, a scan passes over it and patches it, it flashes green, and the stack snaps back into the game. It plays on its own, three times round; the play key pauses and replays it, and scrolling or swiping over it (or the arrow keys, once it has focus) steps through the layers by hand.

7.8 KB gz

Live chunk 7.9 KB gzip (slot + scene, one file), loaded only once the slot is near. Inline poster and loader 4.0 KB. At 4× CPU throttle, script per frame over one loop 1.2 ms median, 3.3 ms p95, capped at 30 fps. Layout shift 0. Paused: 0 frames. Measured in Chromium 153 on Fizlet 0.21.1.

Layer bytes: Battlefield Blitz c8c8ca4, layer manifest (game code per layer, min + gzip; Effects is all brick, min). Built on @fzlt/core, @fzlt/core/slot and @fzlt/core/sprite. By Chris Cooley ↗.