Commit Graph
47 Commits
Author SHA1 Message Date
Leonid PershinandClaude Opus 4.8 003f235440 Животные A8 часть 2: инспектор животных (вкладки нужды/здоровье/настроение)
InspectPanel осматривает и животных: вкладки Обзор (стадия/возраст/пол/поколение/беременность), Нужды, Здоровье (кровь/боль, способности, хедифы), Настроение (значение + мысли). Набор вкладок по типу выбранного. SelectionSystem пикает и животных (запрос расширен PlantGrowth → +AnimalOrganism). Локализация inspect.*/need.*/hediff.*/cap.*/animalstage.* ru+en. Базовый план зоологии A1-A8 закрыт. Сборка + --check-content чистые.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 06:19:23 +03:00
Leonid PershinandClaude Opus 4.8 1b12831817 Животные A8 часть 1: настроение — ядро (ThoughtDef + Mood + MoodSystem)
Тип дефа ThoughtDef + thoughts.json (роды/спаривание/жажда — сила и длительность данными). Компонент Mood (значение 0..1, активность по тиру мозга, список затухающих мыслей) на всех животных; AnimalMoodSystem (тир 4+: настроение из непрерывного фона — средняя удовлетворённость убывающих нужд минус боль — плюс сумма мыслей). Реестр ThoughtSet + id-константы AnimalThoughts; триггеры: роды (PregnancySystem), спаривание и утоление жажды (ActionSystem). Низкое настроение подавляет спаривание (DecisionSystem). Команда mood [species]. Локализация thought.* ru/en. Сборка + --check-content чистые (11 типов дефов). Осталось A8.2 — вкладки инспектора.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 06:13:46 +03:00
Leonid PershinandClaude Opus 4.8 26bf83db64 Животные A7: мозг → интеллект → гейт нужд/действий
Эффективный интеллект = brainSize (ген) × Consciousness (capacity из здоровья), AnimalFactory.Intelligence. AnimalContext гейтит выбор ИИ: нужда с minBrain выше интеллекта особи в выбор не входит (AnimalDecisionSystem читает Health поэлементно). Пороги в needs.json — тиры мозга (голод 0.0, жажда 0.25, сон/секс 0.40; у оленя мозг ~0.45). Обратная связь от повреждения мозга: болезнь/боль/кровопотеря роняют сознание → интеллект падает → первыми отключаются сон/спаривание. Команда intel <species> [consciousness]. Сборка + --check-content чистые.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 06:00:11 +03:00
Leonid PershinandClaude Opus 4.8 9f8ff93591 Животные A6: болезни и иммунитет
HediffDef расширен (initialSeverity/severityPerDay/immunityPerDay/lethalSeverity/pain/ambientPerDay/capMods); хедифы стали инстансами (Hediff: тяжесть+иммунитет). AnimalHealthSystem (медленный тик ~час): фоновое заражение, гонка тяжесть<->иммунитет (выздоровление при иммунитете 1 / смерть при летальной тяжести), пересчёт способностей с болью и capMods; смерть по здоровью оставляет труп. Первый реальный источник урона: Moving подключён к скорости (больные медленнее). Болезнь Fever; команда infect для теста.

Сборка чистая, --check-content (10 типов дефов).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 05:48:05 +03:00
Leonid PershinandClaude Opus 4.8 9db12273c9 Животные A5 (часть 2): части тела, кровь, capacities
BodyDef/BodyPartDef + bodies.json (Quadruped — данные: иерархия органов, вклады в способности). AnimalDef.Body. HealthState расширен Parts/BloodLevel/Pain/Capacities; CapacityCalc обобщённо считает способности по зависимостям (кровь->сердце/лёгкие->сознание->движение/зрение), модовые проходят сырыми. Фабрика строит части (HP x размер тела) и начальные способности. Источников урона нет -> всё на полном HP, способности=1 (каркас под болезни/хищников). Команда body <species>.

