Add Climate and day/night ambient lighting
CI / build-test (push) Successful in 1m11s

Climate (Core) layers a continuous seasonal-plus-daily temperature and the
current season over the Calendar, registered via context.UseClimate. A new
Lighting module (Graphics) adds DayNight: a daylight factor and ambient
color from the calendar's time of day, pushed into the renderer's new
AmbientLight (multiplied into world-space sprites only, so the scene
darkens at night while screen-space overlays stay readable) and exposed as
a sampleable SampleAt for the simulation. Both deterministic and GPU-free,
covered by tests; docs updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Leonid Pershin
2026-06-12 16:45:49 +03:00
co-authored by Claude Opus 4.8
parent f39ee9e787
commit a684c23cd9
8 changed files with 413 additions and 5 deletions
+7 -2
View File
@@ -29,12 +29,17 @@ Engine libraries (each feature is a namespaced subfolder of its host):
- **`Core`** — game loop, ECS world, scenes, time (`GameClock` with `TimeScale`; `GameSpeed`
for discrete pause/1×/3×/6× speed control over the clock, `context.UseGameSpeed(...)`;
`Calendar` turning scaled time into in-game days, `context.UseCalendar(secondsPerDay)`),
`Calendar` turning scaled time into in-game days, `context.UseCalendar(secondsPerDay)`;
`Climate` — continuous seasonal/daily temperature and season over the calendar,
`context.UseClimate(settings)`),
plus **Input** (`MrGameEng.Input`: `InputManager`, `ActionMap`, `InputSystem`, in
`Core/Input/`). Depends only on MonoGame and Friflo.Engine.ECS.
- **`Graphics`** — custom batched renderer, camera, sprites, plus **Tilemaps**
(`MrGameEng.Tilemaps`: code-built tile grids rendered through the batcher,
`scene.UseTilemaps()` after `UseRenderer2D()`, in `Graphics/Tilemaps/`). → `Core`.
`scene.UseTilemaps()` after `UseRenderer2D()`, in `Graphics/Tilemaps/`) and **Lighting**
(`MrGameEng.Lighting`, `Graphics/Lighting/`: day/night ambient over the `Calendar` driving
`Renderer2D.AmbientLight` on world layers, `scene.UseDayNight(renderer)`; a sampleable
`DayNight.SampleAt` for the simulation — point lights and shadows land here later). → `Core`.
- **`Audio`** — ogg playback (NVorbis); `AudioManager` with `SoundVolume`/`MasterVolume`
(one knob for effects + music). → `Core`.
- **`Content`** — the asset/content pipeline: **Assets** (`MrGameEng.Assets`: runtime