feat(ecology): F3a — deterministic EcologySpawner (slot-scatter baseline + placement validation) #254
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!254
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/ecology-f3"
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
F3a of the ecology foundation (epic #250, slice #251; on F1 #252 + F2 #253): the deterministic
EcologySpawner— natural nodes now appear across the world without hand-placement, generated and validated server-side.Owner-agreed design: the generation engine is C#; the policy (species↔biome,
spacing) is data incontent/ecology.txt; a future per-species LuacanSpawnAtpredicate is a documented seam inEcologyPlacement, not built. Generation is lazy per chunk (EnsureChunkGenerated).S×Sslots per species (S=spacing); each slot hashes ONE candidate cell (SplitMix64 ofworldSeed+slot+species), owned by the chunk that contains it. Order-independent, no shared state, same(worldSeed, world)→ same baseline on every server/restart. Baseline nodes are planted at the epoch so even their growth clock is deterministic.EcologyPlacement) — every candidate validated against the authoritative map: off-map / obstacle / non-walkable / road / wrong-biome / existing static or node / too-steep (8-neighbour ΔZ) /IsSuppressedseam (reserved for player structures, returns false).GameOptions.WorldSeed+ a boundEcologyOptions(spawner chunk size, max slope ΔZ);Worldgains thinEnsureChunkGenerated/EnsureChunkForCelldelegates (the cell→chunk math lives in the spawner —World.csstays delegation-only).No in-game-visible surface yet (like F1/F2): nothing calls
EnsureChunkGeneratedat runtime until F4 wires it to AoI observation. Deferred: F4 (AoI trigger +NaturalNode*DTOs + protocol), F3b (baseline/delta persistence + offline recovery + self-GC), F5 (client render), and the harvest system + skills.Heads-up for F3b (from the whole-branch review): baseline node identity is a per-session
Guid; a regenerate-on-restart baseline mints fresh Guids, so F3b must key baseline identity on the cell (deterministic, one-per-cell), never assume Guid stability across restart.How it was tested
EcologyScatter(determinism, seed-sensitivity, slot-owned-by-one-chunk, spacing-0 skip);EcologyPlacement(accept + every reject gate — water/wrong-biome/road/static/node/suppressed/slope);EcologySpawnerviaWorld(deterministic node set, idempotent regeneration, validation respected, cell→chunk routing); the spacing parser; a boot smoke test.check-doc-refsresolves; fulldotnet testgreen.Screenshots: N/A — no client-visible surface yet (the AoI trigger + render are F4/F5).
Checklist
just lint(CSharpier + analyzers, 0 warnings)just testgreen (whole solution)check-doc-refsgreenWorld.csdelegation-only; single-threaded, no lock