Add MrGameEng.Tilemaps: code-built tile grids rendered through the batcher
CI / build-test (push) Failing after 1m4s

TileSet maps ids to texture regions with tints (0 = empty), TileGrid is a
bounds-checked dense ushort grid, and the Tilemap component places a grid
in the world per render layer. UseTilemaps() inserts TilemapRenderSystem
before the flush; it submits only the camera-visible cell range
(TilemapMath.VisibleCells), so frame cost scales with the screen, not the
grid. Demonstrated in the sample as a checkerboard floor; Tiled loading
stays on the roadmap on top of this API.
This commit is contained in:
Leonid Pershin
2026-06-11 10:24:47 +03:00
parent b318d1e795
commit b3415120c3
15 changed files with 548 additions and 6 deletions
+5 -3
View File
@@ -20,12 +20,14 @@ Engine modules: `Core` (game loop, ECS world, scenes, time), `Graphics` (custom
renderer, camera, sprites), `Input`, `Audio`, `Assets` (runtime loading, no content
pipeline), `Assets.Generator` (Roslyn source generator for typed asset handles),
`Atlases` (texture-atlas builder + runtime loader; CLI wrapper in `tools/MrGameEng.AtlasTool`),
`UI` (Myra integration: `scene.UseUI()` after `UseRenderer2D()`), `DevConsole`
(in-game console capturing `Core.Log`; `scene.UseDevConsole()` last in OnLoad).
`Tilemaps` (code-built tile grids rendered through the batcher; `scene.UseTilemaps()`
after `UseRenderer2D()`), `UI` (Myra integration: `scene.UseUI()` after `UseRenderer2D()`),
`DevConsole` (in-game console capturing `Core.Log`; `scene.UseDevConsole()` last in OnLoad).
Dependency rule: every module may depend only on `Core`; `Core` depends only on
MonoGame and Friflo.Engine.ECS. `Assets.Generator` is a netstandard2.0 analyzer.
Documented exceptions: Myra renders with its own SpriteBatch internally; `Atlases`
depends on `Graphics` (Texture2DRegion) and `Assets` (loader registration).
depends on `Graphics` (Texture2DRegion) and `Assets` (loader registration);
`Tilemaps` depends on `Graphics` (regions, layers, renderer).
## Commands