Сборка чистая, --check-content (10 типов дефов).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 05:36:34 +03:00
Leonid PershinandClaude Opus 4.8 c90bf32460 Животные A5 (часть 1): смерть → труп → разложение
Компонент Corpse + CorpseSystem: после смерти животное оставляет труп (AnimalFactory.CreateCorpse, мясо ∝ размер тела) вместо деспавна; труп разлагается Fresh→Rotting→Skeleton→исчезает со скоростью от температуры, тинтуясь по стадии. AnimalDef.CorpseTexture + спрайт трупа в AnimalSet; смертность спавнит труп. Продукты мясо/кости/шкура заданы (разделка/падальщики — позже).

Сборка чистая, --check-content (9 типов дефов). Части тела/кровь/capacities — часть 2 A5.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 05:22:11 +03:00
Leonid PershinandClaude Opus 4.8 cbc74c0794 Рефактор: зрение/скорость/выедание животного — из дефа вида
Завершает вынос баланса в данные: AnimalDecisionSystem.VisionRadius берёт дальность из AnimalDef.VisionCells (× ген), TryFindPlant/TryFindMate принимают готовый радиус; AnimalActionSystem берёт BaseSpeed и ForageBiteDays из дефа вида (через AnimalSet). Убраны хардкод-константы скорости/зрения/выедания.

Сборка чистая, --check-content (9 типов дефов).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 05:16:44 +03:00
Leonid PershinandClaude Opus 4.8 5d0cbd2115 Рефактор: стадии роста и спавн — данными
Стадии стали данными: 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>
2026-06-14 04:57:44 +03:00
Leonid PershinandClaude Opus 4.8 f12b0f170c Рефактор: нужды и диета — данными, а не кодом
Нужды стали данными: 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>
2026-06-14 04:46:47 +03:00
Leonid PershinandClaude Opus 4.8 d4a370e02d Рефактор: геном животного — данными, а не кодом
AnimalGenomeDef (фикс. поля) убран; AnimalDef.Genome теперь словарь geneId->base. AnimalSet.BuildTemplate строит шаблон generically по реестру генов (разброс из самого GeneDef, дискретные поддержаны). Модер добавляет ген особи одной строкой JSON в animals.json — без правки кода. Устраняет блокер расширяемости #1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 04:39:16 +03:00
Leonid PershinandClaude Opus 4.8 97521f81b8 Животные A4: размножение (гон-хедиф, беременность, роды)
Нужда 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>
2026-06-14 04:32:18 +03:00
Leonid PershinandClaude Opus 4.8 355ced4937 Животные A3: жизненный цикл, стадии и пол
Компонент 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>
2026-06-14 04:20:44 +03:00
Leonid PershinandClaude Opus 4.8 e35e620655 Животные A2: нужды и ИИ (выбор + исполнение)
AnimalNeeds (голод/жажда/отдых) падают по гену метаболизма. Два слоя ИИ: AnimalDecisionSystem (движковый UtilityAi выбирает действие и ищет ближайшую еду/воду) и AnimalActionSystem (движение к цели со скоростью по гену + утоление: выедание растений с гибелью выеденной травы, питьё у кромки воды, сон). AnimalAppearanceSystem тускнеет с острой нуждой. Кромка воды считается из террейна; команда popstats для наблюдаемости дрейфа генов.

Сборка чистая. Контур ёмкости среды частичный — смерть от голода придёт в A3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 04:13:50 +03:00
Leonid PershinandClaude Opus 4.8 5e61491960 Животные A1: фундамент — AnimalDef, гены зверя, спавн оленя
Новый тип дефа Animal (AnimalDef : PawnDef) + animals.json (Deer). 8 организм-агностичных животных генов в genes.json. AnimalPhenotype/AnimalOrganism, AnimalSet (шаблон генома вида) и AnimalFactory — зеркала растительных PlantSet/PlantFactory. Детерминированный спавн стада оленей по суше в WorldScene с рендером и тинтом меха по гену; консольная команда 'animal <species>'.

