BlueGit

timfa questward

Files

questward / docs / FEATURES.md

FEATURES.md

FEATURES.md 9.0 KiB Download Raw

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. Code: server/src/world/chunkData.js, shared/definitions/tiles.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. Code: server/src/world/chunkData.js (open flag), server/src/simulation/simulation.js (isEnterable, #walkableFor), editor save in server/src/editor/service.js

ECS registry and components

Status: partial Spec: Entities are compositions of components with integer tile positions. First-version components are position, movement, appearance, and character. No worker-local handles or full component set yet. Code: server/src/ecs/world.js

Simulation tick

Status: partial Spec: Fixed tick from WorldSettings.simulationTickHz (default 20 Hz). Commands drain at tick boundaries. Single process; no region 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 and settings. 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 saves write a pending world revision. The running process stays pinned to the revision loaded at startup until an admin Apply now (in-process reload). Midnight restart/Git deploy is not implemented yet. Code: server/src/persistence/worldDb.js (ensurePendingRevision, promotePendingRevision)

World settings

Status: partial Spec: Global cadence and timers live in authored world_settings per revision, with design defaults. Walk speed and tick rate can be saved from the editor. Other timers are stored but not all are consumed yet. Code: server/src/persistence/worldDb.js, shared/protocol/constants.js (DEFAULT_WORLD_SETTINGS)

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 reach mask (encoded intensity). 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, write changelog bullets, edit world settings, and apply the pending revision. Marketplace/bank/spawner placement is later. Code: server/src/editor/service.js

World editor (client)

Status: not implemented Spec: Separate admin UI. One chunk at a time, chunk-step navigation, paint palette, open/closed, changelog, night preview slider, settings modal. Code: —

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: partial Spec: 24h delayed delete, cancellable. Notify via stub log (or email when present). Names and surname claims are freed on permanent delete. Inventory/equipment/wallet/vault inheritance is not implemented (no items yet). Code: server/src/characters/service.js (scheduleDelete, cancelDelete, processDueDeletions)

3×3 chunk replication

Status: partial Spec: Players receive the current chunk and eight neighbours as snapshots. Closed chunks are still sent. Entity moves are incremental; tile deltas are not used yet because live tile edits wait for Apply now. Code: server/src/simulation/simulation.js (snapshotFor), server/src/gateway/websocket.js (syncSubscriptions)

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/simulation.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/simulation.js (#stepMovement, #setGait)

Client movement interpolation

Status: not implemented Spec: Client lerps sprites between replicated tiles over the walk or run interval. Code: —

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

16×16 sprite contract

Status: not implemented Spec: World sprites must be exactly 16×16. Reject at load. CI/unit test lists every offender and fails. Code: —

Play viewport and camera

Status: not implemented Spec: Camera stays centered on the local player. Zoom is viewport-only and does not change server visibility. Code: —

Night shading

Status: not implemented Spec: World time is server time minus 1200 years. At night, tiles the baked light map cannot reach are darkened. Code: —

Region workers and cross-worker transfer

Status: not implemented Spec: Regions owned by simulation workers, ghost borders, entity transfer. First version is a single process. Code: —

ChunkLoader activation and unload persistence

Status: partial Spec: Chunks around players are loaded into memory for simulation and visibility. Character positions persist on despawn. There is no grace-period unload writer yet; authored data is already in world.sqlite. Code: server/src/simulation/simulation.js (#ensureChunk, despawnCharacter)

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: not implemented Spec: Spawner blocks with mob type, max alive, range. Do not fire in closed chunks. Code: —

Inventory, items, equipment, ground drops

Status: not implemented Spec: 32-slot inventory, stacking, equipment overlays, temporary ground items. Waiting on item assets. Code: —

Combat, skills, groups, proximity chat, pigeons

Status: not implemented Spec: Later systems described in the design. Not part of the first playable slice. Code: —

Banking, cheques, shops, player-driven marketplace

Status: not implemented Spec: Marketplace and related world features are built in the world editor after the required assets exist. Code: —

Player scripting hooks

Status: not implemented Spec: Reserved control abstraction; not in the initial release. Code: —

Source
1# Feature implementation tracker
2
3Living companion to `tile_mmo_server_technical_design_v0.6.md`.
4Statuses: **not implemented** · **partial** · **full**.
5
6Each 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.
20**Code:** `server/src/world/chunkData.js`, `shared/definitions/tiles.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.
26**Code:** `server/src/world/chunkData.js` (`open` flag), `server/src/simulation/simulation.js` (`isEnterable`, `#walkableFor`), editor save in `server/src/editor/service.js`
27
28## ECS registry and components
29
30**Status:** partial
31**Spec:** Entities are compositions of components with integer tile positions. First-version components are `position`, `movement`, `appearance`, and `character`. No worker-local handles or full component set yet.
32**Code:** `server/src/ecs/world.js`
33
34## Simulation tick
35
36**Status:** partial
37**Spec:** Fixed tick from `WorldSettings.simulationTickHz` (default 20 Hz). Commands drain at tick boundaries. Single process; no region 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 and settings. `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 saves write a pending world revision. The running process stays pinned to the revision loaded at startup until an admin **Apply now** (in-process reload). Midnight restart/Git deploy is not implemented yet.
50**Code:** `server/src/persistence/worldDb.js` (`ensurePendingRevision`, `promotePendingRevision`)
51
52## World settings
53
54**Status:** partial
55**Spec:** Global cadence and timers live in authored `world_settings` per revision, with design defaults. Walk speed and tick rate can be saved from the editor. Other timers are stored but not all are consumed yet.
56**Code:** `server/src/persistence/worldDb.js`, `shared/protocol/constants.js` (`DEFAULT_WORLD_SETTINGS`)
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 reach mask (encoded intensity). 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, write changelog bullets, edit world settings, and apply the pending revision. Marketplace/bank/spawner placement is later.
68**Code:** `server/src/editor/service.js`
69
70## World editor (client)
71
72**Status:** not implemented
73**Spec:** Separate admin UI. One chunk at a time, chunk-step navigation, paint palette, open/closed, changelog, night preview slider, settings modal.
74**Code:** —
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:** partial
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/wallet/vault inheritance is not implemented (no items yet).
104**Code:** `server/src/characters/service.js` (`scheduleDelete`, `cancelDelete`, `processDueDeletions`)
105
106## 3×3 chunk replication
107
108**Status:** partial
109**Spec:** Players receive the current chunk and eight neighbours as snapshots. Closed chunks are still sent. Entity moves are incremental; tile deltas are not used yet because live tile edits wait for Apply now.
110**Code:** `server/src/simulation/simulation.js` (`snapshotFor`), `server/src/gateway/websocket.js` (`syncSubscriptions`)
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/simulation.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/simulation.js` (`#stepMovement`, `#setGait`)
123
124## Client movement interpolation
125
126**Status:** not implemented
127**Spec:** Client lerps sprites between replicated tiles over the walk or run interval.
128**Code:** —
129
130## FrameworkV3 client bootstrap
131
132**Status:** full
133**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.
134**Code:** `.gitmodules`, `client/frameworkv3`, `client/scripts/build-framework.mjs`
135
136## 16×16 sprite contract
137
138**Status:** not implemented
139**Spec:** World sprites must be exactly 16×16. Reject at load. CI/unit test lists every offender and fails.
140**Code:** —
141
142## Play viewport and camera
143
144**Status:** not implemented
145**Spec:** Camera stays centered on the local player. Zoom is viewport-only and does not change server visibility.
146**Code:** —
147
148## Night shading
149
150**Status:** not implemented
151**Spec:** World time is server time minus 1200 years. At night, tiles the baked light map cannot reach are darkened.
152**Code:** —
153
154## Region workers and cross-worker transfer
155
156**Status:** not implemented
157**Spec:** Regions owned by simulation workers, ghost borders, entity transfer. First version is a single process.
158**Code:** —
159
160## ChunkLoader activation and unload persistence
161
162**Status:** partial
163**Spec:** Chunks around players are loaded into memory for simulation and visibility. Character positions persist on despawn. There is no grace-period unload writer yet; authored data is already in `world.sqlite`.
164**Code:** `server/src/simulation/simulation.js` (`#ensureChunk`, `despawnCharacter`)
165
166## Midnight restart and Git deploy
167
168**Status:** not implemented
169**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.
170**Code:** —
171
172## Spawners
173
174**Status:** not implemented
175**Spec:** Spawner blocks with mob type, max alive, range. Do not fire in closed chunks.
176**Code:** —
177
178## Inventory, items, equipment, ground drops
179
180**Status:** not implemented
181**Spec:** 32-slot inventory, stacking, equipment overlays, temporary ground items. Waiting on item assets.
182**Code:** —
183
184## Combat, skills, groups, proximity chat, pigeons
185
186**Status:** not implemented
187**Spec:** Later systems described in the design. Not part of the first playable slice.
188**Code:** —
189
190## Banking, cheques, shops, player-driven marketplace
191
192**Status:** not implemented
193**Spec:** Marketplace and related world features are built in the world editor after the required assets exist.
194**Code:** —
195
196## Player scripting hooks
197
198**Status:** not implemented
199**Spec:** Reserved control abstraction; not in the initial release.
200**Code:** —