Pack Textures/ into atlases and render the world from them

Engine bump brings MrGameEng.Atlases (atlas builder + runtime loader).
Textures/ (2747 images) is packed by MrGameEng.AtlasTool into 10 atlases
(93 pages) under Assets/Atlases, loaded through generated handles.
Beings now draw pawn bodies, forest cells grow trees (both Y-sorted),
and the dev console gains 'atlas [name] [filter]' for inspection.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Leonid Pershin
2026-06-11 09:03:35 +03:00
co-authored by Claude Fable 5
parent 4159c3754a
commit 3c777c53b8
108 changed files with 22627 additions and 6 deletions
+13
View File
@@ -25,6 +25,19 @@ dotnet run --project src/LittleSim -c Release # measure perf in Release only
dotnet test LittleSim.sln # runs the engine test suites dotnet test LittleSim.sln # runs the engine test suites
``` ```
## Texture atlases
Source images live in `Textures/` (committed); the game only loads packed atlases from
`src/LittleSim/Assets/Atlases` (also committed — the asset generator emits
`GameAssets.Atlases.*` handles for them). After changing `Textures/`, rebuild with:
```
dotnet run --project engine/tools/MrGameEng.AtlasTool -c Release -- Textures src/LittleSim/Assets/Atlases --group-depth 2
```
Rebuilds are incremental (unchanged groups are skipped). Region keys are paths relative
to `Textures/` without extension: `atlas.GetRegion("Things/Plant/TreeOak/TreeOakA")`.
## Submodule workflow ## Submodule workflow
Engine changes are committed **inside `engine/` first** (engine repo, its commit style), Engine changes are committed **inside `engine/` first** (engine repo, its commit style),
+1 -1
Submodule engine updated: d6f19b9119...b318d1e795
@@ -0,0 +1,31 @@
{
"version": 1,
"name": "Terrain.Surfaces",
"pageSize": 2048,
"padding": 2,
"pages": [
{
"file": "Terrain.Surfaces.atlas.0.png",
"width": 256,
"height": 128
}
],
"regions": [
{
"key": "Terrain/Surfaces/Marsh",
"page": 0,
"x": 2,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "Terrain/Surfaces/Marsh_bright",
"page": 0,
"x": 68,
"y": 2,
"w": 64,
"h": 64
}
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 717 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 919 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 KiB

@@ -0,0 +1,63 @@
{
"version": 1,
"name": "Things.World",
"pageSize": 2048,
"padding": 2,
"pages": [
{
"file": "Things.World.atlas.0.png",
"width": 1024,
"height": 256
}
],
"regions": [
{
"key": "Things/World/WorldObjects/Expanding/PirateOutpost",
"page": 0,
"x": 2,
"y": 2,
"w": 128,
"h": 128
},
{
"key": "Things/World/WorldObjects/Expanding/Town",
"page": 0,
"x": 132,
"y": 2,
"w": 128,
"h": 128
},
{
"key": "Things/World/WorldObjects/Expanding/TownRough",
"page": 0,
"x": 262,
"y": 2,
"w": 128,
"h": 128
},
{
"key": "Things/World/WorldObjects/Expanding/Village",
"page": 0,
"x": 392,
"y": 2,
"w": 128,
"h": 128
},
{
"key": "Things/World/WorldObjects/Expanding/VillageRough",
"page": 0,
"x": 522,
"y": 2,
"w": 128,
"h": 128
},
{
"key": "Things/World/WorldObjects/Expanding/VillageSavage",
"page": 0,
"x": 652,
"y": 2,
"w": 128,
"h": 128
}
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@@ -0,0 +1,127 @@
{
"version": 1,
"name": "UI.Buttons",
"pageSize": 2048,
"padding": 2,
"pages": [
{
"file": "UI.Buttons.atlas.0.png",
"width": 1024,
"height": 128
}
],
"regions": [
{
"key": "UI/Buttons/MainButtons/IconAnimals",
"page": 0,
"x": 2,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconArchitect",
"page": 0,
"x": 68,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconAssign",
"page": 0,
"x": 134,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconFactions",
"page": 0,
"x": 200,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconHistory",
"page": 0,
"x": 266,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconMechanoids",
"page": 0,
"x": 332,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconMenu",
"page": 0,
"x": 398,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconQuests",
"page": 0,
"x": 464,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconResearch",
"page": 0,
"x": 530,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconRestrict",
"page": 0,
"x": 596,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconSchedule",
"page": 0,
"x": 662,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconWildlife",
"page": 0,
"x": 728,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconWork",
"page": 0,
"x": 794,
"y": 2,
"w": 64,
"h": 64
},
{
"key": "UI/Buttons/MainButtons/IconWorld",
"page": 0,
"x": 860,
"y": 2,
"w": 64,
"h": 64
}
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@@ -0,0 +1,23 @@
{
"version": 1,
"name": "UI.Overlays",
"pageSize": 2048,
"padding": 2,
"pages": [
{
"file": "UI.Overlays.atlas.0.png",
"width": 256,
"height": 256
}
],
"regions": [
{
"key": "UI/Overlays/NeedsPower",
"page": 0,
"x": 2,
"y": 2,
"w": 128,
"h": 128
}
]
}

Some files were not shown because too many files have changed in this diff Show More