Проверено: сборка чистая, --check-content (7 типов дефов, 28 генов).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 04:03:51 +03:00
Leonid Pershin 9c9502414b Update plant definitions and localization. Adjusted GrassA sizeCells from 1.2 to 1.5 and added new plant types including BaseWarmTree, BaseColdTree, and various cacti. Enhanced terrain definitions with scatter probabilities for new plants. Updated product definitions to include fiber and mushrooms, and localized new plant and product names in English and Russian. Updated engine subproject commit to 08381703f79377a5bc48fc0745620f8815695b05-dirty. 2026-06-13 06:55:43 +03:00
Leonid Pershin b9bb7006be Enhance UI localization and settings functionality. Added new localization keys for inspection tabs and UI scale settings in both English and Russian. Updated GameSettings to include a UiScale property. Refactored scenes to utilize UseScaledUI for consistent UI scaling across various game scenes. Improved InspectPanel to support tabbed navigation for overview, genes, and products. Adjusted SettingsPanel to allow users to modify UI scale dynamically. 2026-06-13 06:24:53 +03:00
Leonid Pershin f46ae15dc6 Update engine subproject commit to f382fc98eadc4a489689e51e88748b616661a560-dirty; adjust plant genetics for optimal temperature and hardiness traits, enhance terrain scatter probabilities, and improve UI localization for connection status. Refactor multiplayer scene to implement exponential backoff for reconnections and streamline game initialization in web client. 2026-06-13 05:21:17 +03:00
Leonid Pershin cc1841c2e2 Enhance plant genetics system with cold and heat hardiness traits. Updated genes.json to include GeneColdHardiness and GeneHeatHardiness, and modified plant definitions to incorporate these traits. Adjusted temperature tolerance calculations in PlantPhenotype and PlantLifecycleSystem to account for temperature stress. Improved documentation and added temperature stress management in the lifecycle system. 2026-06-13 04:34:03 +03:00
Leonid PershinandClaude Fable 5 e57c45bfd3 Merge main (gene system G1-G5, phases C-D) into the multiplayer branch
Main independently adopted the engine Core/Host split in G1, so the
scene adaptations conflicted with identical changes here — resolved in
main's favor (its scenes also carry the gene-driven world). Kept from
this branch: BootScene's --connect path into MultiplayerScene, the
buildAtlases switch in GameContent.Load (with the Task.Run lambda fix
its optional parameter requires), net.* localization keys, and the
Net/Server/Web projects in the solution. Program.cs now has both CLI
modes: --check-content (main) and --connect (here). The engine pointer
lands on d044caf, which linearly contains both lines of work.

Verified on the merged tree: 366 engine tests pass, --check-content
reports genes/traits intact, and a live --listen server replicates
moving pawns to the probe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 04:23:51 +03:00
Leonid PershinandClaude Opus 4.8 37d8c976a3 G5: bump engine (regex tooling), showcase grouping/patch/validators
Engine pointer -> d044caf (formula gene grouping, content patches, def
field validation). Game-side demonstration of all three:

- genes.json: GeneHardiness whose effect is gsum('Gene.*Tolerance') — a
  derived trait summing all tolerance genes via regex grouping.
- patches.json: a content patch giving every Bush* plant a wood harvest
  product, applied to Core's own defs at load.
- GameContent registers load-time validators: Gene/Product defNames must
  carry their type prefix.
- Program: a --check-content headless mode that loads all mod defs (running
  patches + validators) and computes a sample genome's traits (compiling
  every gene formula, grouping included) — a CI-friendly content lint.

Verified: --check-content reports 6 def types, 18 genes, 8 plants, 18
traits with hardiness computed from the gene group. Full suite green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 04:00:26 +03:00
Leonid PershinandClaude Opus 4.8 7fc4bcd301 G4: gene-driven content — fruiting, harvest products, leaf color
New plant content, all driven by genes through the trait layer (no engine
change — the genetics machinery already supports it).

