In Part 1, BrowserSpace explored a simple question: how much of a voxel world could we draw with a pool of ordinary DOM elements? In Part 2, we started baking perspective variations into sprite sheets. The latest round has taken that experiment onto a Switch 1 running the embedded WebKit port by ACCESS.
The result is now playable on that device, according to hands-on testing. Rotation still has visible steps, close surfaces can expose seams, and image memory matters. But the world is recognizable, transparent blocks preserve their see-through appearance, and jumping and character movement make it feel like a place rather than a projection test.
The current surface renderer. This and the comparison pictures below are desktop captures of the actual DOM renderer; they illustrate rendering behavior, not Switch frame rate.
1. The device gets the deciding vote
Our earlier posts emphasized 60 FPS prototypes. That is not a blanket performance claim for the current perspective world on Switch. A lightweight scene, an empty viewport and a complete moving terrain scene have different costs. The device benchmark made that distinction difficult to ignore.
| Device benchmark case |
Median RAF interval |
| Empty viewport |
17 ms |
| Flat 6×6 scene, merged patches |
17 ms |
| Flat 6×6 scene, individual faces |
33 ms |
| Terrain, 72 slots, layer hints |
67 ms |
| Terrain, 72 slots, no layer hints |
283 ms |
| 72 changing matrices, layer hints |
33 ms |
| 72 changing matrices plus atlas changes |
50 ms |
These are earlier on-device diagnostic results transcribed from a photographed benchmark, before the new nearby texture pages were tested. A 67 ms interval is roughly 15 frames per second in that case. The empty 17 ms baseline does not turn it into a 60 FPS terrain renderer.
The striking comparison is the terrain pair. JavaScript cost was similar, but the frame interval changed from 283 to 67 ms with layer hints. The timing labeled “DOM” measures style submission; paint and compositing happen later. Optimizing a small style-writing loop cannot, by itself, explain all the time the browser spends producing a frame.
We also found that the benchmark's gentle orbit advanced only 0.23° per frame. The old game could turn about 7–10° between frames at the measured terrain interval. Those two animations would not look equally smooth even if their frame rates matched. Adjustable turn speed and a finer stick response helped make that tradeoff explicit.
2. Bake the difficult part of a face, not every possible camera
The current perspective path works with exposed planes instead of treating every block as a complete cube billboard. Neighboring planes can share actual projected world edges. The browser still projects geometry and selects visible surfaces; the bake removes runtime texture rasterization and per-pixel perspective mapping.
A projected plane is a homography. After orienting its two edges toward increasing depth, we describe its shape with two depth ratios:
a = depthChangeU / (originDepth + depthChangeU + depthChangeV)
b = depthChangeV / (originDepth + depthChangeU + depthChangeV)
Those ratios describe a reusable canonical quadrilateral. A finite atlas samples them, independently of the world's coordinates. Python bakes the textured projective distortion. At runtime, the renderer picks a sample and fits it to the four projected corners with a CSS 2D matrix(a,b,c,d,e,f).
This does not precompute an entire game's camera-position space. It reuses a small mathematical family of face shapes. It also does not remove error: the sample grid is discrete, a CSS affine placement cannot repair every difference, and very close or nearly edge-on faces remain difficult. We measure the corner residual and split a merged patch when its error is too large. Individual faces can still exceed that patch threshold.
3. The useful unit of work is a visible image
A world block does not have to equal a DOM element. Interior blocks contribute no visible surfaces. Compatible exposed faces already merge into 2×2 patches. A flat four-block floor can therefore spend one image slot rather than four, while preserving its geometry and repeated texture pattern.
Distant objects offer another opportunity. One generated tree contains 61 blocks. Its silhouette is important long before the player needs to inspect each leaf cube. In the distance, we now draw that tree as one pre-rendered sprite, selected from eight directions, three viewing elevations and three distance samples.
Distant-tree sprites disabled.
The same camera with distant landmarks enabled, inside the same pool of 72 rendering nodes.
Near the camera, the tree returns to voxel faces. Different enter/leave distances prevent the representation from alternating at a single boundary. If the player edits a tree, its original baked sprite becomes invalid immediately. Correctness wins over drawing an untouched tree that no longer exists.
These are approximate distant props, with one painter depth each. They can show sample transitions and occlusion errors against intersecting geometry. We keep transparent blocks in the surface path. We also reserve a few slots for actors and recognizable landmarks, so the nearest ground faces cannot consume every slot before a tree gets considered.
4. Assemble characters once, then choose frames
The old character assembly had a more ordinary bug: it placed large source parts using offsets intended for smaller ones. Heads covered bodies, limbs overlapped, and the canvas cropped the result. A darker copy of the same view was not a convincing back view either.
We replaced that with a small articulated cuboid rig, textured from the bundled Kenney pack and rendered offline. Each character has an idle pose, four walking frames and a held jumping pose across eight viewing directions. Every frame shares a foot anchor, and every character still consumes one DOM node.
The local player can keep a fixed rear view because its heading turns with the trailing camera. NPCs choose a view from their heading relative to the camera. Walking responds to actual travel, stops when collision stops the character, and changes sprite pixels at most eight times per second.
There was a second bug in the runtime: appending an actor's index could overwrite a cached sorted entry. The same actor could appear twice and displace another surface. Fixing that was as important as replacing the art. A stationary repeat frame now has a regression check for zero style writes.
5. Warp accuracy and texture detail are different budgets
Once the world moved well enough, the next distraction was blur. The compact atlas has 16 texture pixels across a face. A merged 2×2 patch shares that same image area, leaving about eight pixels per block edge. Magnify that across a nearby floor and the missing detail becomes obvious.
Choosing more warp samples does not necessarily add texture pixels. The Balanced profile improves the sample grid but keeps the compact texture area. That explains why a heavier profile could slow down the device while a close block stayed blurry.
Compact: 16 pixels across a face image.
Extra sharp nearby: 64-pixel grass/stone pages and 32-pixel pages for the other supported common materials.
The new optional profiles spend more texture pixels only on eligible nearby common faces. They use exactly the same warp coordinates and projected geometry as Compact. The matched captures above draw 35 surfaces inside a 72-node pool; 25 of those surfaces select a sharper image. This is an image-resolution change, not an increase in drawn geometry.
To limit memory, the extra pages cover grass, dirt, stone and glass, with only a subset of the existing warp states. Uncovered states use the compact image. Larger, close faces enter the sharper tier, and a lower release threshold helps avoid unnecessary switching. Merged patches retain their repeated texture pattern. There is no second DOM layer or crossfade.
| Image set, including actors and distant trees |
Estimated decoded RGBA |
| Compact |
34.4 MiB |
| Sharp nearby |
44.1 MiB |
| Extra sharp nearby |
54.1 MiB |
These estimate one complete decoded image set, not process memory. Browser caches, compositor copies and layer backing stores can add more. Compressed WebP file size and JavaScript heap readings are different measurements again. Compact remains the default; sharper nearby textures still need their own Switch performance results.
6. More controls, fewer hidden assumptions
Terrain distance is now adjustable independently of the node budget, with an Auto setting that follows the pool size. Distant trees and characters have their own ranges. Increasing distance adds candidates; it does not guarantee that a fixed pool can display all of them.
The controller has a separate host problem. The Switch browser can claim B for Back, X for Close and Plus for page information. We added a feature-detected footer-callback adapter based on public NX browser API notes, page-key cancellation where events are cancelable, and a Switch layout that uses right-stick click for pause. Trigger controls provide alternatives for building. Whether a particular host actually honors the callbacks still needs hardware confirmation; the Gamepad API itself does not grant exclusive control of system buttons.
A dedicated controller page records raw button indices and callback requests. A separate text-input check tests whether focusing an ordinary field opens the host keyboard. That matters for the next gameplay milestone: a small shared room with persistent building, visible remote players and short speech bubbles above their names.
What we are measuring next
There is still work available without changing the hardware: larger coplanar patches, more shared distant props, dirty-region mesh rebuilding after edits, batched changes, and carefully measured opaque occlusion culling. Nearby texture coverage can also follow recorded demand instead of baking every material and every state at the highest resolution.
The next device suite compares the same close scene at 16, 32 and 64 pixels, records how many faces actually use the sharper pages, and checks filtered sampling separately. Multiplayer will add its own actor, label and network budgets. The aim is to make those costs visible as we add features.
BrowserSpace is still an experiment in fitting a 3D-looking world into the browser features we actually have: DOM nodes, images and 2D transforms. The latest progress comes from choosing which detail each image needs to carry—and measuring what the device spends to move it.