PixiJS renderer cutover: replace the DOM map renderer (fixes far-zoom breakage) #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The DOM map renderer breaks at far zoom-out: ~90k absolutely-positioned nodes stall the frame, and unfetched chunks render as gray voids (user-reported; reproducible today by zooming all the way out on
/game). The engine analysis (docs/ENGINE_FRONTEND.md) chose PixiJS v8 + pixi-viewport, and the spike at/game/pixi(40ab476) validated it: same live world via the shared projection/sprite table/SSE/chunks API, two LOD bands (per-tile sprites close, one dominant-biome diamond per chunk past scale 0.2), measured 60fps at whole-map overview with all 625 chunks, ~54fps mid, 60fps close, zero console errors.Task
Promote the spike to the real renderer at
/game, replacing the DOM tile/building/cat layers and the hand-rolledMapViewport.Prerequisite: #1 — hoist the pure render helpers out of
TileLayer.tsxinto a shared module both renderers import. Do not start the port before that lands.Port in the step order from
docs/ENGINE_FRONTEND.md, each step shippable behind the/game/pixiroute until the final swap:roadSpriteFor+ the neighbour pass), exact biome tints via pooledColorMatrixFilterper distinct CSS-filter string (spike only reproducesbrightness), and the organic village fence/clearing/fog from the claimed set (25571c4) instead of the spike's hardcoded ring radius 4.eventMode:'static'+hitArea(isoToTile is the inverse), zone/road drag-drawing, then swap/gameto the Pixi screen. React DOM keeps the HUD/panels/modals above the canvas. Keep the DOM renderer reachable (e.g./game/dom) for one release as a fallback, then delete.Acceptance criteria
/gameholds ~60fps at whole-map zoom-out with zero gray voids (the ChunkStore's TTL cache + bounded fetch queue from the spike fixes the request storm)./game: fog, fence+gate, roads, stumps, water, buildings w/ progress, cats w/ labels/carry/facing, zones, raiders, selection, boost clicks, zone painting, road building.Non-goals
Closed after the Rust/Bevy cutover. The PixiJS renderer migration is superseded by the native Bevy client.