Feature implementation tracker
Living companion to tile_mmo_server_technical_design_v0.6.md. Statuses: not implemented · partial · full.
Each entry is a short note on behaviour and where the code lives. Update this file in the same commit as the feature it describes.
---
World coordinates and spatial hierarchy
Status: full Spec: World tile coordinates are canonical. Chunks are 16×16 tiles; regions are 4×4 chunks. Negative coordinates use true floor division. Code: server/src/world/coordinates.js, tests in server/tests/coordinates.test.js
Ground and block tile layers
Status: full Spec: Every tile has a visual ground type. An optional block supplies collision and behaviour. Unedited chunks are default grass with no blocks. First-version types are grass, wood, stone wall, and torch. All sprite kinds (grounds, blocks, items, mobs, characters) use a per-type folder; base PNGs are visual states and companions (*-bloom, *-equip, *-equip-bloom) live in that same folder and are never placeable editor states. The client bakes immobile ≤16×16 ground/block tiles (plus bloom companions) into per-chunk atlases: one ground layer, per-row block strips for Y-sort, and one bloom layer. Oversized or animated blocks stay individual sprites so mobiles can Y-sort behind them. Code: server/src/world/chunkData.js, shared/definitions/tiles.js, shared/definitions/tileSprites.js, server/src/assets/spriteCatalog.js, client/src/render/worldView.js, client/src/render/chunkBake.js
Open and closed chunks
Status: full Spec: Never-edited chunks are closed grass. Closed chunks can be replicated but cannot be entered; pathfinding treats them as impassable. Open chunks draw a red border on edges that touch a closed neighbour. Code: server/src/world/chunkData.js (open flag), server/src/world/chunkFlags.js, server/src/simulation/simulation.js (isEnterable, #walkableFor, closedEdges), client/src/render/worldView.js (#rebuildChunkEdges)
ECS registry and components
Status: full Spec: Entities are compositions of components with integer tile positions. Live components include position, movement, path, appearance, character, networkIdentity, chunkLoader, and persistent. Global EntityIds are used for storage, networking and transfer; each worker uses compact recycled EntityHandles for hot ECS arrays. Code: server/src/ecs/world.js, server/src/ecs/serialize.js, server/src/ecs/components.js
Simulation tick
Status: full Spec: Fixed tick from WorldSettings.simulationTickHz (default 20 Hz). Commands drain at tick boundaries, then activation, movement, transfers, and ghost exchange. Multiple isolated simulation workers. Code: server/src/simulation/simulation.js (step), server/src/index.js
Authored world and runtime state persistence
Status: full Spec: world.sqlite holds revisioned authored chunks, live world settings, and settings/chunk changelogs. state.sqlite holds accounts, characters, and runtime entity state. Databases live under server/data/ and use Node's SQLite binding. Code: server/src/persistence/database.js, worldDb.js, stateDb.js
World revisions and pending editor saves
Status: partial Spec: Editor chunk saves write a pending world revision. The running process stays pinned to the map revision loaded at startup until an admin Apply now (in-process reload). Live world settings do not use this path. Midnight restart/Git deploy is not implemented yet. Code: server/src/persistence/worldDb.js (ensurePendingRevision, promotePendingRevision)
World settings
Status: full Spec: Global cadence, timers, night darkness, bloom post-chain knobs, and chat max characters live in world_live_settings and apply as soon as an admin saves. The editor modal uses category tabs (Simulation, Graphics, Inventory, …), marks dirty fields, writes only those fields, and shows a settings edit log (who/when/from/to). Editing night darkness snaps the Night preview to night so the effect is visible (day hours otherwise keep ambient darkening at 0). Chunk Apply now is not required. Some timers are stored before the systems that consume them exist. Code: shared/definitions/worldSettings.js, server/src/persistence/worldDb.js (world_live_settings, world_settings_edit_log), server/src/editor/service.js (loadSettings, saveSettings), client/src/editor/settingsModal.js
Baked lighting
Status: full Spec: On chunk save, raycast light from blocks with lightRangeTiles through passable tiles, including across chunk borders. Store a 16×16 intensity map (0–255, smoothstep falloff by tile distance). Torch range is 8 tiles. Code: server/src/lighting/baker.js, tests in server/tests/lighting.test.js
World editor (server)
Status: full Spec: Admin API to load/save a chunk, toggle open/closed, paint ground/blocks (including spawners and banks), write changelog bullets, edit live world settings, and apply the pending map revision. Marketplace stalls wait on later economy work. Code: server/src/editor/service.js
World editor (client)
Status: full Spec: Separate /editor page. 3×3 chunk view with the selected chunk centred and outlined in red. Chunk-step navigation, paint only inside the selected chunk, hover preview of the selected tool, mouse-wheel zoom (centred on the selected chunk) and Shift+wheel to cycle visual states, open/closed, per-chunk changelog, night preview slider, world-settings modal, save chunk and Apply now. Spawner paint uses mob type, max alive and range; bank is a placeable block. Placeholder sprites stand in until real art exists. Code: client/editor.html, client/src/editor/main.js, client/ui/editor.css
Per-chunk changelog
Status: full Spec: Each save stores who, when, and structured bullets of ground/block/open-closed diffs. Code: server/src/editor/service.js (diffChunks), server/src/persistence/worldDb.js (world_chunk_edit_log), tests in server/tests/editor-diff.test.js
WebSocket gateway
Status: full Spec: JSON WebSocket on /ws, HTTP static files for the client. Connections belong to the gateway. Clients send intentions that are queued onto the simulation tick. Editor messages are admin-only. Code: server/src/gateway/websocket.js, server/src/gateway/http.js, server/src/index.js
Stub authentication
Status: full Spec: Until auth.timfalken.com exists, each connection is admin-<n>. n starts at connected-count+1 and skips names already in use so two live sessions cannot share a stub id. Stub accounts are admins. Code: server/src/auth/stub.js
Characters
Status: full Spec: Unlimited characters per account, one in the world. First name is not globally unique; last name is globally unique per account; first+last unique per account, case-insensitive. Male/female body. Spawn requires an open tile. Code: server/src/characters/service.js, server/src/persistence/stateDb.js
Character deletion and inheritance
Status: full Spec: 24h delayed delete, cancellable. Notify via stub log (or email when present). Names and surname claims are freed on permanent delete. Inventory, equipment, carried coins, and vault move to the account inheritance tab, claimable at a bank into another character's vault. Code: server/src/characters/service.js, server/src/persistence/stateDb.js (account_inheritance)
3×3 chunk replication
Status: full Spec: Players receive the current chunk and eight neighbours as snapshots. Closed chunks are still sent. Afterwards the gateway sends ENTITY_SPAWN, compact ENTITY_MOVE (tile + gait) and ENTITY_DESPAWN; appearance and path stay off the move payload. Tile deltas are not used yet because live tile edits wait for Apply now. Visible chunks may be owned by different workers; the gateway never reassigns regions for rendering. Code: server/src/simulation/simulation.js (snapshotFor, snapshotChunk, drainReplication), server/src/gateway/websocket.js (syncSubscriptions, publishEntity)
Click-to-move and A\* pathfinding
Status: full Spec: MOVE_TO runs A\ over the visible 3×3 using block passability and open-chunk bounds. Occupied tiles block. Server commits integer tiles on the movement cadence. Code:* server/src/navigation/astar.js, server/src/simulation/workerWorld.js (#moveTo, #stepMovement)
Global walk/run cadence
Status: full Spec: Walk 2 tiles/s, run double. Movement ticks at run rate. SetGait chooses every-other vs every movement tick. Code: server/src/simulation/workerWorld.js (#stepMovement, #setGait)
Client movement interpolation
Status: full Spec: Client lerps sprites between replicated tiles over the walk or run interval from world settings. Code: client/src/render/worldView.js (moveEntity, update)
Play viewport and camera
Status: full Spec: Camera stays centered on the local player. Scroll-wheel zoom is viewport-only (1×–4×) and does not change server visibility. Hovering another player shows their first name; clicking them inspects instead of issuing move. Code: client/src/render/worldView.js, client/src/play/main.js, client/index.html
Night shading
Status: full Spec: World time is server time minus 1200 years. At night, unlit tiles are darkened by nightDarkness (a live world setting) and reachable tiles use the baked 0–255 intensity so a torch fades tile-by-tile instead of a hard circle. Tile shade overlays sit above baked ground/block atlases. Sprites larger than 16×16 (and all mobiles) take the full darkness of their standing tile as a uniform sprite-sized shade overlay, so they are not darkened by neighbouring tile shades. Code: client/src/render/worldView.js (nightFactor, #updateShade, #placeSpriteShade), server/src/simulation/simulation.js (worldTime)
FrameworkV3 client bootstrap
Status: full Spec: FrameworkV3 is a git submodule at client/frameworkv3, built first via npm run build:client. Game code lives in client/src. Server does not import it. Code: .gitmodules, client/frameworkv3, client/scripts/build-framework.mjs
Sprite size, pivot and Y-sort
Status: full Spec: World sprites may be any pixel size. Pivot is horizontal centre and 8px from the sprite bottom, placed on the tile centre. Blocks and mobiles are Y-sorted (north behind south). Ground/block definitions set frames, framesPerRow, and animationSpeed for sprite sheets. Immobile ≤16×16 blocks bake into per-row chunk strips; taller sprites stay individually Y-sorted. Code: shared/render/pivot.js, shared/definitions/tiles.js, client/src/render/worldView.js, client/src/render/chunkBake.js, tests in server/tests/pivot.test.js
Visual tile states
Status: full Spec: Each ground and block type has a folder of PNG states. The first alphabetical file is the default. States are visual only; the game may set a named state (for example a door). The editor wheel cycles states; hover previews the selected tool on the target tile. Code: server/src/assets/spriteCatalog.js, shared/definitions/tileSprites.js, client/src/editor/main.js, client/src/render/worldView.js, tests in server/tests/tile-states.test.js
Region workers and cross-worker transfer
Status: full Spec: Isolated simulation workers own regions. Default is two in-process workers behind a clone-on-boundary protocol (SIMULATION_WORKER_MODE=thread uses worker_threads). Neighbour-sticky assignment; an entity that steps into a foreign region is frozen, accepted on the destination, then removed from the source (one authoritative copy). Ghost occupancy is visible for pathfinding. Dynamic load rebalance is later. Code: server/src/simulation/simulation.js, workerWorld.js, inProcessWorker.js, threadWorker.js, tests in server/tests/worker-*.test.js
ChunkLoader activation and unload persistence
Status: full Spec: Players carry ChunkLoader (3×3 simulating chunks, 3×3 resident regions). Chunks with no simulation refs stay dormant in memory. Regions with no residency refs unload after regionUnloadGracePeriodMs. Persistent entities are written on unload and restored on the next load; non-persistent entities are discarded. Code: server/src/simulation/chunkLoader.js, server/src/simulation/simulation.js, server/src/persistence/stateDb.js (persistent_entities)
Midnight restart and Git deploy
Status: not implemented Spec: systemd + manifest-driven Git deploy. Pending world/code changes apply at server-local midnight, with an admin immediate-restart path. Crashes must not pull. Code: —
Spawners
Status: full Spec: Spawner blocks with mob type, max alive, and range. They fire only in open, simulating chunks. Spawned mobs get SpawnOrigin; persistence follows the mob definition (deer are not persistent). Wildlife options are deer and hostile rats. Pigeons are not ambient wildlife. Code: server/src/simulation/spawners.js, shared/definitions/mobs.js, client/assets/blocks/spawner/, client/assets/mobs/deer/, client/assets/mobs/rat/
Character logout resume
Status: full Spec: Despawning a character (logout / disconnect) writes their live tile to characters. The next login reloads that row after despawn and resumes there (or the nearest free enterable tile within a short spiral if blocked), instead of jumping to a distant world spawn. Code: server/src/simulation/simulation.js (spawnCharacter, despawnCharacter), tests in server/tests/character-resume.test.js
Inventory, items, equipment, ground drops
Status: full Spec: 32-slot inventory, stacking, equipment slots with a separate equipSprite overlay on the body, carried currency, player drops that last groundItemDespawnDurationMs (default 10 minutes). Pickup requires standing on the tile. Inventory is private UI state; nearby clients see ground items and worn overlays. New characters start with paper, apples, a stick, a cloth shirt, and coins. Placeholder item/equipment PNGs until real art exists. Code: shared/definitions/items.js, shared/items/inventory.js, server/src/items/bags.js, client/src/play/inventory.js
Combat, skills, groups, pigeons
Status: partial Spec: Melee auto-attack with stick (Clubfighting + Strength), LMB/RMB targeting and context menu (including Follow \<name\> / Attack \<name\>), engage/retaliate, swipe VFX, and client dynamic-light hooks. Follow reuses the target's vacated trail and remaining path (stop one tile short, wait for vacancy, walkability each step); catch-up A only when no shared trail yet. Break beyond one chunk width. Ranged/spells/groups/pigeon dispatch remain design-only. Code:* shared/definitions/skills.js, server/src/simulation/follow.js, combat tick, client/src/play/ context menu + swipe, tests in server/tests/combat.test.js / server/tests/follow.test.js
Proximity chat
Status: full Spec: Enter opens a bottom chat line (max chatMaxCharacters, default 100). Enter trims and sends; Escape cancels. The speaker always sees their own bubble. Other players receive server-side obfuscation: full text within 8 tiles, linear falloff to silent at 16 tiles. At 0% readability the bubble is not sent. Code: shared/speech/proximity.js, server/src/chat/speech.js, client/src/play/chat.js, tests in server/tests/proximity-speech.test.js
Friends
Status: full Spec: Character-to-character friends in state.sqlite. Hover shows first name; click opens inspect (full name, request/accept/remove). Requests must be accepted. Unfriend is symmetric. Incoming/outgoing lists live in the Friends panel. Code: server/src/friends/service.js, server/src/persistence/stateDb.js, client/src/play/social.js, tests in server/tests/friends.test.js
Banking, cheques, shops, player-driven marketplace
Status: partial Spec: Bank blocks can be placed in the editor. Standing next to a bank opens vault deposit/withdraw and inheritance claim. Filled cheques, shop NPCs, and the player marketplace are not in this slice. Code: server/src/items/bags.js, client/src/play/inventory.js, client/assets/blocks/bank/
Player scripting hooks
Status: not implemented Spec: Reserved control abstraction; not in the initial release. Code: —
Source
| 1 | # Feature implementation tracker |
| 2 | |
| 3 | Living companion to `tile_mmo_server_technical_design_v0.6.md`. |
| 4 | Statuses: **not implemented** · **partial** · **full**. |
| 5 | |
| 6 | Each entry is a short note on behaviour and where the code lives. Update this file in the same commit as the feature it describes. |
| 7 | |
| 8 | --- |
| 9 | |
| 10 | ## World coordinates and spatial hierarchy |
| 11 | |
| 12 | **Status:** full |
| 13 | **Spec:** World tile coordinates are canonical. Chunks are 16×16 tiles; regions are 4×4 chunks. Negative coordinates use true floor division. |
| 14 | **Code:** `server/src/world/coordinates.js`, tests in `server/tests/coordinates.test.js` |
| 15 | |
| 16 | ## Ground and block tile layers |
| 17 | |
| 18 | **Status:** full |
| 19 | **Spec:** Every tile has a visual ground type. An optional block supplies collision and behaviour. Unedited chunks are default grass with no blocks. First-version types are grass, wood, stone wall, and torch. **All** sprite kinds (grounds, blocks, items, mobs, characters) use a per-type folder; base PNGs are visual states and companions (`*-bloom`, `*-equip`, `*-equip-bloom`) live in that same folder and are never placeable editor states. The client bakes immobile ≤16×16 ground/block tiles (plus bloom companions) into per-chunk atlases: one ground layer, per-row block strips for Y-sort, and one bloom layer. Oversized or animated blocks stay individual sprites so mobiles can Y-sort behind them. |
| 20 | **Code:** `server/src/world/chunkData.js`, `shared/definitions/tiles.js`, `shared/definitions/tileSprites.js`, `server/src/assets/spriteCatalog.js`, `client/src/render/worldView.js`, `client/src/render/chunkBake.js` |
| 21 | |
| 22 | ## Open and closed chunks |
| 23 | |
| 24 | **Status:** full |
| 25 | **Spec:** Never-edited chunks are closed grass. Closed chunks can be replicated but cannot be entered; pathfinding treats them as impassable. Open chunks draw a red border on edges that touch a closed neighbour. |
| 26 | **Code:** `server/src/world/chunkData.js` (`open` flag), `server/src/world/chunkFlags.js`, `server/src/simulation/simulation.js` (`isEnterable`, `#walkableFor`, `closedEdges`), `client/src/render/worldView.js` (`#rebuildChunkEdges`) |
| 27 | |
| 28 | ## ECS registry and components |
| 29 | |
| 30 | **Status:** full |
| 31 | **Spec:** Entities are compositions of components with integer tile positions. Live components include `position`, `movement`, `path`, `appearance`, `character`, `networkIdentity`, `chunkLoader`, and `persistent`. Global `EntityId`s are used for storage, networking and transfer; each worker uses compact recycled `EntityHandle`s for hot ECS arrays. |
| 32 | **Code:** `server/src/ecs/world.js`, `server/src/ecs/serialize.js`, `server/src/ecs/components.js` |
| 33 | |
| 34 | ## Simulation tick |
| 35 | |
| 36 | **Status:** full |
| 37 | **Spec:** Fixed tick from `WorldSettings.simulationTickHz` (default 20 Hz). Commands drain at tick boundaries, then activation, movement, transfers, and ghost exchange. Multiple isolated simulation workers. |
| 38 | **Code:** `server/src/simulation/simulation.js` (`step`), `server/src/index.js` |
| 39 | |
| 40 | ## Authored world and runtime state persistence |
| 41 | |
| 42 | **Status:** full |
| 43 | **Spec:** `world.sqlite` holds revisioned authored chunks, live world settings, and settings/chunk changelogs. `state.sqlite` holds accounts, characters, and runtime entity state. Databases live under `server/data/` and use Node's SQLite binding. |
| 44 | **Code:** `server/src/persistence/database.js`, `worldDb.js`, `stateDb.js` |
| 45 | |
| 46 | ## World revisions and pending editor saves |
| 47 | |
| 48 | **Status:** partial |
| 49 | **Spec:** Editor chunk saves write a pending world revision. The running process stays pinned to the map revision loaded at startup until an admin **Apply now** (in-process reload). Live world settings do not use this path. Midnight restart/Git deploy is not implemented yet. |
| 50 | **Code:** `server/src/persistence/worldDb.js` (`ensurePendingRevision`, `promotePendingRevision`) |
| 51 | |
| 52 | ## World settings |
| 53 | |
| 54 | **Status:** full |
| 55 | **Spec:** Global cadence, timers, night darkness, bloom post-chain knobs, and chat max characters live in `world_live_settings` and apply as soon as an admin saves. The editor modal uses category tabs (Simulation, Graphics, Inventory, …), marks dirty fields, writes only those fields, and shows a settings edit log (who/when/from/to). Editing night darkness snaps the Night preview to night so the effect is visible (day hours otherwise keep ambient darkening at 0). Chunk Apply now is not required. Some timers are stored before the systems that consume them exist. |
| 56 | **Code:** `shared/definitions/worldSettings.js`, `server/src/persistence/worldDb.js` (`world_live_settings`, `world_settings_edit_log`), `server/src/editor/service.js` (`loadSettings`, `saveSettings`), `client/src/editor/settingsModal.js` |
| 57 | |
| 58 | ## Baked lighting |
| 59 | |
| 60 | **Status:** full |
| 61 | **Spec:** On chunk save, raycast light from blocks with `lightRangeTiles` through passable tiles, including across chunk borders. Store a 16×16 intensity map (0–255, smoothstep falloff by tile distance). Torch range is 8 tiles. |
| 62 | **Code:** `server/src/lighting/baker.js`, tests in `server/tests/lighting.test.js` |
| 63 | |
| 64 | ## World editor (server) |
| 65 | |
| 66 | **Status:** full |
| 67 | **Spec:** Admin API to load/save a chunk, toggle open/closed, paint ground/blocks (including spawners and banks), write changelog bullets, edit live world settings, and apply the pending map revision. Marketplace stalls wait on later economy work. |
| 68 | **Code:** `server/src/editor/service.js` |
| 69 | |
| 70 | ## World editor (client) |
| 71 | |
| 72 | **Status:** full |
| 73 | **Spec:** Separate `/editor` page. 3×3 chunk view with the selected chunk centred and outlined in red. Chunk-step navigation, paint only inside the selected chunk, hover preview of the selected tool, mouse-wheel zoom (centred on the selected chunk) and Shift+wheel to cycle visual states, open/closed, per-chunk changelog, night preview slider, world-settings modal, save chunk and Apply now. Spawner paint uses mob type, max alive and range; bank is a placeable block. Placeholder sprites stand in until real art exists. |
| 74 | **Code:** `client/editor.html`, `client/src/editor/main.js`, `client/ui/editor.css` |
| 75 | |
| 76 | ## Per-chunk changelog |
| 77 | |
| 78 | **Status:** full |
| 79 | **Spec:** Each save stores who, when, and structured bullets of ground/block/open-closed diffs. |
| 80 | **Code:** `server/src/editor/service.js` (`diffChunks`), `server/src/persistence/worldDb.js` (`world_chunk_edit_log`), tests in `server/tests/editor-diff.test.js` |
| 81 | |
| 82 | ## WebSocket gateway |
| 83 | |
| 84 | **Status:** full |
| 85 | **Spec:** JSON WebSocket on `/ws`, HTTP static files for the client. Connections belong to the gateway. Clients send intentions that are queued onto the simulation tick. Editor messages are admin-only. |
| 86 | **Code:** `server/src/gateway/websocket.js`, `server/src/gateway/http.js`, `server/src/index.js` |
| 87 | |
| 88 | ## Stub authentication |
| 89 | |
| 90 | **Status:** full |
| 91 | **Spec:** Until auth.timfalken.com exists, each connection is `admin-<n>`. `n` starts at connected-count+1 and skips names already in use so two live sessions cannot share a stub id. Stub accounts are admins. |
| 92 | **Code:** `server/src/auth/stub.js` |
| 93 | |
| 94 | ## Characters |
| 95 | |
| 96 | **Status:** full |
| 97 | **Spec:** Unlimited characters per account, one in the world. First name is not globally unique; last name is globally unique per account; first+last unique per account, case-insensitive. Male/female body. Spawn requires an open tile. |
| 98 | **Code:** `server/src/characters/service.js`, `server/src/persistence/stateDb.js` |
| 99 | |
| 100 | ## Character deletion and inheritance |
| 101 | |
| 102 | **Status:** full |
| 103 | **Spec:** 24h delayed delete, cancellable. Notify via stub log (or email when present). Names and surname claims are freed on permanent delete. Inventory, equipment, carried coins, and vault move to the account inheritance tab, claimable at a bank into another character's vault. |
| 104 | **Code:** `server/src/characters/service.js`, `server/src/persistence/stateDb.js` (`account_inheritance`) |
| 105 | |
| 106 | ## 3×3 chunk replication |
| 107 | |
| 108 | **Status:** full |
| 109 | **Spec:** Players receive the current chunk and eight neighbours as snapshots. Closed chunks are still sent. Afterwards the gateway sends `ENTITY_SPAWN`, compact `ENTITY_MOVE` (tile + gait) and `ENTITY_DESPAWN`; appearance and path stay off the move payload. Tile deltas are not used yet because live tile edits wait for Apply now. Visible chunks may be owned by different workers; the gateway never reassigns regions for rendering. |
| 110 | **Code:** `server/src/simulation/simulation.js` (`snapshotFor`, `snapshotChunk`, `drainReplication`), `server/src/gateway/websocket.js` (`syncSubscriptions`, `publishEntity`) |
| 111 | |
| 112 | ## Click-to-move and A\* pathfinding |
| 113 | |
| 114 | **Status:** full |
| 115 | **Spec:** `MOVE_TO` runs A\* over the visible 3×3 using block passability and open-chunk bounds. Occupied tiles block. Server commits integer tiles on the movement cadence. |
| 116 | **Code:** `server/src/navigation/astar.js`, `server/src/simulation/workerWorld.js` (`#moveTo`, `#stepMovement`) |
| 117 | |
| 118 | ## Global walk/run cadence |
| 119 | |
| 120 | **Status:** full |
| 121 | **Spec:** Walk 2 tiles/s, run double. Movement ticks at run rate. `SetGait` chooses every-other vs every movement tick. |
| 122 | **Code:** `server/src/simulation/workerWorld.js` (`#stepMovement`, `#setGait`) |
| 123 | |
| 124 | ## Client movement interpolation |
| 125 | |
| 126 | **Status:** full |
| 127 | **Spec:** Client lerps sprites between replicated tiles over the walk or run interval from world settings. |
| 128 | **Code:** `client/src/render/worldView.js` (`moveEntity`, `update`) |
| 129 | |
| 130 | ## Play viewport and camera |
| 131 | |
| 132 | **Status:** full |
| 133 | **Spec:** Camera stays centered on the local player. Scroll-wheel zoom is viewport-only (1×–4×) and does not change server visibility. Hovering another player shows their first name; clicking them inspects instead of issuing move. |
| 134 | **Code:** `client/src/render/worldView.js`, `client/src/play/main.js`, `client/index.html` |
| 135 | |
| 136 | ## Night shading |
| 137 | |
| 138 | **Status:** full |
| 139 | **Spec:** World time is server time minus 1200 years. At night, unlit tiles are darkened by `nightDarkness` (a live world setting) and reachable tiles use the baked 0–255 intensity so a torch fades tile-by-tile instead of a hard circle. Tile shade overlays sit above baked ground/block atlases. Sprites larger than 16×16 (and all mobiles) take the full darkness of their standing tile as a uniform sprite-sized shade overlay, so they are not darkened by neighbouring tile shades. |
| 140 | **Code:** `client/src/render/worldView.js` (`nightFactor`, `#updateShade`, `#placeSpriteShade`), `server/src/simulation/simulation.js` (`worldTime`) |
| 141 | |
| 142 | ## FrameworkV3 client bootstrap |
| 143 | |
| 144 | **Status:** full |
| 145 | **Spec:** FrameworkV3 is a git submodule at `client/frameworkv3`, built first via `npm run build:client`. Game code lives in `client/src`. Server does not import it. |
| 146 | **Code:** `.gitmodules`, `client/frameworkv3`, `client/scripts/build-framework.mjs` |
| 147 | |
| 148 | ## Sprite size, pivot and Y-sort |
| 149 | |
| 150 | **Status:** full |
| 151 | **Spec:** World sprites may be any pixel size. Pivot is horizontal centre and 8px from the sprite bottom, placed on the tile centre. Blocks and mobiles are Y-sorted (north behind south). Ground/block definitions set `frames`, `framesPerRow`, and `animationSpeed` for sprite sheets. Immobile ≤16×16 blocks bake into per-row chunk strips; taller sprites stay individually Y-sorted. |
| 152 | **Code:** `shared/render/pivot.js`, `shared/definitions/tiles.js`, `client/src/render/worldView.js`, `client/src/render/chunkBake.js`, tests in `server/tests/pivot.test.js` |
| 153 | |
| 154 | ## Visual tile states |
| 155 | |
| 156 | **Status:** full |
| 157 | **Spec:** Each ground and block type has a folder of PNG states. The first alphabetical file is the default. States are visual only; the game may set a named state (for example a door). The editor wheel cycles states; hover previews the selected tool on the target tile. |
| 158 | **Code:** `server/src/assets/spriteCatalog.js`, `shared/definitions/tileSprites.js`, `client/src/editor/main.js`, `client/src/render/worldView.js`, tests in `server/tests/tile-states.test.js` |
| 159 | |
| 160 | ## Region workers and cross-worker transfer |
| 161 | |
| 162 | **Status:** full |
| 163 | **Spec:** Isolated simulation workers own regions. Default is two in-process workers behind a clone-on-boundary protocol (`SIMULATION_WORKER_MODE=thread` uses `worker_threads`). Neighbour-sticky assignment; an entity that steps into a foreign region is frozen, accepted on the destination, then removed from the source (one authoritative copy). Ghost occupancy is visible for pathfinding. Dynamic load rebalance is later. |
| 164 | **Code:** `server/src/simulation/simulation.js`, `workerWorld.js`, `inProcessWorker.js`, `threadWorker.js`, tests in `server/tests/worker-*.test.js` |
| 165 | |
| 166 | ## ChunkLoader activation and unload persistence |
| 167 | |
| 168 | **Status:** full |
| 169 | **Spec:** Players carry `ChunkLoader` (3×3 simulating chunks, 3×3 resident regions). Chunks with no simulation refs stay dormant in memory. Regions with no residency refs unload after `regionUnloadGracePeriodMs`. Persistent entities are written on unload and restored on the next load; non-persistent entities are discarded. |
| 170 | **Code:** `server/src/simulation/chunkLoader.js`, `server/src/simulation/simulation.js`, `server/src/persistence/stateDb.js` (`persistent_entities`) |
| 171 | |
| 172 | ## Midnight restart and Git deploy |
| 173 | |
| 174 | **Status:** not implemented |
| 175 | **Spec:** systemd + manifest-driven Git deploy. Pending world/code changes apply at server-local midnight, with an admin immediate-restart path. Crashes must not pull. |
| 176 | **Code:** — |
| 177 | |
| 178 | ## Spawners |
| 179 | |
| 180 | **Status:** full |
| 181 | **Spec:** Spawner blocks with mob type, max alive, and range. They fire only in open, simulating chunks. Spawned mobs get `SpawnOrigin`; persistence follows the mob definition (deer are not persistent). Wildlife options are deer and hostile rats. Pigeons are not ambient wildlife. |
| 182 | **Code:** `server/src/simulation/spawners.js`, `shared/definitions/mobs.js`, `client/assets/blocks/spawner/`, `client/assets/mobs/deer/`, `client/assets/mobs/rat/` |
| 183 | |
| 184 | ## Character logout resume |
| 185 | |
| 186 | **Status:** full |
| 187 | **Spec:** Despawning a character (logout / disconnect) writes their live tile to `characters`. The next login reloads that row after despawn and resumes there (or the nearest free enterable tile within a short spiral if blocked), instead of jumping to a distant world spawn. |
| 188 | **Code:** `server/src/simulation/simulation.js` (`spawnCharacter`, `despawnCharacter`), tests in `server/tests/character-resume.test.js` |
| 189 | |
| 190 | ## Inventory, items, equipment, ground drops |
| 191 | |
| 192 | **Status:** full |
| 193 | **Spec:** 32-slot inventory, stacking, equipment slots with a separate `equipSprite` overlay on the body, carried currency, player drops that last `groundItemDespawnDurationMs` (default 10 minutes). Pickup requires standing on the tile. Inventory is private UI state; nearby clients see ground items and worn overlays. New characters start with paper, apples, a stick, a cloth shirt, and coins. Placeholder item/equipment PNGs until real art exists. |
| 194 | **Code:** `shared/definitions/items.js`, `shared/items/inventory.js`, `server/src/items/bags.js`, `client/src/play/inventory.js` |
| 195 | |
| 196 | ## Combat, skills, groups, pigeons |
| 197 | |
| 198 | **Status:** partial |
| 199 | **Spec:** Melee auto-attack with stick (Clubfighting + Strength), LMB/RMB targeting and context menu (including **Follow \<name\>** / **Attack \<name\>**), engage/retaliate, swipe VFX, and client dynamic-light hooks. Follow reuses the target's vacated trail and remaining path (stop one tile short, wait for vacancy, walkability each step); catch-up A* only when no shared trail yet. Break beyond one chunk width. Ranged/spells/groups/pigeon dispatch remain design-only. |
| 200 | **Code:** `shared/definitions/skills.js`, `server/src/simulation/follow.js`, combat tick, `client/src/play/` context menu + swipe, tests in `server/tests/combat.test.js` / `server/tests/follow.test.js` |
| 201 | |
| 202 | ## Proximity chat |
| 203 | |
| 204 | **Status:** full |
| 205 | **Spec:** Enter opens a bottom chat line (max `chatMaxCharacters`, default 100). Enter trims and sends; Escape cancels. The speaker always sees their own bubble. Other players receive server-side obfuscation: full text within 8 tiles, linear falloff to silent at 16 tiles. At 0% readability the bubble is not sent. |
| 206 | **Code:** `shared/speech/proximity.js`, `server/src/chat/speech.js`, `client/src/play/chat.js`, tests in `server/tests/proximity-speech.test.js` |
| 207 | |
| 208 | ## Friends |
| 209 | |
| 210 | **Status:** full |
| 211 | **Spec:** Character-to-character friends in `state.sqlite`. Hover shows first name; click opens inspect (full name, request/accept/remove). Requests must be accepted. Unfriend is symmetric. Incoming/outgoing lists live in the Friends panel. |
| 212 | **Code:** `server/src/friends/service.js`, `server/src/persistence/stateDb.js`, `client/src/play/social.js`, tests in `server/tests/friends.test.js` |
| 213 | |
| 214 | ## Banking, cheques, shops, player-driven marketplace |
| 215 | |
| 216 | **Status:** partial |
| 217 | **Spec:** Bank blocks can be placed in the editor. Standing next to a bank opens vault deposit/withdraw and inheritance claim. Filled cheques, shop NPCs, and the player marketplace are not in this slice. |
| 218 | **Code:** `server/src/items/bags.js`, `client/src/play/inventory.js`, `client/assets/blocks/bank/` |
| 219 | |
| 220 | ## Player scripting hooks |
| 221 | |
| 222 | **Status:** not implemented |
| 223 | **Spec:** Reserved control abstraction; not in the initial release. |
| 224 | **Code:** — |