- ProductDef + products.json (wood, grass, berries, acorn) — what plants
  yield; localized labels (ru/en).
- New numeric genes (genes.json): GeneFruitYield, GeneFruitSeason,
  GeneHarvestAmount, GeneLeafHue, each declaring its trait via formula.
  GenomeDef carries the per-species bases (PlantSet maps them into the
  species template); PlantDef gains harvestProduct / fruitProduct.
- PlantPhenotype gains FruitYield/FruitSeason/HarvestAmount/LeafHue.
  PlantFactory tints the sprite from the leaf-hue gene (combined with the
  morph variant). Plants carry a Fruiting component; PlantFruitingSystem
  ripens fruit on mature plants during their gene-chosen season and drops
  it off-season.
- plants.json: trees give wood + acorns (autumn), bushes berries (summer),
  grass gives grass — amounts/season/hue from genes.
- 'plant <species> [seed]' console command samples a species genome and
  prints its gene-driven traits and products.

Build clean; def JSON validated; boot smoke loads the new content.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 03:50:03 +03:00
Leonid PershinandClaude Fable 5 580cb6ccc9 Browser multiplayer client: promote the KNI spike to src/LittleSim.Web
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>
2026-06-13 00:04:11 +03:00
Leonid PershinandClaude Opus 4.8 9c2c2d7fd0 G3: migrate plants onto genes/traits (drop fixed PlantGenome)
Plants now carry a managed Genome and read formula-computed traits
instead of the hardcoded PlantGenome struct. Engine pointer -> ead2251
(GenomeTemplate + Breed mutationChance override).

- PlantOrganism { Genome; PlantPhenotype Traits } replaces PlantGenome.
  Traits (optima/tolerances, vigor, lifespan, dispersal, reproduce
  interval, self-pollination, mutation rate, morph variant) come from
  Phenotype.Compute over the gene effect formulas in genes.json.
- PlantSet builds a per-species GenomeTemplate by mapping each species'
  existing plants.json genome numbers onto the shared GeneDefs, and
  exposes the gene registry. Species values unchanged — only reinterpreted
  through genes now.
- Growth and lifecycle systems read PlantOrganism.Traits; breeding goes
  through Genome.Breed with the registry and a mutation chance averaged
  from the parents' evolvable mutationRate trait. Scatter generates from
  the species template.
- Save stores the genome as a geneId->Allele map; load rebuilds it
  (empty/legacy saves regenerate from the template — dev saves disposable).

Behaviour matches phases A-D, now fully data-driven through genes and
formulas. Full suite green; boot smoke test loads genes + plants cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 23:59:46 +03:00
Leonid PershinandClaude Fable 5 e8273f9ffa Multiplayer: networked dedicated server + desktop client over MrGameEng.Net
Engine bump brings MrGameEng.Net (WebSocket transport, RFC 6455 server,
delta component replication) — this commit is its showcase.

LittleSim.Server --listen runs the world online: 24 pawns wander, tire
and rest on the engine's fixed-tick HeadlessHost (the same Wander/
Needs/Decision systems the windowed world uses), a WebSocketServer
accepts clients and a ReplicationServer ships Transform2D + PawnNeeds
deltas at 10 snapshots/s per the shared NetSchema. --probe is the CLI
check: it connects, listens for a second and prints replicated pawns
with positions sampled twice to show the world is alive.

