feat(mapeditor): edit the chunked world at 133M scale — top-down paint editor (PR 4a of #229) #234
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!234
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/editor-chunked-4a"
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
Fase 4a of the world-map migration (epic #229): the map editor now opens, renders and edits the chunked world at 133M-cell scale, so Andrea can actually draw the planet.
Key changes:
EditorGameonChunkedEditModel(was the denseMapModel): opens a world directory (content/worlds/asterra/) by reading only the manifest, or a fresh ocean of a configurable size (default 13,344×9,984); incremental save (only changed regions); import a legacyworld.maponce.MapPaintRenderer) instead of iso. The editor is a drawing — the game renders the iso look. Each terrain gets one hex colour (itsTileDataTint); the visible window is filled chunk-by-chunk into a single bitmap, uploaded once per view-move/edit and blitted each frame — fast at world scale, no per-cell draw. (WYSIWYG-iso is dropped for the editor; the guardrail is updated to match.)ChunkedFlood): flood the connected terrain region — draw a coastline, fill the interior with grass. Bounded (per-chunk visited bitmaps + a cell budget) so an unclosed border can't fill the 133M ocean — it aborts with no change.Brush.Line/Brush.Stroke, Bresenham): a fast drag paints a gap-free line instead of skipped cells.chunk cx,cy+px/cellreadout — so the author can tell zoom + position on a flat map.IsoViewport.VisibleCellBoundsextracted intoClient.Core(the game's ground blend + the editor both use it, tested once).--world/--import/--goto/--cellpx/--screenshot.content/worlds/asterra/— a continent draft (grass coast, brown interior, islands, a volcano). A draft: spawn not yet set.Not in scope (later slices): the full-planet overview / mip (Fase 4b), undo/redo + autosave, statics/Z shown on the map, and — importantly — wiring the chunked world into the client/server (Fase 7): the game still reads the legacy
world.map, so this world is authored + tested in the editor, not yet playable in-game.Screenshots / recording
Piloted via the editor's headless
--screenshot— see the comment below (fresh 133M ocean, imported 2304², the scale grid, and the authoredasterracontinent).How it was tested
Client.Core+MapEditor.Core):IsoViewport.VisibleCellBounds(symmetry / zoom / camera-centred, +3);ChunkedFlood(fills a bordered region, aborts over budget, +2);Brush.Line/Stroke(endpoints + gap-free, +3); modelRaiseZ/InBounds(+2).dirty 0(no per-cell allocation); the imported 2304² world renders; the authoredasterraworld opens and round-trips (dirty 0, byte-identical save/reopen).dotnet testfully green (MapEditor.Core 42, Client.Core 181, …);just lint+check-docsclean;docs/map-editor.md+ the editor guardrail updated.DoD delta (beyond the base DoD + epic #229)
Allaga/New-ocean, incremental save, legacy import, and a bounded Fill that cannot run away on the ocean.asterramap).Checklist
just lintpasses (CSharpier + analyzers, zero warnings)just testis greenScreenshot pilotati (editor headless
--screenshot):La world asterra creata da Andrea (continente + vulcano), aperta a 0.5px/cella

Griglia di scala (chunk/regione) + import 2304

Oceano fresco 13.344x9.984 = 133.226.496 celle, dirty 0
