Files
LittleSim/CLAUDE.md
T
Leonid PershinandClaude Fable 5 631dd24ade Bump engine: sample project removed, LittleSim is the showcase
CLAUDE.md now states the dual role: every new engine feature gets
demonstrated in this game as part of landing the feature.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 15:26:17 +03:00

61 lines
2.6 KiB
Markdown

# LittleSim
A god-game: minimal graphics, deep simulation. Built on the **mrgameeng** engine
(MonoGame + Friflo ECS), vendored as the git submodule `engine/` so the game and the
engine are developed side by side in one editor window.
This game is also the **engine's showcase**: mrgameeng has no sample project, so every
new engine feature gets demonstrated here (a scene, a console command, or a system
using it) as part of landing the feature.
Game design docs live in `docs/` and are written in **Russian**. Engine rules live in
`engine/CLAUDE.md` — read it before touching engine code; both rule sets apply here.
## Layout
```
engine/ mrgameeng git submodule (own repo, own CLAUDE.md)
src/LittleSim the game (net8.0); references engine projects directly
docs/ концепт, симуляция, roadmap (Russian)
LittleSim.sln game + engine sources + engine tests — one window for everything
```
## Commands
```
git submodule update --init # after fresh clone
dotnet build LittleSim.sln
dotnet run --project src/LittleSim -c Release # measure perf in Release only
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
Engine changes are committed **inside `engine/` first** (engine repo, its commit style),
pushed to the engine remote, then the submodule pointer bump is committed here.
Never commit a pointer to an unpushed engine commit.
## Game rules
- Simulation first: depth of behavior over visuals. Graphics stay primitive
(tinted quads are fine); complexity budget goes to simulation systems.
- Determinism: the whole world derives from one integer seed. Systems that need
randomness own a seeded `Random`; never use `Random.Shared` inside simulation.
- Simulation/presentation split: simulation systems mutate components only;
rendering reads them. No draw calls or UI from simulation systems.
- ECS-first per the engine: plain `struct : IComponent` data, logic in systems.
- Every new mechanic gets a dev-console command for testing (`regen`, `timescale`, …).