feat(mapeditor): chunk-backed edit model — overlay, Allaga, incremental save (PR 3 of #229) #232
No reviewers
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo!232
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/world-map-editor-model"
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?
Summary
Third slice of the world-map migration (epic #229) — the chunk-backed editor model (
MapEditor.Core), the piece that lets the editor open and edit the 133 M-cell world with bounded memory. This is the engine-agnostic model only; theEditorGameUI wiring and authoring UX (zoom/overview/brushes) are the next slice, and undo/redo + autosave/journal are separate follow-ups (kept out to keep this reviewable).ChunkedEditModel(stacked on the PR #231 store):WorldMapStore, else the default terrain. Opening reads only the manifest.EditableChunkis created only when a cell in it is edited, so retained memory is bounded by the edited set, never the map (a test edits one cell of the 133 M world and asserts a single dirty chunk).FloodMap(Allaga mappa) — the ocean initializer: a manifest default-flip that drops all overrides in one step, no 133 M-cell loop. (The liquid-preserving flood that keeps Z/statics needs the terrain/liquid split — Fase 5.)WorldMapStore.HasMaterializedChunk(so incremental save keeps untouched base chunks without decoding them) andWorldMapPathsmade public (single source of the on-disk layout for the editor).Stacked on #231 (which is stacked on #230). The diff currently includes both parents' commits; I'll rebase onto
mainas they merge so this shows only the edit-model commit.Screenshots / recording
N/A — engine-agnostic model, not yet wired into the editor UI (nothing rendered changes). Screenshots come with the UI-wiring slice, captured by piloting the editor.
How it was tested
tests/IsoMmo.MapEditor.Core.Tests/Chunked): new-ocean reads default everywhere with nothing materialized; edits materialize only touched chunks; save→reopen round-trips terrain/elevation/statics/spawn; opens the 13,344×9,984 world, edits one cell with a single dirty chunk; flood resets to default and removes all region files; incremental save leaves untouched regions byte-identical; editing an existing chunk preserves its other cells; unknown-terrain and out-of-bounds rejected.dotnet testfully green (MapEditor.Core 35, incl. the 9 new);just lintclean.DoD delta (beyond the base DoD + epic #229)
Allaga mappais a single default-flip that clears to the default without materializing chunks.EditorGamestill uses the existingMapModel(UI swap is the next slice).Checklist
just lintpasses (CSharpier + analyzers, zero warnings)just testis green30d36149b7375fa7281a