The game gains MultiplayerScene (dotnet run --project src/LittleSim --
--connect [ws://host:port]): simulation stays on the server, the client
applies snapshots into its scene store, decorates spawned entities with
sprites and reuses PawnAppearanceSystem so replicated fatigue darkens
pawns locally. HUD strings go through ru/en localization; the `net`
console command reports connection state and entity count. Esc returns
to the main menu.

Verified end to end: probe sees 24 pawns moving between samples; the
windowed client connects and runs against a live local server.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 23:45:35 +03:00
Leonid PershinandClaude Opus 4.8 91a00b4305 G2: bump engine (gene foundation), load genes + gene demo command
Engine pointer -> bc18db5: brings in the organism-agnostic gene
foundation (GeneDef, managed Genome, Phenotype trait computation) plus a
parallel MrGameEng.Net library the game does not use.

Game wiring: register the "Gene" def type and ship Mods/Core/Defs/
genes.json — a full gene set covering the plant phenotype dimensions
(environment optima/tolerances, vigor, lifecycle, reproduction) plus a
discrete morph gene, each declaring its trait effects as formulas. A
dev-console 'gene [seed]' command generates a genome from these defs,
prints its alleles, expressed values and computed traits, then breeds a
child — demonstrating the whole pipeline end to end. These genes seed
the G3 migration of plants onto traits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 23:43:50 +03:00
Leonid PershinandClaude Opus 4.8 32bae03869 G1: bump engine (formula engine + Host split), wire formula demo
Engine pointer -> 10898b0, which brings in two engine changes:
- the gene-system formula engine (Core): a data-driven expression
  evaluator that compiles a def string once and evaluates it
  allocation-free against a variable context;
- a parallel refactor splitting the platform out of Core into a new
  MrGameEng.Host library.

Game migration for the Host split: reference MrGameEng.Host (+ add it
and its test project to the solution), import MrGameEng.Host where
GameHost/GameHostOptions/Input are used, switch Transition.Fade ->
Transitions.Fade, and read the device via context.GetGraphicsDevice()
now that EngineContext is platform-free.

Showcase the formula engine with a dev-console 'formula <expr>' command
that compiles and evaluates an expression. Also adds docs/гены.md, the
gene-system design doc (phases G1-G5).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 23:30:44 +03:00
Leonid PershinandClaude Fable 5 8a7e2cce52 Adopt the engine Core/Host split; add LittleSim.Server headless prototype
Engine bump: MrGameEng.Core is now platform-free (Friflo only), the
windowed MonoGame host lives in the new MrGameEng.Host library, and the
core gains HeadlessHost — a fixed-timestep loop without a window or GPU.

Game side: scenes switch to Transitions.Fade from the Host library,
WorldScene reads the graphics device via Context.GetGraphicsDevice(),
GameContent.Load(buildAtlases: false) skips atlas building for headless
runs.

LittleSim.Server is the dedicated-server seed and the showcase for
HeadlessHost: it loads mods/defs without textures and fast-forwards the
world calendar and climate on a fixed tick (~3.6M ticks/s in Debug):

  dotnet run --project src/LittleSim.Server -- --days 10 --tps 60

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 23:13:40 +03:00
Leonid PershinandClaude Opus 4.8 49936a1de3 Phase D: spatial lighting with shadows; local light drives growth
Bump the engine submodule to 79d406a (2D lightmap). The world scene now uses
UseLighting instead of the per-sprite ambient: a lightmap multiplies day/night
× occlusion over the world, so forests cast soft shade and the world darkens
spatially toward night. Occluders are mountains (new TerrainDef.BlocksLight)
plus mature trees, rebuilt from the live population. PlantGrowthSystem samples
the local light per plant (Lighting.SampleAt), so undergrowth under canopy
grows slower. A dev-console 'light' command places a point light at the cursor
to show cast shadows at night. Completes the plant ecosystem (A–D).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 18:40:31 +03:00
Leonid PershinandClaude Opus 4.8 a04e867e87 Phase C: plant reproduction (Mendel), death and persistence
Plants now live full lives. The genome gains lifespan, dispersal, fecundity,
self-pollination, mutation-rate and a discrete dominant/recessive Morph gene;
PlantGenome.Breed models meiosis (one allele per parent) plus mutation. A
gated PlantLifecycleSystem builds a per-cell grid (density + a species/genome
representative), reaps plants past their lifespan, and lets mature plants seed
offspring — cross-pollinating with a mature same-species neighbour in dispersal
range (falling back to self-pollination by gene) into a nearby land cell under
the density cap. A shared PlantFactory creates every plant (initial scatter,
births, save restore) and tints recessive-morph plants. Growth keeps aging
mature plants so they can die of old age. The whole population (genomes,
positions, age, stage) is saved to WorldSave and restored on load instead of
re-scattering from the seed. plants.json carries the new genes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 18:21:38 +03:00
Leonid PershinandClaude Opus 4.8 bfe1b139f0 Phase B: plant genome drives growth via environment suitability
Bump the engine submodule to d0104df (Suitability.Gaussian). Each plant now
carries a diploid PlantGenome (allele pairs, phenotype = allele average) seeded
from a per-species GenomeDef baseline at spawn. PlantGrowthSystem replaces the
flat fertility multiplier with vigor times a product of Gaussian suitabilities
for light (day/night), temperature (climate season) and the cell's fertility —
so plants grow faster in their preferred light/warmth/soil and crawl outside it.
Genomes are visible and editable in the ECS inspector. plants.json carries the
species genomes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 17:52:27 +03:00
Leonid PershinandClaude Opus 4.8 aff5a947c5 Phase A: wire climate + day/night into the world; design doc
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>
2026-06-12 16:46:05 +03:00
Leonid PershinandClaude Opus 4.8 147ab203f1 Soil fertility scales calendar-driven plant growth
Bump the engine submodule to f39ee9e (half-texel UV inset that removes the
black tile seams seen while zooming). Add a Fertility multiplier to
TerrainDef (forest soil rich, sand/mountain poor); plants record their
cell's fertility as PlantGrowth.GrowthRate at spawn, and the growth system
multiplies the per-frame calendar day-delta by it — so growth stays tied to
the in-game calendar and runs faster on fertile soil.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 13:45:00 +03:00
Leonid PershinandClaude Opus 4.8 9f67c478a2 Zoom the god camera toward the cursor
The mouse-wheel zoom now keeps the world point under the cursor fixed
(cursor-anchored zoom) by shifting the camera position after applying the
new zoom, instead of zooming around the camera centre. GodCameraSystem
takes the renderer to map the cursor to world space.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 13:29:49 +03:00
Leonid PershinandClaude Opus 4.8 26e234a35e Show calendar date/time in the world HUD; base speed 3 in-game min/sec
Bump the engine submodule to 4b91b60 (calendar time of day) and display
the current date and time in the world HUD (День N, HH:MM) instead of just
the day number. Set the day length to 480 scaled seconds so the base (x1)
speed runs at 3 in-game minutes per real second.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 13:10:23 +03:00
Leonid PershinandClaude Opus 4.8 d0f8fec273 Add the F1 ECS inspector overlay to the world scene
Bump the engine submodule to 09dbdfa (MrGameEng.Inspector) and wire the
new DevTools-style ECS debugger into WorldScene via UseInspector(renderer),
before UseDevConsole so the console still draws on top. The HUD controls
hint now mentions F1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 12:46:15 +03:00
Leonid PershinandClaude Opus 4.8 1030f27c50 Bring plants back as data-driven growth stages over the calendar
Bump the engine submodule to f791ee6 (Calendar) and use it to drive plant
growth. PlantDef gains a Stages list (texture/size/growDays per stage,
inheritable via abstract parents in plants.json); a resolved PlantSet
table turns those into atlas regions and day thresholds at scene load.

New PlantGrowth component plus PlantGrowthSystem advance each plant by
in-game days from the Calendar and swap its sprite/scale at stage borders.
WorldScene scatters plants again with a seed-deterministic, varied initial
maturity, registers the calendar and growth system, and the HUD now shows
the current day. Stage durations and visuals are pure data in plants.json.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 09:47:18 +03:00
Leonid PershinandClaude Opus 4.8 923644dd19 Rework world scene into a textured tile terrain on engine WorldGen
Bump the engine submodule to 5365945 (MrGameEng.WorldGen) and drive
terrain from it: WorldGenerator is now a thin adapter over the engine's
seed-based Perlin/fBm/island HeightmapGenerator instead of the old
random+smoothing pass.

Strip WorldScene down to terrain + camera: render the world as a single
Tilemap entity using per-biome surface textures from the atlas (water
falls back to a tinted tile), and remove pawns, plants, AI systems,
population and save-restore for now. Delete the TerrainScene demo (its
tile approach now lives in WorldScene) along with its console command
and the hud.terrain/population localization strings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 09:24:32 +03:00
Leonid Pershin dc13b9b8c3 Enhance localization and world generation features
- Added new UI strings for menus, settings, and pause functionality in both English and Russian localization files.
- Introduced a new WorldPresetDef class to define world size and population settings, allowing for dynamic world creation.
- Updated world generation logic to support customizable terrain smoothing and population settings based on user-defined presets.
- Refactored WorldScene to utilize the new WorldConfig structure for improved world initialization and loading.

This commit improves the user experience by providing more options for world creation and enhancing the overall localization of the game.
2026-06-12 08:41:30 +03:00
Leonid Pershin dd3e9e400d Update project references in LittleSim.sln and LittleSim.csproj to include new MrGameEng.Content and MrGameEng.Simulation modules, while removing obsolete references. Mark engine submodule as dirty to indicate uncommitted changes. 2026-06-12 07:43:41 +03:00
Leonid Pershin 58de27248e Add pawn utility-AI brain; format code with CSharpier; enforce formatter
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.
2026-06-12 07:20:03 +03:00
Leonid PershinandClaude Fable 5 8b531bcd7e Game as the Core mod: data-driven content and localization
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>
2026-06-11 21:51:46 +03:00
Leonid Pershin 218973ae60 Update engine submodule to latest commit a395e584583b979fd39c05038604f933204773a3-dirty 2026-06-11 21:20:23 +03:00
Leonid PershinandClaude Fable 5 bc95227e8c Terrain scene: atlas animals, surface tiles, grass and collisions
Creatures are now animals only (bear, deer, fox, hare, boar, timber
wolf, muffalo, squirrel) from things/pawn/animal, replacing humanlike
pawns and man-made props. Land tiles use proper terrain/surfaces
textures (sand, mossy for grass, soil under forest, rough-hewn rock
for mountains); grass cells get grassa tufts and occasional bushes.

Collisions via the new engine module: animals carry circle colliders
(layer masks: animal vs animal+obstacle), trees get static trunk
colliders, and SeparationSystem resolves overlaps by pushing animals
apart and out of trees after CollisionSystem each tick.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 15:17:22 +03:00
Leonid PershinandClaude Fable 5 e3ad22c4bd Regenerate atlases for the lowercase textures/ tree, fix region keys
New texture groups (ui, world, weather, damage, designations) packed into
31 atlases; directories are lowercase now, so scene code switches to the
new region keys (filenames keep their case).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 12:28:56 +03:00
Leonid PershinandClaude Fable 5 fa7f27642c Add TerrainScene: code-built tilemap terrain with pawns and props
Small seed-generated terrain rendered as a single Tilemap entity: water,
sand and mountains are tinted tiles, grass and forest use atlas textures.
Three wandering pawns and a few props (snowman, lamp, stool, trees) live
on the shared Y-sort layer (now in GameLayers, used by both scenes).
Console: 'terrain [seed]' from the world scene, 'regen'/'world' inside.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 10:36:27 +03:00
Leonid PershinandClaude Fable 5 3c777c53b8 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>
2026-06-11 09:03:35 +03:00
Leonid PershinandClaude Fable 5 beed114508 Initial LittleSim scaffold on the mrgameeng engine submodule
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>
2026-06-11 05:33:10 +03:00