Known-structures memory + bigger map: fix the East re-founding loop

Root cause of the homeless East: FoundOwnShelter searched all buildings by
proximity (within 30 units), so a lone selfish builder who wandered off to
gather wood for the walls came back, missed their own foundation, and
founded a NEW one - 5,900+ abandoned foundations per run, none finished.

Fix (per the exploration architecture): structures are known like resource
nodes. NPCs gain a KnownStructures set; a builder registers the home they
lay and returns to it via known-structures memory however far they roamed,
instead of re-founding. Children inherit their family's known buildings.
Result: 5,953 -> 31 founding events, East now houses itself with COMPLETED
homes and is the best-fed town (0.84), still lowest-knowledge/highest-debris
as selfishness should be.

Also expanded the world 768 -> 1152 with towns pushed to wider cardinal
points and resources scaled to area, giving the four cultures more room and
less accidental center overlap. Full 240-day four-town run in 189s.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-21 22:11:59 -04:00
parent 9e8ee1d748
commit 0c0c7088f8
3 changed files with 102 additions and 36 deletions
+10 -9
View File
@@ -28,7 +28,7 @@ public class ResourceNode
/// </summary>
public class World
{
public const int GridSize = 768;
public const int GridSize = 1152;
public List<ResourceNode> Nodes { get; } = new();
@@ -63,14 +63,15 @@ public class World
/// </summary>
public void Generate()
{
// Resource counts scale ~9× with the 3× larger world so density holds.
PlaceMany(MaterialKind.Water, count: 40, amount: float.PositiveInfinity, regen: 0f);
PlaceMany(MaterialKind.Clay, count: 80, amount: 40f, regen: 0.5f);
PlaceMany(MaterialKind.Wood, count: 480, amount: 30f, regen: 2f);
PlaceMany(MaterialKind.Stone, count: 140, amount: 80f, regen: 0f); // more deposits — housing was stone-capped
PlaceMany(MaterialKind.Food, count: 360, amount: 20f, regen: 4f);
PlaceMany(MaterialKind.Ore, count: 40, amount: 60f, regen: 0f); // metal source (post-MVP tier)
PlaceMany(MaterialKind.Herb, count: 120, amount: 15f, regen: 3f); // medicine / trade good
// Resource counts scale with area (1152² ≈ 2.25× the 768² world) so
// density holds as the towns spread to wider cardinal points.
PlaceMany(MaterialKind.Water, count: 90, amount: float.PositiveInfinity, regen: 0f);
PlaceMany(MaterialKind.Clay, count: 180, amount: 40f, regen: 0.5f);
PlaceMany(MaterialKind.Wood, count: 1080, amount: 30f, regen: 2f);
PlaceMany(MaterialKind.Stone, count: 315, amount: 80f, regen: 0f);
PlaceMany(MaterialKind.Food, count: 810, amount: 20f, regen: 4f);
PlaceMany(MaterialKind.Ore, count: 90, amount: 60f, regen: 0f);
PlaceMany(MaterialKind.Herb, count: 270, amount: 15f, regen: 3f);
}
private void PlaceMany(MaterialKind kind, int count, float amount, float regen)