We stopped redrawing the whole world for every block: 85 ms to 50 ms on a simulated slow phone
Block Land is a building toy for little kids on our site: you stack blocks to make a small world, drawn in isometric view on an HTML canvas. On November 2, 2026, the site's owner asked for it to be made as good as it could be, and we added five build-along models, chickens and pigs, drag-to-place, blocks that drop into place, and floating islands. Each addition made it slower, so we changed how it draws. These are the numbers.
How we measure
Before we ship motion in a kids' game, we run it in Chrome with the CPU slowed down 6×, the same setting as in DevTools, to see how it feels on an old phone. We measure the time from a tap until the second frame is drawn, and frames per second. For Block Land, the test world has 300 blocks. The measurements run inside a Playwright end-to-end test, with the same steps every time.
Redrawing the whole world for every block
The original code redrew the entire world, back to front, every time you placed a block. Isometric scenes are painted by layering nearer blocks over farther ones, so a full redraw is the safe choice. With 300 blocks, though, one tap meant drawing 300 blocks.
Tap to second frame was about 85 ms. When a model builds itself one block at a time, a full redraw per landed block dropped it to 39 frames per second.
Drawing only one block
Now a placed block falls on a separate front canvas, and when it lands, only that block is painted onto the world canvas.
// A simplified sketch (some function names are made up for clarity)
// A placed block goes into the world data right away,
// but isn't drawn on the world canvas while it's falling.
place(x, y, z, kind);
HID.add(key(x, y, z)); // "don't draw yet"
DROPS.push({ x, y, z, h: 1.6 }); // drop it from 1.6 rows above, on the front canvas
// When it lands, draw only that block and the blocks in front of it
function land(d) {
HID.delete(key(d.x, d.y, d.z));
if (hasClearInFront(d)) renderWorld(); // see-through water/glass in front: redraw everything
else paintCell(d.x, d.y, d.z); // usually: draw just one block
} Painting one block can put it on top of something that should be in front of it. So we also repaint the blocks that come later in drawing order, the ones in front. Opaque blocks hide everything behind them, so the result should match a full redraw.
Results (CPU 6× slower, 300 blocks, November 2, 2026):
- Tap to second frame: about 85 ms → about 50 ms
- While a model builds itself: 39 → 60 frames per second
Checking "should match" pixel by pixel
Get the drawing order slightly wrong and a block loses a corner, or a far block pokes through a near one. Some of these errors are too small to notice by eye. So the end-to-end test compares the incrementally drawn image with a full redraw, pixel by pixel.
After building the five models plus extra layouts in all four rotations, more than 700 incremental draws in total, 0.00% of pixels differed.
The exception is see-through blocks. If water or glass is in front, the same spot gets painted twice and turns darker. So when see-through blocks are involved, or when the night glow is drawn, it still redraws everything. Correct pictures beat speed.
Smooth rotation: 19 to 43 frames per second
The same day, the owner asked for rotation to be smooth instead of snapping 90° at a time. Showing the in-between angles needs a separate renderer that can draw any angle. Frames per second during the 0.45-second turn (CPU 6× slower):
- Any-angle renderer, every frame at full detail: 19
- Draw at half resolution and scale up: 30
- Skip hidden blocks and drop the surface patterns: 45 (daytime)
- At night the glow rings dropped it to 25–37, so the glow is hidden only while turning: 43
When the turn ends, the normal detailed picture comes back. At exact 90° angles, the turning renderer and the normal one produce nearly the same image (0.047% of pixels differ), which the test also checks.
What didn't work
The house model's door was first a hole in the wall. But the inside wall behind it was the same brick, so the hole didn't look like a hole. We made the door a wooden block instead, with sand walls and a brick roof. That was a picture problem, not a rendering problem.
The next day (November 3), the same test only reached 28–30 frames per second while turning, below the test's threshold of 40. The code from before the change also got 28, so we think the computer was just slow that day, but we didn't find the cause. We wrote about not trusting a single measurement in a separate note.
Summary
- Stopped redrawing the whole world per block; draw one block and the ones in front (85 → 50 ms, 39 → 60 fps)
- Proved the shortcut correct by comparing against a full redraw pixel by pixel (0.00% difference)
- Fall back to a full redraw for see-through blocks and the night glow
- Draw coarser only while turning and hide the glow: 19 → 43 fps
We haven't heard yet how kids react to it. We'll add that when we do.
Nandemo Factory is a one-person studio in Japan that makes small browser games, with AI doing most of the work. We only write about things we built and checked ourselves, with the numbers we actually saw. Play the games in English.