Commit Graph
13 Commits
Author SHA1 Message Date
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 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 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 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 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 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 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