Стадии стали данными: AnimalStageDef + AnimalDef.Stages (возраст входа = EnterAt x якорь maturity/lifespan, масштаб, набор текстур baby/adult, флаг adult для размножения); пусто -> встроенный дефолт Baby/Juvenile/Adult/Senior. AnimalFactory.StageAt/RegionFor/Scale/IsAdult работают по данным стадий; системы роста/решения/гона используют флаг adult вместо индекса. Спавн стал данными: AnimalDef.SpawnPer1000Cells — WorldScene рассыпает ВСЕ виды по плотности, не только захардкоженного оленя. Устраняет блокеры расширяемости #5 и #7.
Сборка чистая, --check-content (9 типов дефов).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Нужды стали данными: NeedDef + needs.json (Hunger/Thirst/Rest/Mating), NeedSet (реестр: индексы, тип deplete/drive, поведение-исполнитель по id), динамический AnimalNeeds.Values (managed-массив — новая нужда не меняет структуру). AnimalNeedsSystem универсально считает убывание/рост по NeedDef; UtilityAi строится из NeedSet; действия исполняются по строковому id (реестр поведений) с восполнением нужды через NeedSet. Диета — AnimalDef.Diet (поиск корма гейтится). Добавить нужду/рацион виду = JSON без кода. Устраняет блокеры расширяемости #2 и #4.
Сборка чистая, --check-content (9 типов дефов).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Нужда Mating + лёгкий hediff-каркас (HediffDef, hediffs.json с Rut, Health/HealthState). Гены GeneBreedingSeason/GeneGestationDays/GeneLitterSize. AnimalRutSystem навешивает сезонный гон-хедиф взрослым и поднимает влечение (вне сезона зачатия нет). Действие Mate ищет партнёра противоположного пола и сближается; при контакте самка получает Pregnant (геном отца). AnimalPregnancySystem тикает срок и рожает помёт через Genome.Breed (пол наследуется без YY, поколение+1), с потолком численности.
Сборка чистая, --check-content (8 типов дефов, 33 гена, 32 признака).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Компонент AnimalGrowth (стадия + возраст). Ген пола GeneSex (локус XX/XY; генерация основателя задаёт пол явно через AnimalSet.GenerateGenome, исключая невозможный YY) и GeneMaturityAge. Стадии Baby->Juvenile->Adult->Senior с порогами из генов. AnimalGrowthSystem меняет спрайт (детёныш/самец/самка) и размер по стадии; AnimalMortalitySystem — смерть от старости и истощения (деспавн), замыкает контур ёмкости среды. Стадо спавнится разновозрастным.
Сборка чистая, --check-content (30 генов, 29 признаков).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
AnimalNeeds (голод/жажда/отдых) падают по гену метаболизма. Два слоя ИИ: AnimalDecisionSystem (движковый UtilityAi выбирает действие и ищет ближайшую еду/воду) и AnimalActionSystem (движение к цели со скоростью по гену + утоление: выедание растений с гибелью выеденной травы, питьё у кромки воды, сон). AnimalAppearanceSystem тускнеет с острой нуждой. Кромка воды считается из террейна; команда popstats для наблюдаемости дрейфа генов.
Сборка чистая. Контур ёмкости среды частичный — смерть от голода придёт в A3.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Полный план зоологии на генетическом фундаменте: 7 столпов (гены, жизненный цикл, размножение, здоровье по модели RimWorld, мозг/интеллект, нужды, настроение), моддинг данными, фазы A1-A8 и экологический горизонт.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LittleSim.Web (Blazor WASM + KNI/WebGL) is a real network client now: it
connects to the dedicated server over WebSocket (ClientWebSocket maps to
the browser socket), applies MrGameEng.Net delta snapshots into its
EntityStore and draws pawns through SpriteBatch — fatigue dims them just
like on desktop. The server address comes from ?server=ws://host:port
in the page URL, defaulting to the page's host on port 9050. The net
contract is mirrored in NetContract.cs (KNI and DesktopGL assemblies
can't mix until the graphics libraries build per platform) with loud
keep-in-sync comments on both sides.
Both clients now smooth replicated positions between 10 Hz snapshots:
NetLerp + NetSmoothingSystem lerp the visual position toward the latest
server position every frame (exponential, ~0.25 s to converge).
Verified against a live LittleSim.Server --listen: the browser client
connects (server log), draws ~3.3k lit pixels of pawns whose layout
changes between samples, and survives 400+ ticks without errors. Found
along the way: requestAnimationFrame freezes in hidden windows — the
game loop only runs while the tab is visible.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
spikes/KniWeb (outside LittleSim.sln): a kni-blazor-gl template project
(KNI 4.2.9001, net8.0) referencing MrGameEng.Core directly. A mini-host
in the GameHost mold drives EngineContext/GameClock/Scene phases over
KNI's Game; the scene moves 300 Friflo entities in the update phase and
draws them with SpriteBatch (WebGL). Verified in a real browser: sprites
render and animate, browser console is clean.
Decision (docs/web-client.md): path A — KNI — is the primary route for
the web client; the core runs in Blazor WASM unchanged thanks to the
Core/Host split. Known follow-ups: per-platform compilation of the
graphics libraries against nkast.* packages, shader compatibility for
Renderer2D, HTTP-served content instead of the filesystem.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bump the engine submodule to a684c23 (Climate + day/night ambient). The
world scene now registers UseClimate and UseDayNight, so it darkens at
night and the HUD shows the season and temperature alongside the date.
Add docs/растения.md capturing the whole plant-ecosystem design (growth as
a suitability product, hybrid Mendelian genome, climate, lighting with
shadows, reproduction, persistence) and the A-D phase plan.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Wire the engine's new MrGameEng.AI module into a PawnBrain for world pawns,
plus surrounding content/scene tweaks. Apply CSharpier across the game and
document the convention in CLAUDE.md. Add .vscode/settings.json so the editor
formats on save with the CSharpier extension.
The whole game is now described by Mods/Core — the first consumer of
the engine's new MrGameEng.Mods module:
- textures/ moved to Mods/Core/Textures; atlases are built at game
start from the merged texture tree of all active mods into Cache/
(gitignored, incremental) instead of being committed, and the
GameAssets atlas handles are gone with them
- terrain, plants and pawns are JSON defs (Mods/Core/Defs) with parent
inheritance; scenes read TerrainDef/PlantDef/PawnDef instead of
hardcoded arrays, and the TerrainKind enum is retired
- HUD strings come from Mods/Core/Languages (ru default, en fallback)
through LanguageManager; the language switches at runtime
- new console commands: mods, lang [code], defs [type]; atlas now
inspects the runtime-built cache
- bump engine: MrGameEng.Mods module and the explicit-sources
AtlasBuilder overload
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
God-game: minimal graphics, deep simulation. The engine lives in the
engine/ git submodule and its sources plus test suites are part of
LittleSim.sln, so engine and game are developed in one editor window.
Playable skeleton: seed-deterministic terrain (smoothed height field ->
water/sand/grass/forest/mountain tinted cells), 80 wandering villagers
on a Y-sorted layer, god camera (WASD pan, wheel zoom, world-bounds
clamp), HUD and the dev console with a 'regen [seed]' command.
CLAUDE.md sets the game rules: simulation-first, one-seed determinism,
simulation/presentation split, a console command for every mechanic.
Design docs in Russian under docs/.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>