# Maniac Engine

A real-time 3D engine and editor by Maniac Lab, written in C++20.

## New in v1.0.3 (steady far shadows, Maniac City fixes)

- The sun's far shadow distance is saved and set with `world.set sun.farShadowDistance`; far shadows and Virtual Shadow Map pages draw at a fixed LOD, so they no longer jump as you move or come closer.
- `enter_vehicle` works on a vehicle spawned in the same frame.

## New in v1.0.2 (realistic brows and lashes in the Character Creator, fixes)

- Character Creator: brows and lashes are meshes of real hairs (Mindfront's CC0 sets from MakeHuman: 14 brows, 5 lashes) bound to the skin; new Brow Style / Lash Style. The skins' eyelids are no longer orange.
- Socket "root" is always the actor; `instance_transform` returns the angles it was given; `Input.simulate("MouseX")` turns the camera on carriers too.
- Vehicles and every simulated body are drawn between their last two physics steps above 60 Hz (with their wheels, riders and the seated player's camera): no more shaking at 144 Hz.
- Every Lua function that takes a position takes `x, y, z`, `{x, y, z}` or `{x = .., y = .., z = ..}`; Data Validation reads `"Lap%02d.wav"` as a pattern (the files that fit are used and packaged).
- Clear glTF errors (which node has two parents, loops, indices out of range); per-instance tint with alpha 0 reads as opaque; DX12 on Linux falls back to OpenGL quietly.

## New in v1.0.1 (144 Hz+ screens, Max FPS, unlit glTF, grass on meshes, Mass agents)

- glTF `KHR_materials_unlit` (VRoid / VRM characters) is drawn Unlit.
- Everything attached to the local player is drawn where the body is drawn above 60 Hz; `actor:drawn_transform()`; socket "root".
- Max FPS in Project Settings and `t.MaxFPS` (the player's own stays `Engine.set_max_fps`); `Engine.set_engine_indicators(false)` and `Engine.engine_prompt()`.
- `set_instance_transform` / `instance_transform`; Mesh Grass component; `Mass.nearest_agent` / `Mass.remove_agent`; `actor:heading()`, `actor:steering_toward()`.
- Pooled items stop at their stack size; `Input.simulate` moves the camera (MouseX, PadRightX); no Aim on a carrier.

## New in v1.0 (installers on every platform, AI navigation over the whole map, doors for AI, the storm's next circle, swap_slots)

- Installers: Windows `Maniac Engine Setup.exe`, Linux `.deb`, macOS `.dmg`, Maniac OS `.mapp` (the zip / tar.gz stay for a portable copy and the editor's own updates).

- Navigation covers every static collider of the level (models, meshes, landscapes) up to 1 km from the middle, built on all CPU cores.
- Doors become Door links on their own: interactables named or tagged "door", or any actor tagged `NavDoor` (`NoNavDoor` opts out). Hinged, sliding or a hatch in a floor. An AI pawn uses the door when its leaf is in the way.
- Safe zone: the next circle is chosen when the wait begins; `Zone.info()` returns its centre too. New option: Centre On Land.
- `actor:swap_slots(a, b)`: two inventory slots change places, predicted on the client.
- The Gameplay Camera follows where the character is drawn, so there's no shake above 60 Hz. AI LOD makes far bots think less often (`AI.set_lod`). `Engine.reachable` answers at once. Narrow doorways stay walkable. `Engine.preload` loads models behind a loading screen.

## New in v0.99.1 (characters, multiplayer moderation, faster DX12/Vulkan water)

- Characters: eye colours that show in any glTF viewer, eyes aimed through the lids' opening, a parted short cut with a Wave setting, the three hair LODs read back from one GLB, the skin texture linked on export. Two sample recipes in `assets/characters/Samples`.
- Multiplayer: players idle for 300 s are disconnected (`moderation.idleKickSeconds` in `Config/Online.json`, 0 = off), and Tab → Report player saves a report on the server. New `Net.report_player`, `Net.report_status`, `Net.set_idle_timeout`, `Net.player_activity`; `Net.players(true)` includes the host.
- Direct3D 12 / Vulkan: water uses the same levels of detail as OpenGL (61,440 → 3,840 triangles per draw on Medium); Probe GI skips the unused local volume.
- Web: file names with spaces, Greek or `#` load; clear messages for missing files, no WebGL 2, or a lost graphics context; the loop follows the browser's frames.

## New in v0.99 (Web export, Solwake fixes, new intro)

- **Web (HTML5 / WebGL 2)**: Package Project → Web makes a folder (and a `.zip` for itch.io) that plays in the browser: `index.html`, the engine as WebAssembly, the game's files. No editor in the browser - the game only.
- UI.button: an invisible button (the game draws its own) that still clicks and takes gamepad focus, and returns whether it is selected. UI.image: a part of the picture (UV), for a minimap.
- Building: the health a piece starts with (`startFraction`), and 2×2 edits for floors, stairs and roofs (walls stay 3×3).
- `actor:set_held_model(item, model)`: a character holds its own model of an item (a skin's tool). `actor:set_instance_damage`, `actor:retire_world_panel`.
- `on_interact` gets the player who pressed it; Interaction ignores what is behind a wall or behind the camera.
- GLB: the usual exporter mistakes are repaired on load, and "Failed to parse" says why.
- Net.join checks its port; smoother local player at high refresh rates; boats (`Watercraft`) and wheel models on vehicles.
- New intro: the M alone on black, fading in and out softly.

## New in v0.98 (Vulkan / DX12 probe GI, far shadows, glTF LODs, stability)

- Vulkan / DX12: the same probe GI as OpenGL (near and far probe grids, GI Volumes, baked probes), used by SSGI where its rays miss. Turn it off with `MANIAC_RHI_PROBES=0`.
- Vulkan / DX12: far shadows (Far Shadow Distance) and the fog's sun glow (Sun Scattering), like OpenGL.
- glTF / GLB: LODs written in a mesh's or a primitive's extras are read (`lod` / `lods`).
- Fixed: a crash (heap corruption) when a model's animation had odd keyframes, and NaN in animations at a bad time.
- Known: Vulkan and DX12 can be slower than OpenGL in big games; OpenGL stays the default.

## New in v0.97 (first-person arms, Vulkan / DX12 like OpenGL, Options and physics from Lua, the splash)
- **First-person arms** (Unreal's first-person mesh): the engine's own `FirstPersonArms` (sleeves and gloves, eight
  bones, the clips Idle, Equip, Reload, Sprint, Inspect) and `FirstPersonBlaster` (with the points Grip, Support,
  Sight, Muzzle), made in code (`tools/build_first_person.py`, no outside art). A View Model whose model has a
  `weapon` bone is a pair of arms: the item the player holds is shown in that hand (its Grip there), the left hand
  reaches its handguard (two-bone IK), and the engine plays the clips (Equip when the weapon changes, Reload while
  reloading, Sprint while sprinting) and moves the arms: sway with the mouse, bob with the steps, a kick with each
  shot (an item's shots, or the `fire` action for a gun made by a script), the Sight to the middle of the screen
  while aiming, pulled back from walls. A player in first person who holds an item, in a level without a View Model
  of its own, gets the arms of his inventory (`Inventory > First Person Arms`, `FirstPersonArms` by default) - no
  game has to make them. An item's points: its model's nodes `Grip` / `Support` / `Sight`, or `first_person {grip,
  support, sight, scale}` in its `.mitem`, else worked out from its size. Details > View Model (First Person);
  Add Component > Gameplay Framework > View Model (First Person Arms). Lua `actor:play_view_model("Inspect")`,
  `actor:kick_view_model(strength)` (graph nodes too). The First Person template holds the blaster.
- **The splash** ("Powered By Maniac Engine") is a small, steady mark: its size comes from the screen once (it no
  longer starts big and shrinks when the game goes full screen), the text smaller and dimmer than the logo.
- **Clouds**: their resolution is a setting of its own (`cloudQuality`, `r.CloudQuality`: half the picture a side on
  Epic and Custom, a quarter below) - it followed the GI, so an "Epic" with another GI had soft quarter-size clouds.
- A glTF file can keep its own origin by itself: `{"asset": {"extras": {"maniac": {"keepOrigin": true}}}}`; a cooked
  model keeps that too.
- **A game's Options menu from Lua** (Unreal's Game User Settings): `Engine.graphics()` / `Engine.set_graphics{preset =
  "low" | "medium" | "high" | "epic" | "performance", shadows, textures, aa = "off" | "fxaa" | "taa", gi, bloom,
  ambient_occlusion, motion_blur, view_distance, brightness, upscaler, screen_percentage, clouds, ...}`,
  `Engine.display()` / `Engine.set_display{mode = "windowed" | "borderless" | "fullscreen", width, height,
  refresh_rate, vsync = true | false | "adaptive", monitor, max_fps}`, `Engine.resolutions()`, `Engine.monitors()`,
  `Engine.save_settings()` / `load_settings()` / `reset_settings([preset])` (`Saved/GameUserSettings.json`; a game
  starts with what was saved). OpenGL, Vulkan and DirectX 12; graph nodes under Engine > Options.
- **3D physics from Lua**: `actor:set_simulate_physics(on)`, `actor:velocity()` / `set_velocity`, `angular_velocity` /
  `set_angular_velocity` (degrees a second), `add_force`, `add_torque`, `add_angular_impulse`, `mass`, `wake`,
  `is_simulating_physics`; `actor:set_lifespan(seconds)`. **Navigation queries**: `Engine.find_path(from, to)`,
  `Engine.nearest_navigable(p, radius)`, `Engine.random_navigable_point(p, radius)`. Graph nodes for each.
- **Vehicles from scripts**: `drive()` asked in the frame a car is spawned (`Engine.spawn_prefab`) is kept until it
  has its body (a spawned car with nobody in it never moved); `set_position` / `set_rotation` move a car's body (it
  stands still there: a car put back on its wheels, a respawn), `add_impulse` pushes a car.
- **Vulkan / DirectX 12 like OpenGL**: the landscape's unpainted ground given its layer only once the layer textures are
  read (rock cracks and sand grain on DX12 / Vulkan too), the weights and the colour map read again as they change, the
  rock's near detail, the light of fires and flames; the editor's ImGui pictures and the post effects' groups kept by
  texture serial (a crash at the editor's start on DX12; a new texture where a freed one was showed the old one).
- **Robustness**: a test calls every Lua function with nothing, nil, wrong types and odd numbers (get_up() on a crate and a
  folder read as a file took the game down); scripts kept in a deque (a script spawning a scripted actor in start() used
  freed memory); Lua indexes from any number; AddressSanitizer / UBSan over the tests.
- **Ground light (GI)**: the probes, the Voxel GI and the captures see each piece of a landscape in its own colour
  (its colour map, or its painted layers): with the first layer's colour (grass) for the whole landscape, a sand
  island bounced green light onto every wall in shade.

## New in v0.96 (packaged modules, Lua online, fall curves, cross-platform packaging)
- **Lua modules in packaged games**: `require()` finds cooked `.luac` modules (no `.lua` beside them) in `Scripts/`,
  `Content/Scripts/` and `Content/`; `load(text)` for Lua text (bytecode is refused).
- **Command line and environment in Lua**: `Engine.args()`, `Engine.arg(name, default)` (`--name=value`, `-name value`,
  `+name value`, a bare flag is `true`), `Engine.env(name, default)`.
- **Online from Lua**: `Http.get / post / request / url_encode` (the callback on the game thread), `Engine.open_url`
  (https / http / mailto), `ManiacID.sign_in_start / sign_in_verify / signed_in / email / sign_out / request` - store
  purchases and accounts from a game; `ManiacID.buy(product)` opens the store's checkout (Stripe) and
  `ManiacID.owns(product)` / `ManiacID.purchases()` tell the game what the player bought.
- **Shop**: a game's own money (coins, gems) sold through the Maniac Store by any developer - `Shop.packs / buy /
  collect / redeem`; the developer makes the shop on maniaclab.app and his share of each sale goes to his Stripe account.
- **Player options**: `Engine.set_fov` (aiming zooms from it), `Engine.set_look_sensitivity`, `Engine.set_max_fps`.
- **Game UI**: `UI.text_field(id, x, y, w, h, {placeholder, password, max})` - typing over the game and its menus.
- **Fall damage**: `fallDamageExponent` and a `fallDamageCurve` of {height, damage} points; `actor:set_fall_damage{...}`.
- **Weapons**: a round-at-a-time reload takes `reload_seconds` for its first round too; `actor:give_weapon(item,
  {loaded, magazines})`, `actor:give_magazines(n)`, `actor:set_ammo(loaded, reserve)`.
- **Packaging**: a Linux install packages Windows games and a Windows install Linux games (both export templates ship).
- **C++ games**: `Platform::openWithSystem` is in the engine library (a game's C++ opens a web page); the engine's
  source builds no game of its own (a game builds the engine from its project with `MANIAC_ENGINE_SOURCE`); a game's
  own Linux program runs on glibc 2.35+ like the engine's (the compatibility comes with the engine library and the SDK).

## New in v0.95 (shooter movement and weapons, the rest of UMG, Godot scenes, oceans, tweens)
- **Character Movement**: prone (`prone`, Z / the pad's Down; `actor:prone`), lean round corners (`canLean`, Q / E,
  `actor:lean`), gravity per character (`gravityScale`), air control, fall damage (from a height, fatal height),
  AI characters stop at drops deeper than `ledgeDrop` (no more bots off cliffs).
- **Weapons**: body and leg multipliers beside the headshot's, a reload of its own when empty, reload a round at a
  time (a shot stops it), spread by stance, scope sway and holding the breath, `Gameplay.explode` (the thrower is hurt
  too), an Explosion and a Fire effect, first-person View Models that pull back from walls.
- **Physical Materials**: an actor's surface (`physicalMaterial`, else guessed from its names, a landscape's layer)
  picks its footsteps and the bullet impacts.
- **UI (UMG)**: Combo Box, Widget Switcher, Wrap Box, Scale Box, Spin Box, Throbber, Safe Zone, Expandable Area, Rich
  Text, User Widgets (a .mui inside another), tool tips; `UI.button` with the D-pad / stick / arrows (A / Enter, B with
  `UI.back`), `UI.image`.
- **Lua**: `Tween.to` / `Tween.value`, `Camera.view` / `set_view` / `add_view`, `Engine.world_to_screen` in 3D,
  `actor:add_clips_from` (an animation library), one handle per actor (a table key that holds), `set_component("script")`
  starts the script while playing, `set_path2d` / `follow_path2d` and `shake_camera2d` (Godot's Path2D, a camera shake).
- **Import**: Godot `.tscn` / `.tres` (primitive meshes and CSG with their materials) as models; a model can keep its
  own origin (`asset.import keepOrigin`, `asset.origin`, Content Browser > Keep File Origin); a model with the
  name of another goes to a folder of its own instead of over it. Model collision: triangles for big or many-part
  models, empty groups no longer end it, hidden models collide; Instanced Meshes collide with their full detail and
  can be Hidden in Game.
- **Oceans** reach the horizon (Water > Ocean); a dedicated server reads no textures; `--json` prints JSON alone.
- InputMap: `Wheel`, `WheelUp`, `WheelDown`, `DPadUp`... names.
- **The SDK has the online client**: `online/ManiacOnlineClient.h` (and the rest of `src/online`) and the libraries
  `libmaniac_online.a` / `libmaniac_opus.a` are in `SDK/` - a game with Maniac Online Services builds with the SDK of
  the installer (it did not: the headers and the library were missing). The Linux SDK also said 0.93.
- README: the packages a Linux build from source needs (`libxrandr-dev` and the other X11 headers).

## New in v0.94 (hardware ray tracing, ML Deformer, Niagara stages, the picture at Low)
- **Hardware ray tracing on Vulkan and DirectX 12**: Maniac RT's GI and reflections trace with ray queries
  (`VK_KHR_ray_query`) or DXR 1.1 where the card has them (`r.ManiacRT.HardwareRayTracing`, on by default; else the distance fields).
- **ML Deformer**: a skinned mesh learns from its own clips the shape dual-quaternion skinning keeps (no folded
  elbows, no candy-wrapper wrists) and gets it back on linear skinning at the cost of a few blend shapes - on OpenGL,
  Vulkan and DirectX 12 alike. Add Component > ML Deformer > Train, `mldeformer.train`, `actor:set_ml_deformer`.
- **Niagara simulation stages**: a particle system can run stages over a neighbour grid (flocks that keep apart and
  fly together, grains that pile side by side).
- **The picture**: Low and Medium have the sun's shadows (characters no longer float); the shade at Low and Medium gets
  the ground's bounce (it was a deep blue); the sunset sea's sunlit aqua; a night a stop darker with moonlit clouds;
  clean cloud edges at Low.
- **Found by four test games**: a character a script turns every frame keeps walking; `Input.down` / `Input.pressed`
  see simulated keys and the pad; bots no longer shoot a player who is still coming down from the drop ship; no crash
  on closing a game with a crowd on Vulkan.
- The Mannequin has a fighter's set and more: jab, cross, kicks, block, dodges, hits, swim, climb, glide, slide, roll.

## New in v0.93 (everything in the viewport on Vulkan and DirectX 12)
- **The whole viewport on Vulkan / DirectX 12**: every view mode (Unlit, Lighting Only, Wireframe, Normals, Ambient
  Occlusion, Shadow Cascades, Indirect Light, the buffer views, the Maniac Mesh views), Play and Simulate with the
  game's widget trees, and Movie Render Queue's frames are drawn by the RHI's own renderer.
- **A vector as a table everywhere**: `Building.can_place("Wall", {0, 0, 0}, ...)`, `actor:set_position({x = 1, y = 2, z = 3})`
  - wherever the API takes three numbers (and a colour's four), a table works, and the arguments after it keep their places.
- **Fixes from the 0.92 report**: `actor.fracture` on the command line no longer crashes (no OpenGL there);
  `actor:launch()` straight across the water throws a swimmer; `Input.rebind_key` with a key that is not there says
  why in the log too.

## New in v0.92 (the viewport on Vulkan and DirectX 12, full gamepad support)
- **The editor's viewport drawn by Vulkan or DirectX 12**: with the editor on either (Editor Preferences > General >
  Graphics API), the level being edited is drawn by the RHI's own renderer - its grid on the ground, the selection's
  orange outline, the actors hidden in the editor left out - no longer an OpenGL picture copied across. The other view
  modes, Play and Movie Render Queue still use the OpenGL picture; `MANIAC_RHI_VIEWPORT=0` turns it off.
- **Gamepads in full** (Xbox, PlayStation 4 / 5, DualSense Edge, Switch Pro): the buttons named as the pad prints them
  (Cross / A / B) in prompts and `Input.button_label`; vibration (`Input.rumble`, Unreal's Force Feedback: XInput for
  Xbox pads, the controller's own reports for PlayStation ones, the kernel's force feedback on Linux); the PlayStation
  light bar (`Input.set_light`), the DualSense's adaptive triggers (`Input.set_trigger`: resistance, section,
  vibration), the motion sensors (`Input.motion`) and the touchpad (`Input.touches`); `Input.gamepad_type`,
  `Input.last_device` - prompts follow the device used last. All of them as graph nodes too.
- **Network emulation: incoming loss** (Unreal's PktIncomingLoss): `in_loss` in `Net.set_emulation`, Project Settings
  and `-pktincomingloss`; the Average and Bad presets lose packets both ways, so `Net.stats().loss` moves with them.
- **Fixes from the 0.91 report**: bots no longer kill themselves with the Launcher (no shot when the blast would reach
  them, or a friend stands in the line of fire); a rain drop right by the camera fades out instead of a white strip; a
  packaged game no longer carries `assets/docs`.

## New in v0.91 (the editor on Vulkan and DirectX 12, 65 fixes from a whole-engine test)
- **The editor on Vulkan or DirectX 12** (Editor Preferences > General > Graphics API, or `-vulkan` / `-dx12` on its
  command line): its panels are drawn by the RHI into a window without OpenGL; the engine's own work (the viewport's
  renderer, thumbnails, previews) goes on in a hidden OpenGL context. When the API asked for cannot start, the editor
  runs on OpenGL and says why in the log.
- **Pause and slow motion from scripts** (Unreal's SetGamePaused / SetGlobalTimeDilation): `Engine.set_paused`,
  `Engine.set_time_scale` - a pause menu keeps working (widgets, `paused_update(dt)`), bullet time from 0.01 to 20.
- **Simulated input for tests** (Unreal's automation input): `Input.simulate("W:0-2s,Space:1s")` in Lua, or
  `play --input "..."` on the command line - sprint, slide, mantle, ladders and jumps can be tested without a person.
- **The game's own program in packages** (ManiacGame: no editor, no command line, no documentation inside); a package
  stops on broken assets (or goes on with `force`) and names them; `asset.import` names a file that does not read.
- **Scripts that never end** are stopped after 10 s with the line they were on (MANIAC_SCRIPT_TIME_LIMIT); `Game` (the
  GameInstance) survives `load_level` and `Net.travel`; `Levels/...` paths as the Docs write them.
- **Physics**: continuous collision for fast bodies (on by default), characters ride moving platforms, characters
  collide with each other, a spawned Cube collides (and keeps its size when a script scales it - the AI no longer sees
  through a wall made at run time), 3D joints from Lua, the CLI and the MCP server (`actor:set_joint`, door and lamp presets).
- **2D**: Particles 2D collide and follow attractors; the Tile Map editor paints patterns, terrains and scene tiles and
  draws collision shapes by hand; Window > Skeleton 2D Animation (a timeline); polygon navigation with links.
- **Rain** brings its clouds (no rain under a blue sky with hard shadows); a drop right by the camera no longer draws a
  white column; the sea is not drawn on land above it.
- **Fixes the scripts and tools report clearly now**: `set_var` on a client says why, `Net.stats().loss_out` for the
  emulation's drops, resistances from Lua (`actor:set_resistance`) and in `component.types`, UI Slider / TextInput /
  ListView limits, localization's JSON format and `Loc.set_culture` only for the game's languages, file tools stay inside
  the project, demangled names in crash reports, data layers, world partition and localization on the CLI.

## New in v0.90 (2D Top Down, 2D IK, one picture on every renderer)
- **2D Top Down template** (New Project > Games > 2D Top Down): a meadow of tiles with a pond and walls, trees on a
  Y-sorted layer (behind a crown, in front of a trunk), a Character Body 2D hero with no up, slimes that find their way
  to him (Navigation Region 2D, Navigation Agents 2D with avoidance), gems that burst into sparks (Particles 2D), a
  Camera 2D with limits - the game in Lua (`assets/scripts/TopDown2D.lua`).
- **Skeleton 2D inverse kinematics** (Godot's TwoBoneIK / LookAt): Details > Skeleton 2D > Inverse Kinematics or
  `actor:set_ik2d(name, {type = "two_bone" | "look_at", ...})` - an arm reaches a target actor or point, a head looks
  at it, blended over the animation by a weight.
- **One-way for the 2D rigid bodies too**: one-way colliders and one-way tiles let crates and balls through from below
  and stop them from above (they were walls for the Rigid Bodies 2D).
- **Weather that looks like Unreal's**: an overcast sky takes the sun at every quality (a rainy afternoon is grey, not
  orange); larger cumulus clouds instead of many small ones; clouds and their sky light dimmer at night.
- **Play-tests on a computer without a graphics card keep the picture** (the same graphics at 50 % size, not Low);
  `--quality low` is there when speed matters more.
- **Contact shadows** no longer darken floors seen at a grazing angle.
- **Maniac Assets** in the editor's toolbar, with the website's styles, tags (a tag searches), My Library and
  Add to My Library; 20 free CC0 packs from Maniac Lab to start with.

## New in v0.89 (Maniac Assets, scripts reach everything)
- **Maniac Assets**: the engine's marketplace (maniaclab.app/assets, like Unreal's Fab). Window > Maniac Assets
  searches it with the website's filters (category, licence Standard / Personal / CC0 / CC BY, free or paid, format,
  sort), signs in with the Maniac ID and adds an asset to the project (Content/Assets/<name>). Paid assets are bought on
  the website with Stripe; anyone can sell their own (the seller is paid by Stripe, the store keeps its fee). The
  command line and the MCP server have `assets.search`, `assets.signin` and `assets.download`.
- **Weather and the level's settings from scripts**: `Engine.set_weather{rain, snow, wetness, snow_cover, puddles}`,
  `Engine.set_clouds{coverage, density, bottom, top, wind}`, `Engine.set_fog{...}`, `Engine.set_sun{...}`,
  `Engine.set_sky{...}`, `Engine.set_post{...}` and their getters - a storm in the middle of a match, a city's weather cycle.
- **Every component from scripts**: `actor:component(key)`, `actor:set_component(key, {...})` (only the values given
  change), `actor:has_component`, `actor:remove_component` - 2D and 3D, by the keys of the level file.
- **The command line knows every component**: `component.types` lists all 83 (the 2D ones, the gameplay framework,
  vehicles, the weather...); `actor.spawn` places the 2D actors of Place Actors (Sprite, TileMap, Character2D, Camera2D,
  OneWay2D, Light2D...) and `WeatherRain` / `WeatherSnow` (rain or snow over the whole level, wet ground, puddles).
- **play / test --quality low**: much faster play-tests of big levels or on a computer without a graphics card.
- **Clouds without trails**: the clouds' history is read back at the distance their light came from, and less of it
  the further the cloud moved across the picture - no more streaks when the camera turns or flies (OpenGL, Vulkan, DX12).
- **Leaves lit by the lamps**: two-sided foliage takes the light of point and spot lights through the leaf too, as the
  sun's (OpenGL, Vulkan, DX12).
- **Project Browser**: the templates scroll sideways when the window is narrower than they are, and every recent
  project is in its box (a scroll bar past two rows).
- **Weather presets**: Clear Day, Cloudy, Dusk, Night, Rain, Storm, Snow and Fog in one click (Window > Env. Light
  Mixer > Presets), from scripts (`Engine.set_preset("dusk")`) and the command line (`world.preset Rain`).
- **Fixes from the Maniac City tests**: a character put elsewhere by `set_position` stays there - after a death and a
  revive it went back to where it had died (its capsule did not move); rain drops are never thinner than 1.6 pixels (far
  away they broke into dotted, coloured lines); puddles are glossy, not a mirror (the sun and the lamps made a white oval
  on the asphalt); Map Check holds what is fixed on a building placed as an actor or on a facade (balconies, air
  conditioners) and `map.check --fix --groups 0,3` fixes only the groups chosen; packaging leaves out Content/Tests; a
  packaged game's log says "Game started", not "Play In Editor"; the volumetric fog reads the clouds' shadow every
  fourth slice (a third of its cost), and a play-test on a computer without a graphics card runs at Low (7x faster;
  `--quality` to choose), `MANIAC_PROFILE=1` logs where each frame's time goes.
- **Hangs leave a report**: a watchdog writes where the main thread was when the editor or a game stopped answering
  for 10 seconds (and takes it back if it answers again); the crash handler is put back if a driver replaced it.

## New in v0.88 (2D like Godot)
- **Character Body 2D** (Godot's CharacterBody2D; Docs/Sprites.md "Godot's 2D"): `actor:move_and_slide()` moves a body
  by its velocity and slides it along floors, walls and ceilings - floor max angle, stop on slope, constant speed on
  slopes, block on wall, floor snap, moving platforms that carry it, slide on ceiling; `is_on_floor / is_on_wall /
  is_on_ceiling`, floor and wall normals, real and platform velocity, the slide collisions. `move_and_collide`.
- **Exact 2D shapes**: overlaps, rays, move2d and casts take a turned box, a capsule, a convex polygon and a tile's
  own shape as they are (the separating axis test on convex cores grown by a radius) - before, by the box round them.
- **One-way platforms** (Collider 2D > One Way) and **one-way tiles**: jumped through from below, stood on from above.
- **Tile shapes**: slopes (45 degrees, low slopes over two tiles), half tiles, thin platforms per tile (Tile Map
  window > the brush tile > Collision); **animated tiles** (frames a second, collision of the first).
- **Y-sort** per sorting layer (Project Settings > 2D) and per tile layer: sprites, particles, skeletons and tiles drawn
  by height - top-down and isometric games.
- **Box Cast / Circle Cast 2D** (Godot's ShapeCast2D).
- **2D navigation**: Navigation Region 2D (a rectangle or a polygon, baked round static colliders and solid tiles by the
  agents' radius), Navigation Agent 2D (A* pulled straight, follows its path, avoidance, `navigation_finished`), and a
  tile map's grid path (Godot's AStarGrid2D). Lua `Navigation2D.*`, `actor:nav2d_*`.
- **Particles 2D** (Godot's CPUParticles2D): rate or bursts, emission shapes, direction / spread / speed / gravity /
  damping / spin, size, scale and colour over life, a sprite or a flipbook, local coordinates; drawn with the sprites. 0.91: collision with the 2D level (bounce off or vanish) and Particle Attractor 2Ds.
- **Skeleton 2D** (cutout animation, Godot's Skeleton2D / Bone2D): bones with sprites, animations from `*.manim2d`
  (keys blended, events as signals), bones turned by scripts on top of the animation, a bone's place in the world.
- Editor: Place Actors > 2D (Character, One-Way Platform, Navigation Region, Particles), Add Component, Details for all of
  them, the bones and the navigation region drawn in the viewport; Lua with a Maniac Graph node for every function.
- Tests: `tests/Godot2DTests.cpp` (shapes, casts, the character on floors / walls / ceilings / slopes / one-way and
  moving platforms, tile shapes, animated tiles, Y-sort, navigation and agents, particles, skeletons, the level file,
  the Lua, and 10 000 sprites in one draw call).
- **Not yet**: one-way colliders are full walls for the Jolt rigid bodies; navigation does not cross between regions;
  particles on the processor only; Skeleton 2D has no mesh deformation by weights and no IK.
- **The look of Unreal** (0.87, against Unreal 5.8 on the same small town, day and night): a sea that is no white mirror
  (rough-surface Fresnel by distance), height fog in the sky's colour, cumulus clouds (second octave, dense cores, clean
  edges, history that follows the wind, no stripes on AMD), the sky light at Unreal's units, a white sun warmed by the
  air, foliage with its own normals, Maximum = Epic; **Weather** (rain / snow, wet glossy ground with puddles, lying
  snow); `Engine.screenshot`; the RHI: emissive maps, sRGB compressed textures, streamed textures grown, metals.
- **Fixes** (Tests: `tests/Fixes088Tests.cpp`, the 0.87 ones in `tests/Fixes087Tests.cpp`):
  - *Levels and lighting*: the Movie Render Queue renders a copy of the level of its own (opening another level while it
    rendered could write level A into level B's file; a Save during a render kept a frame's pose); a Build Lighting that
    fails keeps the old bake (it was deleted first); an open that fails keeps the open level's bake; Save As over another
    level takes this level's bake (or none), never the other's.
  - *Input*: one key under two names ("A", "Key65") is consumed once; actions named with a dot ("Combat.Fire") are read
    by that name; the HUD's key follows the newest context on a tie; Mouse6-8 in the key lists; the old input map's axes
    stay within -1..1; a chord whose action's context went is not fired for a frame.
  - *Animation*: a synced follower stays at its end when the leader's non-looping animation ends; a composite's root
    motion over more than 64 loops in one update keeps all of it.
  - *Vulkan / DX12 player*: audio occlusion through walls, the UI Editor's widget trees (drawn and clicked), the game
    modules' own HUD.
  - *Audio*: pause and resume do not restart the ambient sounds; `Audio.set_pitch` changes a MetaSound's pitch; a
    reverb's tail is not frozen while it still rings; several MetaSound triggers in one block are each heard; the master
    limiter's counter wraps (it overflowed after 12 h); the loop message points at the Delay's own Feedback.
  - *Saves*: a folder another title owns is never used; an old engine's saves are copied again until every slot came.
  - *OpenGL ES*: 3D textures read layer by layer, half floats read right (the GI's buried probes).
  - *Rendering*: no frame drawn with render targets that failed (sizes of -1); a texture's last streaming step bigger
    than a frame's upload budget comes in strips over several frames (85 MB in one frame before).

## New in v0.86 (Vulkan / DirectX 12 draw everything OpenGL draws)
- **DirectX 12 much faster**: the shaders go to the card as **shader model 6 DXIL** made with dxc when the engine is
  built (signed; The draws' constants are a root CBV in per-frame upload pages, the frame's data is copied into the
  card's memory, and a **depth prepass** shades each pixel once (`MANIAC_RHI_PREPASS=0`).
- **Reflection Captures** on Vulkan / DirectX 12: six faces drawn at the capture (one a frame, the cost stays flat),
  filtered into a mip per roughness (GGX), box parallax as OpenGL; taken again when the box moves or the sun changes.
- **GPU particles** on Vulkan / DirectX 12: each layer simulated on the card by a dispatch (births, forces, curl noise,
  collisions with what the camera sees), drawn from the instances it writes.
- **Virtual Shadow Maps** ("Maniac Shadows", Shadow Method: Virtual Shadow Maps) on Vulkan / DirectX 12: the sun's
  paged shadow - clipmap levels round the camera, a pool of 128 x 128 pages, the pages the picture needs (read back from
  the card), kept while nothing changes, drawn again under what moves.
- **Maniac Mesh** on Vulkan / DirectX 12: each instance's cut of the cluster hierarchy (fine enough on the screen, its
  group not) as indirect draws - the picture's clusters for the camera, the whole cut for shadows and captures.
- **Maniac RT's second bounce**: a ray that hits something the camera sees takes the picture's own light there (its
  textures and materials, and the GI it already had), as Lumen's screen traces; reflections show real colours.
- What the Vulkan / DirectX 12 renderer draws, as OpenGL does: depth of field, motion blur, light shafts, outlines,
  SSR, SSGI, contact shadows, rect lights' shadows, decals, mesh particles and ribbons, morph targets, cloth, hair,
  Geometry Collection chunks, upscaling (Temporal Upscaling in the TAA), FXAA and sharpening.
- The RHI: a pass's bind group has 12 textures (t12..t23).

## New in v0.84 (Maniac RT on Vulkan and DirectX 12)
- **Maniac RT GI and reflections on Vulkan / DirectX 12** (`src/rhi/RhiRT.*`, `shaders/rhi/RT.hlsl`, `RTFilter.hlsl`): the
  Global Distance Field (four clipmaps of 64^3 round the camera, composed brick by brick where something changed), screen
  probes (one per 16 px, 32 rays) gathered at a quarter of the size and filtered over time, a mirror ray per pixel at half
  the size - as compute passes after the late pass. A ray's hit is lit where it lands (the object's colour, the sun through
  the cascades and the clouds, the sky light, the lamps, its glow); instanced static meshes' instances near the camera are
  in the field too. The same switches as OpenGL: the Epic preset, `rayTracedGI` / `rayTracedReflections`, `r.ManiacRT.*`,
  `MANIAC_RT`. Tested on the RX 5600 XT on both APIs.
- **The RHI game takes the graphics options** (the project's Quality Preset and Rendering section, the `MANIAC_*`
  switches) as the OpenGL game does - it had only the renderer's defaults.
- A night is as dark on DirectX 12 and Vulkan as on OpenGL (a test compares the three).

## New in v0.83 (Fixes: Vulkan / DX12, packaging, AI, animation, input, data tables, touch)
- **Vulkan and DirectX 12**: a lost device (driver reset, card removed) ends the game with a clear message and exit
  code 3 instead of running on without a picture; DX12 no longer takes a removed card's fence for finished work, fails
  a buffer whose Map fails, keeps texture states only for lists that reach the queue, refuses a swapchain without a
  render target descriptor and shares sampler tables by their settings; Vulkan finishes only frames whose fence really
  signalled, recovers the acquire semaphore after a failed submit, keeps no failed descriptor pool and clears R32_UINT
  targets to the integer. The RHI game loads partitioned levels' cells by streaming, updates Enhanced Input and finds
  levels in paks.
- **Packaging**: each build in a folder of its own (an older package left aside is put back, never deleted); a dedicated
  server's game.json and launchers are in the manifest and the archive; the Dedicated Server mode is the build's own
  (Close no longer makes the next build a server); archives are written to a temporary file and stream large files; the
  Linux extras are in the manifest; the Project Launcher runs the program packaging wrote (names with spaces) and never a
  half-copied build.
- **AI**: State Trees no longer restart 3 s after a save, and each tree is read once per update for all bots; navigation
  keeps the last waypoint in a walkable cell, takes the link it paid for, finds far cheap links, binds link ends only to
  floors within 2 m up or down; aiStop / aiMoveTo cancel a ladder or jump under way, and a target with no path is not
  walked to through walls.
- **Animation**: two-bone IK with the target on the hip (NaN); reverse and whole-loop root motion of looping samples;
  root motion of any number of loops (was cut at 64); a one-shot blend space's follower stays at its end; a library clip
  with no matching bones is not added.
- **Input and camera**: an action whose last context is removed ends (value 0, Completed / Canceled); a replaced mapping
  does not inherit the old Hold; the evaluation order is worked out when the mappings change, not every frame; a camera
  modifier's new priority changes its order.
- **Data Tables**: switching tables asks to save; the project's tables are listed when the list opens, not every frame;
  more than 58 columns are noted, not drawn over the actions; 64-bit integers stay exact; a renamed row's default follows
  it; a default of the wrong type is named by Check; Data.find() keeps text that looks like a number and reads each row once.
- **Movie Render Queue**: the level is put back after a render; orthographic cameras; console variables set back when the
  renderer cannot start; the queue file written only when it changes; 16384 x 16384 16-bit frames fall back to 8 bits; an
  empty File Name gives Intro.0007.png.
- **Also**: sRGB alpha-tested mips averaged in linear light; String Tables with a field of the wrong type are an error, not
  a stop; CSV lines ended by CR alone; the Device Output Log never shows a line twice; App.save_on_pause keeps mixed Lua
  tables; a quick background / foreground gives the pause then the resume; Touch.by_id prefers the finger that is down; a
  long press lifted between two updates still counts; a pinch starts where the second finger came down.

## New in v0.82: Multi-User Editing
- **Several editors on one level at the same time** (Unreal's Multi-User Editing; Docs/MultiUser.md): Window >
  **Multi-User Browser** - your name and colour, **Host Session** (the level that is open becomes the session's; you own
  it), **Join Session** (address, port 7810), Leave. Or a session without an editor: `ManiacEngine --multi-user-server 7810
  [--session <name>]`; the first editor to join gives it its level.
- Every edit that goes through Undo (gizmo, Details, add, duplicate, paste, delete, Undo / Redo) travels as a
  **transaction**: each changed actor's JSON before and after (the level file's own form) or its removal. The session
  numbers them; every editor applies them in that order. **Last writer wins** per actor; an actor being dragged is
  **locked** to its user (no gizmo for the others; a change they still make is refused and put back). Each user's new
  actors get uids from a range of its own. Your **Undo** takes back only your edits (the others' are patched into your
  undo history). A **late joiner** gets the session's snapshot and the transactions after it.
- Only the **owner** opens another level (the session moves to it) and saves; anybody else's Save asks the owner to
  (**Persist**). While you Play, what comes waits until you stop.
- **Presence**: the other users' cameras as frustums in their colour with their names, their selections outlined in
  their colour, a user list and the activity (every transaction, who and what).
- Console `mu.host`, `mu.join`, `mu.leave`, `mu.status`, `mu.persist`, `mu.name`, `mu.ShowCameras`, `mu.ShowSelections`,
  `mu.LockOnDrag`, `mu.PresenceRate`, `mu.ActorSyncRate`, `mu.FullSyncInterval`; editor Lua `Editor.session_host / join /
  leave / persist / status / users`. Over the engine's own UDP layer (ENet, reliable ordered channel; cameras unreliable).
- Not yet: assets travel by revision control, not in the session; no password or encryption (a LAN or a VPN).

## New in v0.82 (Maniac RT, Virtual Shadow Maps, Motion Matching, Vulkan / DX12, Super Resolution, VR, landscape texture colour)
- **Vulkan and Direct3D 12 (the RHI scene renderer) draw much more of a level**: point, spot and rect lights (the 32
  closest), the four closest shadowed lamps with a shadow cube each, normal maps, **TAA** (jitter, depth reprojection,
  YCoCg clamp), **SSAO**, **volumetric clouds** (a quarter-size march with history, their shadows on the ground),
  **volumetric fog** (the sun through its cascades and the clouds, the sky light, the lamps), stars and the Milky Way,
  the landscape's Texture colour. Each is compared with the OpenGL picture in the tests (lavapipe). GPU particle layers
  run on the processor there for now; still missing: decals, GI, reflection captures, faces' morph targets.
- **Texture colour per landscape layer** (Landscape Mode > Material > Layers > *Texture colour*, 0 .. 1; Docs/Landscape.md):
  how much of the layer texture's own colour the ground takes. 0 is the engine's look so far - the texture gives the
  grain, the colour comes from the colour map or the layer colour; 1 is what an Unreal landscape material does when it
  samples its layer textures as the base colour (grass with its own greens and yellows, dirt with its stones), the
  other scales of the texture and the near detail still grain it. Saved only when used (older levels are read and
  written as before). Lua `Landscape.layer_texture_color(layer)` / `Landscape.set_layer_texture_color(layer, amount)`.
- **Virtual Shadow Maps** for the sun (Docs/Rendering.md, "Virtual Shadow Maps"): a 16384 x 16384 shadow map per
  clipmap level round the camera (16 levels, each twice the size of the one before), in pages of 128 x 128 texels.
  A compute shader marks the pages the picture needs from the depth buffer; they are drawn into a pool of physical
  pages and **kept while nothing changes** (a still scene draws no page; a box that moves redraws its own pages only),
  the least recently needed given up first. Static casters are cached apart from the moving ones (characters, crowds,
  meshes that moved this frame), which are drawn over the cached pages each frame. The lit shader, water, fog, the GI
  probes and the voxel GI read the pages through a page table with PCF or contact-hardening filtering - no sampler
  more than the cascades used (the pool and its table take the cascades' places).
- Project Settings > Rendering > **Shadow Method** (Cascades / Virtual Shadow Maps), `r.Shadow.Virtual.*`,
  `MANIAC_SHADOW_METHOD`, `stat shadows` (pages needed, drawn, cached, missing), the **Virtual Shadow Pages** view.
  OpenGL 4.3; on 4.1 (macOS), the Mobile path and orthographic views the cascades stay.
- On llvmpipe: 15 - 18 ms a frame against 74 - 128 ms with the cascades (a still 200 x 120 scene), a shadow edge 155 m away
  36 pixels wide against 49. 272 MB of video memory at the default 2048 pages.
- **Maniac Super Resolution** (the engine's TSR; Docs/Rendering.md, "Maniac Super Resolution and Maniac Frame
  Generation"): `r.Upscaler TSR` renders at a quality mode's screen percentage - Native AA 100 %, Quality 67 %,
  Balanced 58 %, Performance 50 %, Ultra Performance 33 % - and rebuilds the window's picture from the jittered samples
  of many frames: dilated motion vectors, disocclusion from the last frame's depth, a reactive mask for glass, water
  and particles, Lanczos upsampling, Catmull-Rom history, variance clipping in YCoCg, anti-ghosting, RCAS. A compute
  shader with OpenGL 4.3, the same code as a fragment shader on 4.1. Dynamic resolution from a GPU time budget
  (`r.TSR.DynamicResolution`). On llvmpipe at 320 x 180: 30.5 dB at Quality and 28.1 dB at Performance against the
  native TAA picture (a bilinear stretch: 26.7 / 26.2), no trail behind a fast box.
- **Maniac Frame Generation** (`r.FrameGen 1`, Project Settings > Rendering > Frame Generation; off by default): a
  picture half way between two rendered ones from the motion vectors and a block-matching optical flow, shown before the
  real one, the UI drawn over both as it is - 60 FPS rendered, 120 shown with V-Sync on a 120 Hz monitor (suspended on
  a slower one), paced by half a frame without V-Sync. It adds about half a frame of latency, and `stat upscaler` and the
  game's FPS line say how much. A box moving 20 px a frame lands within 0.6 px of half way. The game window only.
- `stat upscaler` (input -> output, GPU ms), `r.TSR.*`, `r.FrameGen.*`, Lua `Engine.set_upscaler("tsr", "quality")`,
  `Engine.upscaler()`, `Engine.set_screen_percentage`, `Engine.set_frame_generation`, `Engine.frame_generation()`.
  Not yet measured on a graphics card (the RX 5600 XT): its GPU ms and how 120 Hz looks.

### VR / XR through OpenXR (Docs/XR.md)
- The Khronos **OpenXR loader** (1.1.65, Apache-2.0, `external/openxr`) is built into the engine on Linux and Windows; it
  finds the PC's runtime (SteamVR, Meta Quest Link, Windows Mixed Reality, Monado). No runtime or no headset: one line
  in the log and the game / editor goes on as before.
- The session on the game's OpenGL context (`XR_KHR_opengl_enable`: WGL on Windows, GLX on Linux), a swapchain per eye,
  the frame loop paced by the headset, each eye rendered by the engine's own Renderer with its **off-axis frustum**
  (`Camera::offAxis`) - one Renderer per eye, so TAA and the other temporal effects stay right - and the window shows
  the left eye (the spectator screen; Project Settings > XR > Mirror).
- **Play > VR Preview** (enabled only when a runtime with a headset is there; else the reason in its tooltip), `-vr` on
  a game's command line, Project Settings > **XR** (Start in VR, Tracking Origin Floor / Eye, Render Scale, Mirror, the
  VR pawn's snap turn, smooth turn and teleport range), `xr.Enable`, `xr.RenderScale`, `xr.TrackingOrigin`,
  `xr.SnapTurn`, `xr.Mirror`, `xr.Status`.
- The motion controllers (Touch, Index, Vive, Windows Mixed Reality, the simple controller) through OpenXR actions,
  as **Enhanced Input keys**: `XR_Left_Trigger`, `XR_Right_Grip`, `XR_Left_Thumbstick` (2D), `XR_Right_Thumbstick_X`,
  `XR_Left_Thumbstick_Click`, `XR_A`, `XR_B`, `XR_X`, `XR_Y`, `XR_Left_Menu`...; haptics.
- The **VR pawn** (an actor tagged `VRPawn`): teleport with an arc and a marker, snap or smooth turn round the head,
  grab simulated physics bodies with the grip and throw them. The **Virtual Reality** template (New Project > Games).
- Lua `XR.is_available`, `XR.is_active`, `XR.status`, `XR.start`, `XR.stop`, `XR.hmd_pose`, `XR.controller_pose`,
  `XR.key_value`, `XR.haptic`, `XR.stop_haptic`, `XR.origin`, `XR.teleport`, `XR.eye_size` - each a node in the Maniac Graph.
- Tested here without a headset (the projection, the poses, the keys, the pawn with simulated controllers, the template,
  a start without a runtime). **Not yet run on a real headset.**
### Vulkan / Direct3D 12 renderer progress
Phase 1 of `PLANO-RENDERER-RT-2D.md` (the main renderer on Vulkan / DX12; OpenGL stays the default and the fallback).
Still **experimental**: a game runs on it with `-vulkan` / `-dx12` (README's v0.74); the editor stays on OpenGL.
- **1.3 - the RHI grew what the renderer needs** (`src/rhi/Rhi.h`, both backends): several render targets (a pass and a
  pipeline with up to four), depth / stencil (`PipelineDesc::stencil`, `setStencilReference`, `DepthAttachment::clearStencil`),
  depth clamping; **2D arrays, cubes and 3D textures** (`TextureDesc::type`, `depthOrLayers`) - uploaded, read back and
  drawn into by layer and mip (`ColorAttachment::layer / mip`, `DepthAttachment::layer`), mips made for arrays and cubes;
  **storage images** written by compute shaders (`ComputeBindings::images`, u4..u7; any storage format - the SPIR-V
  leaves it to the texture); **a bind group per pass** (`setPassBindGroup`: set 3 / t12..t19, s4..s7, beside the
  material's); **per-resource barriers** (`resourceBarrier(buffer)`, `resourceBarrier(texture)`). Not done: MSAA and its
  resolve, timestamp queries.
- **1.4 / 1.5 - what a level needs** (`src/rhi/RhiSceneRenderer.*`, shaders in `shaders/rhi/`): the sun's **four shadow
  cascades** (one depth array, the OpenGL renderer's splits and snapping, blended); **landscapes with their eight paint
  layers** (the weights, rock and snow by the rules, the colour map, the layer textures in one 2D array as grain at two
  scales and finer near the camera - the OpenGL lit shader's landscape material) and **their grass** (clump for clump
  where the OpenGL renderer puts it); **painted trees** (bark, cut-out
  leaves lit through from behind, their wind); **water** (Gerstner waves, wind ripples, refraction and absorption through
  the scene's copied colour and depth, the sky reflected, the sun's glitter, whitecaps, shore foam); **the processor's
  particles** (sprites, flipbooks, streaks, soft against the scene); **walls of mist**; **the OpenGL renderer's sky** (its atmosphere) and
  height fog; HDR -> **bloom** -> **the OpenGL tone map** (Unreal's filmic curve and colour grading, or ACES).
- **How close to OpenGL:** the same level and camera drawn by both, compared pixel by pixel (0..255, the most of r, g,
  b; lavapipe against llvmpipe, no auto exposure / TAA / GI / SSAO in either): Third Person template mean 6.0, 95th
  percentile 20; `MANIAC_RHI_COMPARE_DUMP=<folder>` writes both pictures of each comparison.
- **Direct3D 12** has everything above with the same shaders (HLSL; D3DCompile at run time): it is compiled by the
  Windows build but has **not been run** (no Windows here).
- **Not drawn yet** (`SceneRenderer::notDrawn()`): GPU / mesh / ribbon particles, decals, local lights, normal
  maps, reflection captures and screen-space reflections, morph targets, GI, ambient occlusion, TAA, motion blur, depth
  of field, clouds, volumetric fog, stars, eye adaptation by metering (the exposure is worked out from the sun
  and the sky). Not done: 1.6 (the editor's viewport on Vulkan / DX12).
- Tests (`tests/RhiTests.cpp`): 9 tests of 1.3, the parts of 1.4 / 1.5 in the picture, three comparisons against
  OpenGL - every RHI test with the Vulkan validation layer on.

## New in v0.81 (Landscape: eight paint layers)
- **Eight paint layers** (Docs/Landscape.md, "Paint layers"): the four a landscape always had (Grass, Rock, Dirt,
  Snow - rock on steep faces and snow on peaks by the rules) and four of the project's own, each with a name, a colour,
  a detail texture, its tiling and roughness (Landscape Mode > Material > Layers; Paint Layer lists all eight), as
  Unreal's and Godot's landscapes have more than four. Their weights are saved as `weights2` beside `weights`: a level
  with four layers is saved and read exactly as before. Unpainted ground with a colour map goes to the nearest in
  colour of all the layers in use (sand-coloured ground to a Sand layer, not to the dirt). Lua
  `Landscape.layer_weight(x, z, 4)` or by the layer's own name.
- The layer textures are drawn into one texture array (any format: a packaged game's compressed ones too), so the lit
  shader reads eight layers with two samplers fewer than it read four with.
- `play --level <name>` (the command line, the MCP server, AI assistants) plays that level: it played the project's
  startup level whatever level was named.

## New in v0.80 (Cooking and paks, Voxel GI, 2D)
- **Voxel GI** (Maniac GI, GI level 4, the Epic preset's GI; Docs/Lighting.md): three clipmaps of 128^3 voxels round
  the camera, voxelized from the world, lit each frame, directional opacity mips; five cones a pixel at a quarter of
  the resolution, the SSGI temporal filter - the sky hidden under roofs and trees, bounce light from what the screen
  does not show, on cards without ray tracing hardware. `r.GI VoxelGI`, `r.GlobalIllumination 4`, `MANIAC_GI=voxels`,
  Lua `Engine.set_gi("voxels")`.
- **Names of our own**: the dynamic GI is **Maniac GI**, the virtual geometry **Maniac Mesh** - `r.ManiacMesh`,
  `r.ManiacMesh.MaxPixelsPerEdge / .ComputeCulling / .Occlusion`, `stat mesh`, view modes `MeshLOD`, `MeshClusters`,
  `MeshTriangles`, `MeshHierarchy`, Project Settings keys `ManiacMesh*` (the older keys are still read), the
  DerivedDataCache folder `MeshClusters`.
- **2D** (Docs/Sprites.md): **Light 2D** per pixel (falloff, height, normal maps) with soft shadows from **Light
  Occluder 2D** polygons and tile maps, **Canvas Modulate**; **terrains** (autotiling from the eight neighbours);
  **Parallax**; **Line 2D** and **Polygon 2D**; **Camera 2D** (follow, smoothing, limits, zoom); **2D physics** -
  **Rigid Body 2D** (dynamic, kinematic, static; Jolt held in the XY plane), capsule and polygon colliders, the tile
  maps' solid tiles as boxes, walls that move become kinematic, **Joint 2D** (pin, spring, groove, weld, break force),
  `contact2d_begin` / `contact2d_end`, impulses, forces, teleports, gravity from Lua; the editor's Details and Place
  Actors for all of them; the **2D Platformer** template (New Project > Games).
- **Water**: a sea round the camera (a radial grid), waves and ripples per pixel, a sun glitter path; **AMD**: new
  textures cleared (no black blocks), the far shadow cascades crossfade, fences flushed.
- **Cook Content** (Build > Cook Content, `ManiacEngine --cook <project> [--platform X]`; Docs/Packaging.md): every asset
  the game uses in its run-time form ahead of time - pictures to `.mtex` with their mips, block-compressed by use (BC1 /
  BC3 colour, BC5 normal maps, BC7 masks / ORM or colour, BC4 one channel, or RGBA8; the BC4 / BC5 / BC7 encoders are
  the engine's own), models to `.mmesh` (meshoptimizer: vertex cache, overdraw, fetch; compressed and quantised),
  levels / cells / prefabs in binary (MessagePack), scripts and graphs to Lua bytecode. **Incremental**: a cook cache
  keyed by the hash of what each file is made of; an unchanged project cooks in seconds. A game reads the cooked form
  first and falls back to its source.
- **Pak files** (`.mpak`): the content in a few archives (deflate through the vendored sdefl / sinfl, MIT), every file's
  bytes checked (xxHash64) before they are read; a **virtual file system** mounts them at the game's start and every
  loader reads through it (a patch over the base by mount order, "deleted" marks). Not encrypted (said in the docs).
- **Chunks** (rules by folder, level or Data Layer: one pak each), **releases** (`Releases/<version>/`) and **patches**
  (a pak with only what changed against a release, deleted marks, `patch.json`); every package has a launcher
  **manifest** (sizes and SHA-256). Package Project cooks and makes paks by Project Settings > Packaging (also the
  Project Launcher and `--package ... --release <v>` / `--patch-from <v>`); loose packaging stays a setting.
- **Editor**: Project Settings > Packaging > Cooking / Pak Files / Chunks / Releases and Patches, Build > Cook Content
  (a worker thread: the editor keeps working) and Clear Cook Cache, Window > Size Map (by folder, type or chunk),
  Help > Packaging and Cooking Guide.
- Tests: `tests/CookTests.cpp` (paks and damage, the VFS with a patch, the encoders against their sources, binary
  levels, the cook cache, chunks / game.json / manifest / a game read from its paks / the size map, a release and a
  patch mounted over the old game).
- **Not done**: pak encryption; cooking for Android; Maniac Mesh hierarchies are still built on a game's first run.
- **Fixes from a code review** (Docs/Fixes080.md lists each one, with its test):
  - *Nothing lost on a failed save*: a partitioned level's Save writes every file beside its place first and swaps
    them in only when all are whole; a cell that cannot be read is neither loaded nor saved over; Package Project
    builds into `<folder>.building` and replaces the older package only at the end (and only one of the same game);
    `Files::copyOver` copies before it replaces; the asset Undo checks everything before it touches a file and keeps
    what was saved since; Save Changes? goes on only when the save worked; Zip Project refuses with what is unsaved;
    the Script Editor saves whole; another project opens only after every change is saved or let go; releases and
    patches are written whole and a patch never clears a folder that is not one.
  - *Editor*: Save, move, Undo is "saved" again; a prefab's copies keep what their actors say of each other (joints,
    sockets, sequences, Blueprint parts) and Refresh Prefab keeps their uids; Duplicate keeps Camera, Character,
    Landscape and the world's actors; a Scene Capture 2D gets a texture of its own; a half-read actor is taken away;
    level instances keep their actors when their level cannot be read, nested ones follow a commit.
  - *2D*: tile maps collide where they are drawn (scale, turns, mirrors); a fast collider stops at a thin wall;
    flipbooks played backwards raise their events and finish; a sprite faded to nothing is not picked; auto slicing
    numbers its sprites in order.
  - *Gameplay*: a script's brake reaches the physics; pickups come back whole; a slot that is not there is not used;
    a consumable dropped while used is not finished; loot spawners wait for their whole batch; the zone's damage and
    phases keep their time at a low frame rate; a dead driver lets go; a second chance in on_damaged keeps one alive;
    a revive forgets the old killer.
  - *Renderer*: programs built again replace the old ones; render targets that fail are tried again; surface textures
    are forgotten when deleted; the trees take no other mesh's pattern; see-through instances are sorted with the rest;
    a turned spot redraws its shadow; captures cut masked materials, tile like the picture, use their own sixteen
    lights, keep their rate and have a landscape colour each; SSGI history by real distances (orthographic too) and
    reset on cuts; probe GI on Epic relights 384 probes a frame (4.6 ms on an RX 5600 XT before).
  - *Online*: actors spawned by the server's gameplay (build pieces, pickups, bots) are found by their uid on the
    clients (the uid was written past the level's index of ids since 0.72).
- **Updates from inside the editor** (Docs/Updates.md): Help > Check for Updates, a look at the start, and **Install
  Updates Automatically** (on by default): a newer engine is downloaded and checked (SHA-256) while you work and put in
  place when the editor closes; the one before stays as `<folder>.previous`. The feed is
  `https://maniaclab.app/engine/latest.json`; `--check-update` / `--update` from a command line. On Maniac OS the Maniac
  Store brings the updates; on macOS the window opens the download page. One command publishes a version everywhere
  (`tools/publish_engine.py`: the archives, the store on Cloudflare, the macOS build, the site's feed and page, the
  public downloads on GitHub).
- **Platforms**: Windows, Linux, **Maniac OS** (`tools/release_engine.py ... maniacos`: the `.mapp` bundle the owner
  signs) and **macOS** (Apple Silicon, macOS 13.3+, OpenGL 4.1: Apple's linker, `.dylib` modules, the Mac's Open / Save
  panels, Finder; built and packaged as `Maniac Engine.app` by a workflow on GitHub's Macs - not run on a Mac yet).
  The Linux programs run on glibc 2.35 and newer (Ubuntu 22.04, Debian 12: `src/GlibcCompat.cpp`,
  `tools/check_glibc.py`).
- **Headless** (Docs/AIAssistants.md): on Linux with no screen the engine draws into an EGL pbuffer (GLFW's null
  platform with Mesa's surfaceless EGL - a render node, or llvmpipe) - `play`, `test`, screenshots and the MCP server
  work with no X server and no xvfb; `--headless` / `MANIAC_HEADLESS`. An AI assistant on its own Linux machine
  installs the engine from the public downloads (`AI/install.sh`) and makes, plays and packages a game there - the
  user's computer is not needed.

## New in v0.79 (Input, cameras, cinematics)
- **Enhanced Input** (Edit > Enhanced Input...; Docs/InputAndCameras.md): Input Actions (`.minputaction`: bool / 1D /
  2D / 3D) and Input Mapping Contexts (`.mimc`) added and removed at run time with priorities (a key a higher action
  consumes is not seen below); modifiers (Dead Zone, Negate, Swizzle, Scale, Smoothing, Response Curve) and triggers
  (Down, Pressed, Released, Hold, Hold And Release, Tap, Pulse, Chorded, Combo); events Started / Ongoing / Triggered /
  Completed / Canceled to Lua (`Input.bind_action`) and the graphs; player-remappable keys kept in the user's settings,
  the UI Editor's **Input Key Selector** widget; the old input map converted on the fly into a context of its own.
- **Camera system**: camera modifiers (field of view, offsets, post-process values, blended in and out), camera shakes
  as assets (`.mshake`: Perlin, waves or a keyed sequence; Window > Camera Shake Editor) on the camera or at a place
  with a falloff, a **Camera Shake Source** actor, view targets blended along a curve, the next view change blended,
  and a **Gameplay Camera** component with modes chosen by tags and the engine's states (third person, aim, first
  person, vehicle: arm, shoulder, lens, pitch limits, lag, collision).
- **Sequencer 2**: Shot and Subsequence tracks (loops refused), Fade track, Audio track (heard while scrubbing),
  visibility sections (actors and Data Layers), named events bound to Lua (`Sequence.on_event`), Camera Rig Rail and
  Crane actors, cinematic blend in / out, and the **Take Recorder** (Window > Take Recorder: a Play session's actors and
  view into a new sequence).
- **UI animation**: Bezier curves of a key's own (the UI Editor edits their handles), `widget:play_animation` on a
  widget's branch (one animation for every copy of a row), **data binding** of a property to a Lua expression (UI
  Editor > Details > Bindings).
- Lua: `Input.*` (16), `Camera.*` (12), `Sequence.*` (6), `actor:set_camera_mode / camera_mode / play_camera_shake /
  stop_camera_shake / set_rail_position / set_crane`: a Maniac Graph node each.
- Tests: `tests/SystemsTests.cpp` (modifiers, every trigger and their events, contexts and consumed keys, rebinding,
  the old map converted, the asset files; curves, shakes, falloff, modes by tags, the director's modifiers, shakes and
  view targets; shots, loops, fade, named events, the level file, rigs, the Take Recorder; Bezier curves; Lua in a game).
- **Not done**: shakes on the experimental Vulkan / DirectX 12 renderers; the Take Recorder records transforms and the
  camera (not poses or properties).

## New in v0.78 (Characters)
- **Character Creator - MetaHuman-lite** (Window > Character Creator, `.mchar` in the Content Browser: Add > Animation >
  Character; Docs/Characters.md): (0.97) a real human - **MakeHuman's CC0 body and face** (`assets/characters/HumanBase.mhb`,
  made by `tools/makehuman_base.py`: posed into the Mannequin's T-pose, subdivided once, its weights mapped onto the
  Mannequin's bones), a **woman and a man** (the Sex slider), with MakeHuman's CC0 **skin pictures** as detail under the
  skin tone; the skeleton is fitted to each body's own joints, so every Mannequin animation plays on it. (Before 0.97,
  and with `MANIAC_SDF_HUMAN=1`, the body was a signed distance field of rounded cones and ellipsoids.) **Body sliders**
  (sex, weight, muscle, chest, bust, belly, waist, hips, glutes, thicknesses) and **face sliders** (25: jaw, chin, nose,
  eyes, lips, cheeks, brows, ears...) are **morph targets** (MakeHuman's targets: its measures, its face); the
  face **blends presets** (Angular, Round, Long, Delicate, Strong); **proportions** (height 1.60-1.96 m, legs, arms,
  torso, neck, head, shoulders, hips) move the skeleton itself (feet kept on the floor, the clips' moves scaled).
  Randomize, Save, Place in the level, **Export .glb** (any glTF tool reads it); a level can name a `.mchar` directly.
- **Shading models** for classic materials (and `.glb` materials' extras): **Subsurface Profile** (skin: scattering
  pre-integrated by curvature from a six-Gaussian skin profile, dual specular, light through ears and fingers from the
  sun's shadow map, pores), **Eye** (a wet cornea over a refracted, parallaxed procedural iris, the sclera), **Hair**
  (Marschner-lite: R, TT, TRT lobes along the strand), **Cloth** (Charlie sheen) - on OpenGL, Vulkan and DirectX 12 alike (0.97). Eyes, teeth, gums, a tongue, brows
  and lashes on every character.
- **The face**: the **52 ARKit blend shapes** on every head (made on its own landmarks: lids turned round the eyes,
  the jaw round its hinge, the mouth, brows, cheeks, nose; the lower teeth, tongue, lashes and brows follow), a **face
  Control Rig** (a board of controls -> the 52 weights; Smile / Surprise / Anger / Sad), keys baked into a face clip,
  **lip sync from audio** (loudness, zero crossings, voicing and LPC formants -> 15 visemes -> the mouth's shapes,
  eased; baked into a `.mclip`, which now carries face tracks by name). **Add Component > Face**: blinks, eye darts,
  **look-at** (the eyes, the head a share), expressions, face clips and lip sync over whatever the body plays.
- **Groom**: strands near the camera and cards far (one mesh, three levels of detail) grown from guides combed by the
  style (Buzz, Short, Medium, Long, Bob, Ponytail, Curly, Afro) and relaxed over the body; strands skinned to the
  guides' joints. **Add Component > Groom** simulates the guides (they follow the head, swing, keep their lengths,
  collide with the Physics Asset's bodies and the scalp; reset on a teleport).
- **Clothing on characters**: shirt, long sleeves, jacket, pants, shorts, skirt, shoes - or a project's own `.glb`
  (Custom) - fitted to the body: skin weights and the body's morph targets moved onto each piece (it follows the body's
  shape), the skin under it not drawn.
- **Lua** (each a Maniac Graph node): `actor:set_face`, `face`, `look_at`, `look_at_actor`, `stop_look_at`, `blink`,
  `set_auto_blink`, `lip_sync`, `play_face`, `set_groom`; `Engine.character_build`, `Engine.lipsync_visemes`.
- The engine's glTF writer writes morph targets, weight channels, material and mesh extras; the reader takes a mesh's
  own levels of detail and a material's shading model from them. Tests: `tests/CharacterTests.cpp`.

## New in v0.77 (Blueprint classes)
- **Blueprint Classes** (`.mbp`, Content Browser > Add > Blueprint): an asset that *is* an actor class - its
  **components** (a tree: the root is the actor, the others are attached to it - meshes, lights, a camera, a trigger,
  a sound, particles, a decal, a physics body), **variables** (Instance Editable per copy, **Expose on Spawn**,
  **Private**, a new **Class Reference** type), functions, macros, event dispatchers, an **Event Graph** and a
  **Construction Script**. The Graph Editor shows it as Unreal's Blueprint editor: a **Components** panel, a
  **Viewport** tab (the class on a stage of its own, click a component to pick it), the Construction Script and Event
  Graph tabs, My Blueprint, and Details for a component (its transform and every value of the engine's components it
  has) or the class (**Parent Class**, **Interfaces**, **Class Defaults**).
- **Placed like a prefab** (drag from the Content Browser): one actor in the Outliner, its parts attached to it; its
  Details have **Edit Blueprint**, **Rebuild**, **Run Construction Script** and **Apply Instance Changes to
  Blueprint**. Saving a class rebuilds every copy in the level (name, place, values kept). The **Construction Script**
  runs in the editor whenever a copy changes and in the game before Begin Play; what it spawns belongs to the copy and
  is never saved.
- **Inheritance**: a parent that is a built-in class (**Actor**, **Pawn**, **Character**) or another Blueprint
  (Content Browser > Create Child Blueprint Class). Inherited components (changed per child), variables (defaults per
  child), functions (**Override**, with **Parent:** calls), events (a child's replaces the parent's; *Parent: Begin
  Play* runs it), custom events, dispatchers and interfaces. **Cast To** a class succeeds for its children; Cast To
  Actor / Pawn / Character. **Spawn Actor from Class** with a pin per Expose on Spawn variable and a class-reference pin.
  **Data-only Blueprints** (a child that only changes defaults) open on their Viewport and Class Defaults.
- **Blueprint Interfaces** (`.mbpi`, message calls, inherited by children), **Function Libraries** (`.mbpfl`) and
  **Macro Libraries** (`.mbpml`) shared by every graph; **Refresh Nodes** brings the nodes up to date with them.
- **Debugging**: **Step Over** (F10), **Step Into** (F11), **Step Out** (Shift+F11), a **Call Stack** tab (each graph
  function and event that runs, at its node) and a **Watches** tab, besides breakpoints and the lit wires. Compile
  errors of a class (parent missing or looping, overrides that do not match, Parent: with no parent...) go to the node.
- **Find in Blueprints** (Window menu, Ctrl+Shift+F): nodes, variables, functions, macros, dispatchers and components
  of every graph file of the project.
- Lua: `Engine.spawn_blueprint(class, x, y, z [, yaw [, values]])`, `Engine.class_defaults(class)`,
  `Engine.parent_class(class)`, `actor:blueprint_class()`, `actor:is_a(class)`, `actor:run_construction()` (each a
  node too). Docs: `Docs/Blueprints.md`, File Formats. Old graphs (`.mgraph`) and prefabs load and run as before.
- Tests: `tests/BlueprintTests.cpp` (the file format, copies and their rebuild, inheritance run in the engine, the
  Construction Script in the editor and in the game, spawning with exposed values, interfaces and libraries, the call
  stack and the three steps, compile errors, data-only classes, Apply Instance Changes, Find in Blueprints).

## New in v0.76 (Online services)
- **(0.80 merge)** One `Online` Lua table for both online APIs: the services' functions and the OnlineSubsystem's of 0.59
  (`Online.searching`, `sessions`, `leave_session`, `session`, `subsystem`, `subsystems`, `set_direct_addresses`,
  `supports`, which the services' table had replaced - the Multiplayer template's menu called nil). The five both have
  (`create_session`, `update_session`, `destroy_session`, `find_sessions`, `join_session`) answer by their arguments: a
  callback or the services' settings go to the services; seconds, an index, an address or an owner name go to the default
  subsystem. A **"Maniac" online subsystem** (Unreal's OnlineSubsystem shape) puts the services behind
  `Online::get().sessions()` (list, find, join through NAT traversal; friends, achievements, leaderboards, voice), the
  default when `Config/OnlineServices.json` says `"provider": "Maniac"`. The installer ships `ManiacServices.exe` and its
  example settings.
- **Maniac Online Services**: the engine's own online backend, as Epic Online Services is Unreal's - self-hosted, no
  third-party cloud. `ManiacServices` (`ManiacServices.exe`) is built with the engine and runs on any Windows or Linux
  server without a screen: accounts (a device's own, or an e-mail with a password), presence, friends, parties,
  **matchmaking** (queues by mode, region and skill; the players of a match are sent to a free dedicated server that
  registered itself, each with a ticket the server checks), the **internet session browser**, achievements, stats,
  leaderboards and **cloud saves** (per player, limited in size). Its configuration is a JSON file
  (`ManiacServices --example-config`; `tools/ManiacServices/ManiacServices.example.json`), its data small JSON files
  written whole. It faces the internet: sizes, rates and counts are limited, and random bytes and nonsense requests
  neither crash nor hang it (the tests throw them at it).
- **NAT traversal** for games hosted by players: a UDP rendezvous on the services, hole punching between the two
  players and the services' **relay** when punching fails. The game's own network (ENet, NetDriver) goes through it
  unchanged, by a tunnel on 127.0.0.1.
- **Voice chat** through the game's network: the microphone, **Opus** (vendored, BSD 3-Clause; IMA ADPCM when built
  without it), push-to-talk or an open mic, team / proximity / all channels, mute and volume per player.
- **The "Maniac" online provider** (`ManiacOnline::Client`), shaped like Unreal's OnlineSubsystem interfaces
  (Identity, Presence, Friends, Party, Sessions, Matchmaking, Achievements, Stats, Leaderboards, User Cloud, Voice),
  and the scripts' **`Online` table** (54 functions: login, friends, invite, matchmake, achievements, leaderboards, cloud
  save, voice...), every call answered by a callback in a later frame - nothing waits in a frame.
- **In the editor**: Project Settings > **Online Services** (the provider, where the services are, voice chat),
  Window > **Online Services Monitor** (players, sessions, matchmaking queues, servers, parties, relays - read from
  the services) and Play > **Run Local Services** (ManiacServices on this computer: the editor's game and the other
  players' windows each log in there with an account of their own, party up, matchmake and talk).
- **Security**: passwords as salted PBKDF2-HMAC-SHA-256 (210000 rounds), random expiring session tokens kept only as
  hashes, keys only in the server's own configuration, nothing secret in the repository, a game or a log. The connection
  is **not encrypted yet**: until the engine has TLS, use the services on a network you trust or with TLS tunnels at both
  ends. Everything in Docs/OnlineServices.md.

## New in v0.75 (AI at scale)
- **State Trees** (`.mstatetree`, Content Browser > Add > AI > State Tree; Unreal's StateTree): hierarchical states with
  **enter conditions**, **tasks** that all run on the active path, **transitions** on completed / succeeded / failed,
  on tick (with conditions) and on **events** (`Alarm` catches `Alarm.Fire`), with priorities and delays, `$next`,
  `$root`, `$succeeded` / `$failed`; selection of children in order or at random; **evaluators**, **global tasks**,
  **parameters** (an actor's own values in Details), **linked subtrees** and **linked assets** (another tree). Tasks:
  move_to, wait, Lua functions, the gameplay framework's actions (attack, chase, wander...), run_eqs, smart objects,
  play_animation, face, set, send_event; conditions: the blackboard, Lua, distance, tags, health, random, time in state,
  perception, all / any / not. A **State Tree** component runs one on any AI actor instead of a behaviour tree (the same
  blackboard, the same perception). **Window > State Tree Editor**: the tree and a state's details, Check, the JSON; in
  Play a **live debugger** - the chosen actor's active path lit, a **timeline** of its transitions (hover: why), its
  blackboard, Send Event.
- **EQS** (`.meqs`, Add > AI > Environment Query; Unreal's Environment Query System): generators (grid, ring, actors of a
  class / with a tag, navigation points, cover points, points) round a context (querier, target, player, a blackboard
  key, a tag, an actor), tests (distance, dot, trace / line of sight, path length, reachable, tag, Lua, random) that
  score and / or filter, curves and weights, modes (best, a random one of the best 5 % / 25 %, all). The cheap tests run
  first; a game's queries are answered **within a time budget** (2 ms a frame for all). The **EQS Testing Pawn** shows a
  query in the editor: its points coloured by score in the viewport, answered again when it is moved. A behaviour-tree
  action and a State Tree task **Run EQS Query**; **Window > EQS Editor**.
- **Smart Objects**: slots on actors (a bench's seats, a door, cover, a workbench) with tags, an animation (a clip or a
  montage) and a duration; AIs find them by a tag query and distance, **claim** one (one user a slot), walk there, **use**
  it (the object's script hears `on_smart_object_used` / `on_smart_object_ended`) and release it. State Tree tasks
  find_smart_object / use_smart_object / release_smart_object; a **Bench** in Place Actors; slots drawn free / claimed /
  in use.
- **Mass crowds**: thousands of lightweight agents (entt fragments and processors, not actors) from a **Mass Spawner**:
  **lanes** on splines (**Zone Lane**: width, two-way keeping right, joined at **crossings** end to end and in T),
  **RVO avoidance** (ORCA) with a spatial hash, **LOD** (a full actor near the camera, simulated every frame on the screen,
  a few times a second far, only maths off the screen), and **instanced skinned drawing**: the walk and idle clips baked
  once into joint matrices, every agent of a spawner one instanced draw per part of its model. 2000 agents walking a
  street grid simulate in a few milliseconds a frame. **Window > AI Debugger** (State Trees, EQS, Smart Objects, Mass).
- Lua (each with its node in the Maniac Graph): `actor:set_state_tree`, `state_tree_state`, `state_tree_path`,
  `state_tree_active`, `send_state_tree_event`, `StateTree.broadcast`; `actor:run_eqs`, `EQS.run`, `EQS.set_budget`;
  `SmartObjects.find`, `count_free`, `release`, `actor:claim_smart_object`, `use_smart_object`, `release_smart_object`,
  `smart_object`; `Mass.spawn`, `spawn_at`, `count`, `clear`, `stats`, `agents_near`, `set_avoidance`. Guide:
  Help > AI at Scale Guide (Docs/AI.md).
- Tests: `tests/AI2Tests.cpp` (the State Tree asset, selection and every kind of transition, linked subtrees and assets,
  a guard patrolling, hearing an event and chasing with Lua tasks; EQS generators, tests, filters, scores, modes, the
  time budget, Run EQS Query in both kinds of tree; Smart Objects found, claimed and used by a State Tree; lanes and
  crossings, keeping right, RVO against no avoidance, LOD, 2000 agents' frame time, baked animation, the instanced
  drawing on the GPU; the components in the level file, the asset kinds, the Lua functions).

## New in v0.74 (Vulkan)
- **Games on Vulkan - EXPERIMENTAL.** Under a second, smaller renderer there is now an RHI (Unreal's name: one small
  graphics API of the engine's own over Vulkan and Direct3D 12, `src/rhi/Rhi.h`). A game can run on Vulkan instead of
  OpenGL. **OpenGL stays the default** and is untouched: nothing changes unless you choose Vulkan. **The editor always
  draws with OpenGL**; the choice is for the game (Standalone Game, `-game`, the packaged game).
- **How to choose it:** Edit > Project Settings > Supported Platforms > **Default RHI**: OpenGL, Vulkan (Experimental) or
  DirectX 12 (Experimental). For one run: **`-vulkan`**, **`-dx12`** or **`-opengl`** on the command line (as in Unreal),
  or the environment variable **`MANIAC_RHI=vulkan`** (`dx12`, `opengl`). The first that says one wins: the command
  line, then `MANIAC_RHI`, then the project's Default RHI, then OpenGL. A packaged game starts on the project's Default
  RHI (Package Project writes it into its `game.json` as `"defaultRHI"`).
- **What the Vulkan renderer draws:** static meshes and instanced static meshes with their LOD chains (by their size on
  the screen, as the OpenGL renderer chooses them) and frustum culling (per mesh, per 48 m cluster of instances);
  characters (skeletal meshes, skinned on the graphics card in their animation); the base colour map x material colour
  x vertex colour x instance tint, emissive, cut-out and see-through materials, world-aligned maps and the world grid
  material, metal and roughness with their ORM maps and the sky reflected in metals; the sun (the moon at night) with a shadow map that follows the camera; the sky light from above and the
  ground's light from below; a sky gradient with the sun's glow and disk; height fog; an ACES tone map with an exposure
  worked out from the sun and the sky; the landscape in the colour of its first layer and water as a flat see-through
  surface; the HUD, the scripts' UI and the pause menu (Dear ImGui's own Vulkan renderer).
- **What it does NOT draw yet:** the landscape's painted layers, foliage and painted trees, water's waves and
  reflections, particles, decals, local lights (point, spot, rect), normal maps, the level's own reflections
  (reflection captures, screen-space reflections), faces' morph targets, global illumination, ambient occlusion, clouds, volumetric fog and the post effects (bloom,
  TAA, motion blur, depth of field, colour grading, auto exposure by metering). The game says so itself: **"Vulkan
  (experimental)"** in the bottom right corner of its window, and for its first seconds a line with what is not drawn.
- **When it cannot start** (no Vulkan driver, a card without Vulkan 1.3 or `VK_KHR_dynamic_rendering`, DirectX 12 asked
  for in a build without it): the game runs on OpenGL, the log says why ("Vulkan could not start: ... The game runs on
  OpenGL.") and the game shows the same line over its picture for its first seconds.
- **DirectX 12 (Windows) - EXPERIMENTAL as well:** **`-dx12`** (or `-d3d12`), **`MANIAC_RHI=dx12`** or Default RHI >
  **DirectX 12 (Experimental)**. The same renderer and HUD as on Vulkan: everything in "What the Vulkan renderer draws",
  nothing of "What it does NOT draw yet", and **"DirectX 12 (experimental)"** in the corner of the window. The program
  loads `d3d12.dll`, `dxgi.dll` and `d3dcompiler_47.dll` only when a game asks for DirectX 12 (no import library: it
  starts on any PC), so on a PC without them (Windows 7 / 8) or with a card that cannot run Direct3D 12 at feature level
  11_0, the game runs on OpenGL and the log says why ("DirectX 12 could not start: ... The game runs on OpenGL.").
  Under the hood: a flip-model swapchain (two buffers; tearing allowed when vsync is off), two frames in flight, the
  shaders compiled from the same HLSL when the game starts (Microsoft's `d3dcompiler_47.dll`, shader model 5.1, part of
  every Windows 10 / 11), one root signature for the RHI's binding layout, barriers worked out from each resource's
  state, indirect draws (ExecuteIndirect), mips made on the graphics card, and every destroyed object kept until the
  frames that used it have finished; the HUD is Dear ImGui's own DirectX 12 renderer. `MANIAC_RHI_DEBUG=1`: the
  Direct3D 12 debug layer (Windows: Settings > System > Optional features > Graphics Tools), its messages in the log;
  `MANIAC_DX12_ADAPTER=<number or part of a name>`: which graphics card (`warp`: Microsoft's software renderer).
- **Where DirectX 12 was tested:** not yet on a Windows PC with a real graphics card. It was tested in a Linux machine
  under Wine 9.0, whose Direct3D 12 is vkd3d (Direct3D 12 on top of Vulkan) on a software Vulkan driver, with
  Microsoft's own `d3dcompiler_47.dll`: every test of `tests/RhiTests.cpp` passes on it, the Third Person template plays
  with `-dx12` (its first frame, screenshots, the HUD), and it falls back to OpenGL when `d3d12.dll` is missing. vkd3d
  is not a Windows driver and has no debug layer: the first runs on an NVIDIA, AMD or Intel card under Windows 10 / 11
  (with `MANIAC_RHI_DEBUG=1` and Graphics Tools installed) are the real test.
- **Under the hood:** the Vulkan backend loads Vulkan at run time (volk: no import library; `vulkan-1.dll` comes with
  the graphics driver), uses Vulkan 1.3 (or 1.1/1.2 with `VK_KHR_dynamic_rendering`), dynamic rendering, two frames in
  flight, its own memory blocks, barriers worked out from each texture's state, and keeps every destroyed object until
  the frames that used it have finished. One HLSL source for both backends (`shaders/rhi/*.hlsl`): the SPIR-V is made
  from it by `tools/rhi_shaders.py` and kept in `src/rhi/shaders/*.h`, so building the engine needs no shader tool.
  The level is still LOADED through a small hidden OpenGL context (the engine makes its meshes and textures that way;
  the Vulkan renderer copies them), so an OpenGL 4.1 driver is still needed. `MANIAC_RHI_DEBUG=1`: the Vulkan
  validation layer, when it is installed; `MANIAC_VK_DEVICE=<number or part of a name>`: which graphics card (a laptop
  with two).
- **Tests:** `tests/RhiTests.cpp` - every test runs on each backend the build has that starts: buffers, a triangle read
  back, the depth test, sampling, blending, constants, bind groups, compute, indirect draws written by compute, deferred
  deletion, render targets made again, the scene renderer (boxes, shadows, sky, culling), a skinned character, the HUD,
  a window's swapchain, and the game itself run with `MANIAC_RHI` (its screenshots and log), its fall-back to OpenGL and
  a packaged game's Default RHI; and the edges: winding and culling, depth read back, all 128 bytes of push constants,
  the eighth texture of a bind group, raw storage buffers, indirect arguments read from an offset, an upload while a
  command list is being recorded, mips made on the card (in linear light for sRGB), a shader that does not compile.

## New in v0.73 (Maniac Mesh)
- **Maniac Mesh, virtualized geometry:** a static mesh with **Maniac Mesh** on (Details > Static Mesh > Maniac Mesh;
  Details > Instanced Static Mesh > Maniac Mesh) is drawn with its **cluster hierarchy** instead of its LOD chain: millions
  of triangles, and only the ones a pixel needs, at any distance. Every frame each instance draws the clusters whose
  simplification error is under a pixel on the screen (`r.ManiacMesh.MaxPixelsPerEdge`, 1) while their group's is not,
  so neighbouring clusters always meet without a crack. Place Actors > Maniac Mesh > **Maniac Mesh Showcase**: 64 rocks of 1.3
  million triangles each (84 million) drawn with about 1.2 million.
- **The cluster hierarchy** (a graph, as Unreal's): the mesh cut into clusters of up to 128 triangles, neighbouring
  clusters grouped by the edges they share (8 to a group), each group simplified to half with its outer border kept
  where it is and cut into clusters again, up to one or a few clusters at the top; errors and bounding spheres only
  grow upwards. A mesh of a million triangles is built in about 1.5 s - in the background in the editor (until then it
  is drawn with its LOD chain).
- **The DerivedDataCache:** a built hierarchy is kept on disk, named by a hash of the mesh's positions and triangles
  and of the builder's version (`%LOCALAPPDATA%\Maniac Engine\DerivedDataCache\MeshClusters` on Windows, the user folder's
  `DerivedDataCache/MeshClusters` elsewhere): a mesh is built once, for every project. A damaged or foreign file is not used
  (the mesh is built again).
- **Driven by the graphics card:** with compute shaders (OpenGL 4.3, or 4.1 with the compute, storage buffer and
  multi-draw indirect extensions) a compute pass tests every instance's candidate clusters - level of detail in
  pixels, the view's frustum, and **occlusion** against a depth pyramid (Hi-Z, in two passes: the last frame's depth,
  then this frame's own for what that one hid) - and appends the draws, which one `glMultiDrawElementsIndirectCount`
  per mesh and material draws. Nothing is read back during the frame. Without compute shaders (macOS) the CPU picks
  the very same clusters (`r.ManiacMesh.ComputeCulling`: auto, 0 the CPU, 1 the card).
- **The shadows draw the same clusters:** the sun's cascades and the lamps' shadow faces draw the clusters the
  picture's cut chose (culled to each light's view), so a shadow never has another level of detail than its surface.
  The depth prepass, the lit pass and the shadows draw clusters; reflection captures and the GI probes keep drawing
  the mesh's LOD chain.
- **View Mode > Maniac Mesh Visualization:** **Clusters**, **Triangles** and **Hierarchy** (a colour per cluster, per
  triangle, per level of the graph; meshes without Maniac Mesh are grey); Maniac Mesh LOD colours the Maniac Mesh meshes by level too.
- **Project Settings > Engine > Rendering > Maniac Mesh:** on or off for the project, Max Pixels Per Edge, Culling (Auto,
  CPU, Graphics card), Occlusion Culling, the DerivedDataCache's folder. **Console:** `r.ManiacMesh`,
  `r.ManiacMesh.MaxPixelsPerEdge`, `r.ManiacMesh.ComputeCulling`, `r.ManiacMesh.Occlusion`, `r.ViewMode MeshClusters`
  (`MeshTriangles`, `MeshHierarchy`) and **`stat mesh`**: instances in view, triangles and clusters drawn of how
  many, the shadows' triangles, cluster tests, occluded, where the clusters were picked. Window > Statistics >
  Rendering has them too.
- **Not in this version** (each a large piece of its own): software rasterization of tiny triangles, the visibility
  buffer, streaming of cluster pages, virtual shadow maps, Vulkan and DirectX 12. Skinned and morphing meshes,
  see-through materials and instances that sway in the wind keep their LOD chain.
- **Tests** (`tests/Maniac MeshTests.cpp`, `MANIAC_TEST_ONLY="Maniac Mesh:"`): the hierarchy's rules, cuts without cracks at any
  distance, the cache, and on the card: it picks the clusters the CPU picks (the same picture), nothing drawn behind
  the camera or behind a wall, the view modes, hidden and deleted actors, another level, a resized window, and a rock of
  a million triangles drawn 100 times at 1280 x 720 (about 2 % of the 100 million drawn; up close the picture of full
  detail). `MANIAC_MESH_DEMO=1 ManiacEngine --autotest <folder>` places the Maniac Mesh Showcase in a new level and takes
  its pictures.

## New in v0.72 (Fixes)
- **Occlusion culling, safe on every card:** the moved depth grid holds distances in metres along the view axis
  (computed in double precision), and a box is hidden only when it is behind everything over it by 1 % and 2 cm. A
  wall facing the camera was tested against its own depth and decided by the last bits of the depth buffer: on a Radeon
  walls hid themselves, so graph-material walls, the black wall behind particles and see-through spheres lost what was
  behind them. The depth is read back through a mapped pixel buffer (`glGetBufferSubData` is not in OpenGL ES - the
  ES picture tests failed 8 of 23 - and can wait for the whole queue on a desktop driver).
- **Texture streaming:** all its uploads (levels dropped and gained) stay under 24 MB a frame, a texture too big for
  that grows a level at a time, and what occlusion culling hides keeps its textures; its uploads have a profiler line
  of their own ("Texture streaming").
- **Lua and Windows paths:** `luaQuote` (LuaQuote.h) makes any text a Lua string literal; every place that puts a
  value into Lua source uses it (the Lua debugger's watch paths, the Editor Tool plugin template, the editor script
  templates; a `C:\Users\...` path was "invalid escape sequence").
- **Online on Windows:** UDP "port unreachable" errors no longer stop a socket's reads (SIO_UDP_CONNRESET off for the
  ENet hosts and the LAN beacon / search); the tests start their servers with a quoted command line and log them.
- **Actors by uid:** `Scene::findByUid` keeps its index in the registry (made, `patch`ed and destroyed actors update
  it): a miss is one lookup instead of a rebuild of the whole index - 1000 misses in 10,000 actors are well under a
  millisecond (they were about 120 ms); a socket attachment whose parent streamed out costs nothing any more.
- **Scene Capture 2D:** each capture size keeps its own HDR target (a minimap and a camera of two sizes made one
  shared target again twice every frame).
- **Capsule shadows:** only the nearest characters' capsules are built, until the 32 are full (20 humanoids built 220
  to keep 22), and each model's bones are found by name once.
- **Audio:** a voice is found by its id through an index, a still ambient emitter sends its voice nothing, and a voice
  that starts later (a start delay, a stinger waiting for the beat) takes no channel before it starts (with one channel
  it silenced the sound that was playing).
- **Benchmark:** `MANIAC_RENDER_BENCH` also runs each configuration pipelined (no wait per frame) and prints the sum of
  the GPU scopes beside it; `MANIAC_BENCH_SCOPES=1` lists every scope.

## New in v0.71 (Landscape and editor)
- **Landscape streaming** (Unreal's landscape streaming proxies with World Partition): a landscape cut into **pieces**,
  each an actor with its own heights, paint, holes, edit layers, collision and grass, saved in the World Partition cell it
  stands in and loaded with it around the player (its collision too); where a piece is not loaded a coarse **distant copy**
  of the whole landscape stands in, so the ground reaches the horizon. Pieces keep their borders whole at every LOD (no
  cracks) and take their edges' normals from their neighbours (no seams). Landscape Mode > Streaming: **Convert to
  Streamed Landscape** (the piece size, World Partition on with cells of that size), **Merge Pieces into One Landscape**,
  **New Streamed Landscape** (32 x 32 pieces of 128 m = 4 km x 4 km, loading only around the player). The brushes work
  over every loaded piece, the shared edges stay one; settings set on the landscape go to every piece. Old levels load as
  they did (a landscape is one actor; a small one may stay whole).
- **Landscape Edit Layers** (non-destructive): Landscape Mode > Edit Layers - the Base and layers over it that are
  sculpted and painted, **hidden**, **locked**, **reordered**, given an **alpha** (-1 .. 1) and **merged**; the ground is
  their heights added up and their paint laid over each other. **Landscape splines and water bodies write layers of
  their own** ("Spline: Road", "Water: Lake"), made again each time they are applied (twice: once).
- **Landscape Auto Material**: paint layers laid by slope and height rules (soft edges, noise in world space), on their
  own layer above the Base, made again when the ground changes; painted layers above still win.
- **Landscape Grass Types**: several kinds of grass, each growing where its paint layer is (density, height, colour,
  distance, slope), streamed with the landscape's pieces.
- **Viewports 1-4** (Window > Layout > Viewport Layout): one pane, two side by side, two stacked, four - each other
  viewport with its own renderer, camera (Perspective, Top, Bottom, Left, Right, Front, Back), view mode, show flags
  (grid, landscape, meshes, foliage, particles, decals, water, lights...) and Realtime; its own camera controls, a click
  selects. Saved per project.
- **Variant Manager** (Window > Variant Manager): variant sets on the level's Level Variant Sets actor; a variant keeps
  actors' places, visibility, materials and any property a Sequencer track can key (light colour, emissive, time of
  day...). Add Selected Actors, Record, Activate (double-click). Lua `Variants.activate(set, variant)`, `active`, `sets`, `variants`.
- **Class Viewer** (Tools > Class Viewer): every actor class, component and asset type of the engine as a tree or a
  search, with what it comes from, what it is for, how many the level has; Place in Level, Select in Level.
- **HLOD Outliner** (Window > HLOD Outliner): every World Partition cell with its proxy (triangles against the cell's),
  Build / Rebuild / Delete one or all, Go To, Show the proxies in the viewport.
- **Device Output Log** (Window > Device Output Log) and **Project Launcher** (Platforms > Project Launcher): launch
  profiles (package for a platform into a folder, run the game with a start level, a window size and arguments; saved in
  `Config/LaunchProfiles.json`); the game started from the editor is followed line by line with its verbosity, filters,
  Stop. A packaged game takes `-windowed`.
- **Movie Render Queue** (Window > Movie Render Queue): jobs that render a Level Sequence to PNG images (8 or 16 bits)
  at any size in a renderer of their own, with **temporal samples** across the shutter (anti-aliasing and true motion
  blur), spatial supersampling, **warm-up frames**, a frame range, the renderer at its highest quality and **console
  variables per job** (set back after). No MP4: the engine carries no video encoder (Docs/Rendering.md).
- **Fixes (World Partition streaming, from a code review of 0.64):** (1) a level instance's actors no longer skip the
  streaming budget - they wait in the streamer's queue and each one counts as an actor of *Actors per Frame* and of the
  frame's time (a building of 500 actors made them all in one frame before, even with a budget of 1); (2) the streamer
  keeps the actors each level instance made as it makes them, instead of searching every level instance's actors of the
  scene for each child (that search grew with the square of their number: 1.3 ms for 2,000); (3) after a teleport the
  reads of cells left behind that the worker has not started are taken off its queue (their files are never opened, so
  the new place's files do not wait behind them); a read already started is still thrown away when it comes.
  `stat streaming` shows the reads cancelled and thrown away.
- Lua: `Landscape.height`, `layer_weight`, `edit_layers`, `pieces_loaded`, `is_streamed`; `Variants.*`. Docs:
  **Docs/Landscape.md**, Docs/World.md (HLOD Outliner, Variant Manager), Docs/Rendering.md (Movie Render Queue,
  Viewports), Docs/Platforms.md (Project Launcher, Device Output Log). Tests: `tests/Editor3Tests.cpp`.

## New in v0.70 (Physics effects)
- **Fracture Mode and Geometry Collections** (Unreal's Chaos Destruction; Window > Fracture Mode): a static mesh (an engine
  mesh or a model's Instanced Static Mesh) cut into a **Geometry Collection** (`.mgeoc`, Content Browser > Physics) -
  **Uniform / Clustered Voronoi**, **Radial** from an impact point, **Slice** (turned and moved at random), **Plane Cut** -
  with **interior faces** in a material of their own, islands split, crumbs merged, the same seed the same cut. **Levels**:
  fracture the leaves again, or **Auto Cluster** them, so big chunks break into smaller ones; Flatten, Undo Fracture,
  **Explode Amount** and level colours in the viewport. At run time (Details > Geometry Collection): **damage thresholds
  per level** (accumulated or not), strain from **shots** (the 0.63 damage pipeline), **explosions** (weapons'
  explosions, `Engine.explode`) and **impacts** (falls, hits: the physics engine's contacts), **anchors** (the base, or a
  box) and the **connection graph** - what no longer touches an anchored piece falls - object type Static / Dynamic /
  Sleeping, **small debris removed** after a while and a budget of moving pieces, and a **cache** that records a break
  (`.mgeoccache`) and replays it the same way every time. Hundreds of pieces: convex bodies, one skinned draw per material.
- **Cloth** (Unreal's Chaos Cloth): **XPBD** on the processor, coloured constraints solved on several threads, several
  cloths side by side. A **Cloth Asset** (`.mcloth`) is a plane of its own or a primitive of a model; **Window > Cloth
  Paint** paints **Max Distance** (0 = held to the mesh) and **Backstop** (distance, radius) on its points with a brush,
  sets mass, stretch and bend stiffness, damping, drag, lift, friction, iterations, and previews it in the wind. Details >
  Cloth: collision with the skeletal mesh's **Physics Asset** bodies (0.67), simple shapes of the world and the ground,
  other characters; the level's **wind**; **LOD** (fewer iterations far away, frozen beyond); **teleport / reset**. Place
  Actors > Physics: Cloth Banner, Flag, Curtain.
- **Fluids lite** (Niagara Fluids): **Fluid Volumes** (Place Actors > Effects > Fluid Smoke / Fire Volume) - a 3D grid of
  gas on the graphics card in **compute shaders** (advection, buoyancy, vorticity confinement, wind, turbulence,
  dissipation, a Jacobi pressure solve) **ray marched** with the sun, its shadow map and the sky; fire glows by its heat.
  Budgeted by the quality (Epic / High / Medium), **off on Low**; every program through the shader cache, made with the
  renderer's (the cold start on a Radeon). **Water Ripples**: a 2D shallow-water wave equation round the camera on the
  water (planes and the 0.61 water bodies) - characters, bodies, broken pieces and scripts make waves the water shader shows.
- **Hair lite** (Add Component > Hair, Place Actors > Physics > Fur Ball): fur and short hair as strands grown on a static
  or skinned mesh, simulated (Verlet, segment lengths kept, a pull back to the groom, gravity and wind) and drawn as
  crossed ribbons coloured root to tip; culled by distance. Lua `actor:set_hair(name, value)`.
- **Wind Directional Source** (Place Actors > Effects): the level's wind, with gusts and turbulence, for cloth, fluids and hair.
- **Lua** (and a Maniac Graph node each): `actor:fracture_damage`, `fracture_strain`, `fracture_reset`, `fracture_chunks`,
  `fracture_play_cache`, `fracture_save_cache`, `cloth_reset`, `cloth_teleport`, `set_cloth_enabled`, `set_cloth_wind`,
  `set_fluid`, `set_hair`; `Engine.fracture_strain`, `Engine.wind`, `Engine.set_wind`, `Engine.water_splash`, `Engine.water_ripple`.
- Documentation: **Docs/PhysicsEffects.md** (Help > Physics Effects Guide). Tests: `tests/EffectsTests.cpp`. Not done:
  cloth self collision, liquids, an imported groom.

## New in v0.69 (Gameplay online)
- **The gameplay framework online, the server decides** (`src/GameNet.*`, Docs/Online.md "Gameplay online"): attributes,
  effects, abilities, damage, death, inventories, pickups, building pieces and their edits and collapse, the safe zone,
  loot chests, joints and physics props, vehicles and carriers are the server's and reach every client; a client's
  calls of the framework (fire, build, pick up, use, select, get in...) are requests. Joiners get the world as it is;
  a game that ran alone before it joined drops what it made by itself.
- **GAS-style prediction keys**: a client runs its own pawn's ability at once (cost, cooldown, steps, effects on itself)
  under a key; the server runs it in the move it was activated in and answers. Refused: rolled back (cost back, effects
  and cooldown gone, `ability_failed` signal). "wait_release" steps wait for the owner's release online too.
- **Weapons fired on the client, checked on the server with lag compensation**: the kick, the round, the flash and the
  impacts at once; the server checks weapon, rate (token bucket), ammo and where the shot starts, then traces it against
  the hit boxes **rewound** to the moment the shooter saw (at most 300 ms, Editor Preferences > Play, `-lagcomp`,
  `Gameplay.lag_compensation`). Pellets from a seed both sides share. Others see the shot (S_FIRED).
- **Two players take one item: one gets it**; walking over pickups is the server's; inventories go to their owner,
  what is in hand to everyone; shots not yet answered keep their rounds spent on the client.
- **Physics ownership**: the server can give a client a body (`actor:set_physics_owner(peer)`); it simulates it and the
  server checks what it sends (speed, distance), refusing and taking it back when it cannot be believed.
- **Vehicles online**: passenger seats (`VehicleComponent::passengerSeats`), `switch_seat`, `seat`, `occupants`; get in
  and out decided by the server; the driver's game simulates his vehicle (it answers at once at any ping), the server
  checks it (`maxSpeed`) and everyone else sees it interpolated.
- **Character Movement, predicted** (`CharacterMovementComponent`, Details > Character Movement): **crouch** (a lower
  capsule; it does not stand up under a ceiling; C), **sprint**, **slide** (crouch at speed, downhill faster),
  **mantle / vault** (Jump at a ledge 0.45-1.8 m), **swimming** in the level's water (Jump up, Crouch dives, climb out
  at the edge), **ladders** (the navigation's ladder links; Place Actors > Ladder), **gliding** (after a drop). The
  server's answer carries the whole movement state; other players see crouch and mode. A **root-motion hook**
  (`CharacterMove::setRootMotionProvider`) for the animation's root motion.
- **Carriers** (`CarrierComponent`, Place Actors > Carrier): a transport pawns ride hidden and drop from (Jump), gliding
  down; `actor:board`, `leave_carrier`, `carrier`.
- **Building edit mode for real**: each piece type declares its edit grid (`PieceDef::editColumns/editRows`,
  `Building.define_piece`); the cells taken out are gone - the rest stands and collides (a door you walk through),
  edited on the server, replicated. `Building.edit_grid`, `Building.can_edit`; Details shows the cells.
- **`stat net`** has the gameplay's traffic (kbps, shots checked / refused, rewind, predictions confirmed / rolled back);
  `Gameplay.net_stats()`. New Lua has its Maniac Graph nodes.
- **Fixes (a code review of 0.64)**: AI Perception told a script `on_perceived` at every look (6-7 times a second)
  while a target stayed in sight - now once when it comes into sight or back into it (its place is still followed);
  a structure's check after a piece is destroyed no longer compares every piece with every other (a grid of the pieces'
  bounds: each looks only at its neighbours); a destroyed character's capsules are freed
  (`Physics::removeCharacter`, the slot reused, the other characters' ids kept) instead of being parked forever.

## New in v0.68 (Lighting)
- **Probe GI that works off the screen** ("Maniac GI", like DDGI without ray tracing hardware): two grids of probes
  round the camera (40 m and 160 m, stored toroidally) and a **GI Volume** actor for finer probes in a room. Each probe's
  surroundings are captured once (six 6 x 6 cube faces in one draw call per object, through a geometry shader) and
  relit a part each frame with the sun and its shadows, the lamps and theirs, emissive surfaces, the sky and the
  probes' own light (infinite bounces); octahedral irradiance plus distances (Chebyshev visibility) keep light from
  leaking through walls. Combines with SSGI (Epic) and the sky light; off on Low / Performance. `stat gi`, Show > GI Probes.
- **Build Lighting** (Lightmass-like): Static / Stationary / Movable **mobility** for lights and meshes; Build > Build
  Lighting (Preview / Production) bakes the lightmaps of Static meshes with a **multi-threaded CPU path tracer** (two-level
  BVH, soft shadows, bounces, emissive light) - the editor keeps working, a progress bar and **Cancel**; automatic
  **lightmap UVs** (charts, unfolding, packing) when a mesh has no second UV set; **Lightmap Resolution** per mesh and the
  **Lightmap Density** view; Stationary lights' **shadow masks**; a baked **probe grid for moving things**. Saved in
  `<Level>_BuiltData/` beside the level, packaged with it and loaded by the game.
- **Shadows**: a cached **far cascade** (Far Shadow Distance, 1500 m: a 2 km island shaded to its shore), PCSS soft
  shadows by **Source Radius / Source Angle**, **contact shadows per light** (Contact Shadow Length), point / spot light
  shadows in a cube map array **cached like Unreal's** (what does not move drawn once; movers drawn over the cached faces
  that see them), up to 8 lights at Epic. `stat shadows`.
- **Light functions**: point and spot lights project a picture (a window, leaves) with a scale and a pan.
- Project Settings > Rendering > Lighting (GI method, shadow quality, far shadows, lightmaps), Window > Lighting,
  `r.GI`, `r.FarShadows`, `r.Lightmaps`, `MANIAC_GI`, `MANIAC_SHADOWS`, `MANIAC_FAR_SHADOWS`, `MANIAC_LIGHTMAPS`;
  Lua `Engine.set_gi`, `Engine.gi`, `Engine.lighting_built`, `actor:set_light_mobility`, `actor:set_source_radius`,
  `actor:set_contact_shadow`, `actor:set_light_function` (each with its node). Docs/Lighting.md.

## New in v0.67 (Animation 2)
- **Physics Asset** (`.mphys`, Content Browser > Add > Physics > Physics Asset, opened in the Animation Editor): the
  bodies of a skeleton's ragdoll - a **capsule, box or sphere** per bone with its centre, turn, size, mass and damping -
  and the **joints** between them with **swing 1 / swing 2 / twist** limits and their twist axis, plus which pairs of
  bodies **never touch** (and self collision on / off). **Generate from the Skeleton** makes one for any skeleton (a body
  on every bone long enough, a ball on the head, limits by the kind of bone, overlapping bodies kept apart);
  **Engine's Humanoid** gives the 11 capsules characters had before. The editor draws the bodies, the selected joint's
  twist axis and swing cone over the preview, drags a body's centre with the mouse, and **Simulate** drops the ragdoll
  from the preview's pose onto a floor (with **Push**). Assign one per skeletal mesh in **Details > Physics and Root
  Motion**; characters ragdoll with it (`actor:ragdoll`, death), and a mesh without one gets one made from its skeleton
  when its bones are not the Mannequin's. Lua `actor:set_physics_asset(path)`.
- **Root motion**: Clip Settings > **Enable Root Motion** (root bone: automatic or chosen; turn too; up and down too;
  where the root stays: first frame, rest pose, origin) - the root's move and turn leave the pose and move the
  character through its controller (it walks stairs and slopes, gravity as ever; the input waits while root motion
  drives). An Animation Graph says where it comes from (**Root Motion**: none, ignore, from montages only - the
  default, as Unreal - or from everything); an actor can override it (Details, or Lua `actor:set_root_motion(mode)`).
  Blend spaces, state machine blends, composites, montages (by their blend weight) and mirrored poses carry it;
  `actor:root_motion()` reads the last frame's move. Actors without a character controller move by it directly.
- **Sync markers and sync groups**: Clip Settings > **Sync Markers** (named moments: "L" when the left foot plants,
  "R" the right). The samples of a blend space keep the same place between the same markers, and clip / blend space
  nodes of one **Sync Group** (a field on the node) play in step - a state that is entered starts where the state it
  leaves is in its cycle, the heaviest member leads. Without markers they share a phase, as before.
- **Inertialization**: a transition's **Inertialization** box - no crossfade: the new state plays at once (the old one
  stops, so it costs nothing) and the old pose's difference, and the way it was moving, dies away over the blend time
  along a curve without a jolt (Bollo's quintic, as Unreal's Inertialization node).
- **Control Rig - lite** (`.mctrlrig`, Content Browser > Add > Animation > Control Rig): a stack of controls solved in
  order - **FK** (a bone turned / moved over the animation), **IK (Two Bone)** on an IK Rig chain to a goal in the
  model, relative to the animation or at a **socket** (a hand on a weapon's grip), **Look At** (a bone and up to five
  of its parents share the turn, limited) and **Foot Placement** (the legs reach uneven ground in the game, the pelvis
  sinks for the lower foot, the soles follow the slope). In the Animation Editor: a base clip, a time bar, **Key** a
  control's value at a time (keys shown under the bar), drag targets in the preview, and **Bake to Clip** (a `.mclip`
  under Animations/ControlRig). In the game it is a **Control Rig node** of the Animation Graph (a post-process after
  the locomotion); scripts move its controls in the world: `actor:anim_control(name, x, y, z [, weight])`,
  `actor:anim_control_weight(name, w)`, `actor:anim_control_clear([name])`.
- **The preview shows the mesh**: every animation editor (Skeleton, IK Rig, Physics Asset, Control Rig, graphs ...)
  draws the skinned, lit mesh on a little stage of its own (drag turns, wheel zooms) with the bones, sockets, bodies
  and handles over it (**Mesh** off: the stick figure as before). The **IK Retargeter** shows the source beside the
  target, playing the same clip.
- Tests: `tests/Anim2Tests.cpp` (generation from a test skeleton, a ragdoll that falls and settles within its limits,
  the file round trips, a character's ragdoll with its asset, root motion extraction and a character that walks the
  clip's distance, sync markers in blend spaces and groups, inertialization, Control Rig IK / look-at / FK / sockets /
  keys / bake / foot placement, the Lua functions, the asset kinds).

## New in v0.66 (Editor details)
- **Actor > Attach / Detach, as in Unreal.** Select the actors, Ctrl+click the parent last, **Attach to Last Selected**
  (Alt+B): they follow it from then on - moved, turned and grown with it, in the editor and in the game (a lamp on a
  cart, a door on a moving platform; their collision goes with them). A child moved by itself (the gizmo, Details, a
  script, its physics) stays where it was put and follows its parent from there. **Detach** lets them go. Never a
  loop; saved with the level; copy / paste, prefabs and Duplicate keep a child on the copy of its parent. The
  **Outliner** shows attached actors under their parents; drag an actor onto another there to attach it. Lua:
  `actor:attach_to_actor(parent)`, `actor:detach_from_actor()`, `actor:parent()`, `actor:children()`.
- **Group / Ungroup / Lock / Unlock Group** (Ctrl+G): a click on one member of a locked group selects the whole group.
  The gizmo now moves (turns, scales) **every selected actor** together, round the one it shows.
- **Actor > Transform**: Snap Origin to Grid (Ctrl+End), Mirror X / Y / Z (drawn mirrored the right way round), Delta
  Transform..., **Lock Actor Movement** (the gizmo leaves it alone). **Convert**: a point / spot / rect light into
  another kind, with its colour, brightness and reach. **Merge Actors** (Actor and Tools menus; Unreal's Batch):
  Instanced Static Meshes of one model and settings become one actor with all the instances, each where it was.
  **Level > Move Selection to Level**: the actors go into another level file of the project (uids that are taken
  there renumbered, attachments among them kept).
- **Select**: Parent, Immediate Children, All Descendants, **All With Same Material**, Group.
- **Window**: **Message Log** (Map Check, Build All Levels, the session's warnings and errors, each on a page; click a
  Map Check line to select it), **Levels** (every level of the project: open it, or move the selection into it),
  **Layers** (named sets of actors - an actor can be in several - to show, hide and select together; saved with the level),
  **Remove Layout**, **Show Toolbar**, **Show Viewport UI**. **Tools**: **Resource Usage** (each mesh of the level:
  actors, copies, triangles, memory; click to select its actors), **Data Table Editor**. **Build > Build All Levels**
  (every level of the project opened and checked with Map Check, into the Message Log).
- **Data Tables** (`.mtable`, Content Browser > Add > Data > Data Table; Tools > Data Table Editor): the game's data
  apart from its levels - typed columns (bool, int, float, text, colour, asset, row of this or another table), named
  rows, defaults, **Check** (wrong types, missing assets, rows that point at no row), renaming a row renames what
  points at it. Lua: `Data.row(file, name)`, `Data.get(file, row, column)`, `Data.rows(file)`, `Data.find(file, column, value)`.
- **Sequencer property tracks** (Sequencer > + Property): any other property of an actor keyed at the playhead and
  played with the sequence - a material's emissive strength / colour / base colour, Visible, a light's colour and
  radius, a sound's volume and pitch, particles' rate and tint, the sun's intensity / elevation / time of day, the sky
  light, the fog's density, the exposure. Saved with the level.
- **Project Settings > Engine**: **Target Hardware** (Maximum / Scalable), **Physics** (the game's gravity: Earth,
  Moon or any), **Collision** (the eight collision layers' names, used by Details and by `Engine.layer_mask("Enemy")`).
- **Trigger volumes measure volumes** (Details > Measure: Volume, the default): a character's capsule or a moving
  body's box touching the trigger counts, and a fast body that went through a thin trigger between two steps entered
  and left (Point: the actor's middle, as before).
- **Physics queries in Lua**: `Engine.sphere_cast(origin, direction, radius, distance [, layers])` (what a ball swept
  along a line meets: point, normal, actor, distance), `Engine.box_overlap(centre, half size [, yaw])` (every actor
  whose collision is in a box, walls and floors too), `Engine.layer_mask("World", "Enemy", ...)`; and the pointer:
  `Engine.pointer()` (where the mouse is on the game's picture, a click), `Engine.screen_ray(x, y)`, `Engine.pick(x, y)`
  (what is under it, through the game's camera, orthographic too) - a strategy game picks its units with them.
- **The light split up in the viewport** (View Mode > Buffer Visualization, console `r.BufferVisualization`): Base
  Color, Roughness, Metallic (as data), Direct Light (the sun and the lights alone), Reflections (alone).
- **What a picture was drawn with**: the game's log says its graphics (preset, shadows, AO, GI, AA, effects...), the
  automated screenshots carry the same line in their PNG (text `Maniac.Graphics`), the console's `graphics` prints it.
- The bottom bar's **Diagnostics**: FPS, draws, triangles, the program's memory, the graphics card's free memory (AMD
  and NVIDIA drivers tell it), shader programs, the session's errors and warnings (they open the Message Log).

## New in v0.65 (Tools)
- **Localization** (Unreal's String Tables, `LOCTEXT` and Localization Dashboard). **String Table** assets
  (`.mstrings`: texts by key, a column per culture; Content Browser > Add > String Table, CSV import / export),
  the project's cultures and native culture (`Config/Localization.json`), the lookup with fallbacks (`el-CY` -> `el`
  -> the native culture -> the source text). A Text, Button or Check Box of the UI Editor has a **Localized Key**: it
  shows the key's text in the current culture and changes at once with it. Lua: `Loc.text`, `Loc.format` (`{name}`,
  `{0}`), `Loc.set_culture`, `Loc.culture`, `Loc.cultures`, `Loc.has` (and graph nodes for each). **Tools >
  Localization Dashboard**: cultures with how much is translated, the tables' texts side by side, **Gather Text** (the
  keys widgets, scripts and graphs use; those in no table are added with their source text), what each culture is
  missing, and a **font check** (does a font have every Greek / Cyrillic / accented letter of the texts). The culture
  the player picks is kept in the user's settings; packaged games take their tables. Docs/Localization.md.
- **Lua debugger** in the Script Editor: click the margin for a **breakpoint** (conditions, on / off), Play: the game
  pauses at the line; **Continue / Step Over / Step Into / Step Out / Pause** (F5, F10, F11, Shift+F11), the **call
  stack**, **locals, upvalues, globals, watches** (Window > Lua Debugger), the value under the mouse, **Break on
  Errors**, an error's line marked in red with Go to the line. No breakpoint: no hook, scripts run as fast as before.
  Docs/Debugging.md.
- **Importers**: **OBJ** (+MTL) and **FBX 7.x, binary and ASCII** (meshes by material, normals, UVs, colours,
  materials and textures - embedded ones too -, the skeleton and skin weights, every animation stack as a clip, pivots
  and pre / post rotation, centimetres and Z-up made metres and Y-up) are made `.glb` on Import; **DDS** and **KTX2**
  textures (BC1-BC7, RGBA8...) load wherever a `.png` does. Not done: USD, Basis Universal / Zstandard KTX2.
  Docs/Importing.md.
- **Data Validation**: **Tools > Validate Data** - missing references, unreadable files, scripts / graphs / materials
  that do not compile, texture sizes and powers of two, names (spaces, Unreal's prefixes when asked), widget keys and
  translations missing, big files, unused assets - in a window whose lines open the asset; **Validate on Save**;
  `ManiacEngine --validate <project> [--out report.json]` returns 1 on errors (for build machines); rules of one's own
  in C++ (`DataValidation::registerRule`). Docs/DataValidation.md.
- **Editor scripting**: **Tools > Editor Scripts** - Lua in `Content/Editor` that selects, spawns, moves, renames
  actors, opens assets, renames / moves assets with their references fixed, validates, runs console lines (the
  plugins' `Editor` table plus `Editor.actors`, `selection`, `select`, `actor`, `spawn`, `set_position`... one Undo
  step each); an **Editor Utility Widget** is a `.mui` of the UI Editor with a script of the same name whose buttons
  call the editor's Lua, shown in a window of the editor. Docs/EditorScripting.md.
- **Revision Control (Git)**: Tools > Revision Control runs the `git` program (no library): the Content Browser's
  tiles get a mark (modified, added, untracked, conflicted, renamed), a window lists the changes with their **diff**
  and history, **Submit** (add + commit) the checked files with a description, **Revert** them, **Initialize
  Repository** (with a .gitignore for Saved, Binaries, Packaged). Docs/RevisionControl.md.
- **Insights**: Tools > Insights records frames on top of the frame profiler - a timeline of the frames (slow ones in
  red), the CPU and GPU blocks of each renderer scope of a frame, statistics per scope - with **Hitch Capture** (a
  frame over the threshold is kept with the frames before and after it) and captures saved / opened
  (`Saved/Profiling/*.minsights`). Docs/Insights.md.

## New in v0.64 (Audio)
- **Our own mixer.** Sound is mixed by the engine itself (miniaudio only opens the device and reads the files): voices
  with pitch (4-point interpolation), constant-power panning, distance curves, a low pass per voice; **sound classes**
  and a **submix tree** with effect chains; the Master's **limiter** keeps every peak under -0.3 dBFS however much plays.
  Everything the engine played before plays as before; games keep the same C++ calls.
- **Sound Cues** (`.mcue`, Content Browser > Add > Audio > Sound Cue, **Window > Sound Cue Editor**): a node graph
  evaluated each time it plays - Wave Player, Random (by weight, without repeats), Sequence (Unreal's Concatenator),
  Mixer, Modulator (random volume and pitch), Continuous Modulator (volume and pitch follow a parameter: an engine's
  revs), Looping, Delay, Attenuation, Switch (by a parameter). Play it in the editor with its parameters.
- **Sound Attenuation** assets (`.mattn`, **Window > Sound Attenuation**): Natural, Linear, Logarithmic, Inverse, Log
  Reverse or a **Custom curve** drawn with the mouse; inner radius and falloff; spatialization on / off with a
  non-spatialized radius; **low pass by distance**; **occlusion**; reverb send near / far; priority by distance.
- **Sound Classes and Submixes** (**Window > Sound Classes & Submixes**, saved in `Config/AudioMix.json`): Master >
  Music, SFX > Ambient, Voice, UI by default, each with its volume, pitch, submix and voice limit; the **player's own
  volume** of each class is kept in the user's settings (`Saved/AudioSettings.json`). Submix effects, written for the
  engine: **Reverb, 4-band EQ, Compressor, Limiter, Delay (ping-pong), Low Pass, High Pass, Ducker (sidechain)**, with
  live meters. Changes are heard while you edit.
- **Audio Volumes** (Place Actors > Effects > Audio Volume): a box or a sphere with a **reverb preset** (Room, Hall,
  Cathedral, Cave, Bathroom, Arena, Hangar, Tunnel, Forest, Underwater ...) and wet level, **blended in over its fade
  time** when the listener crosses, and how the sounds outside are heard from inside (exterior volume and low pass).
- **Occlusion:** a ray from the listener through the physics world; a wall in the way makes a sound quieter and
  muffled, gliding over its interpolation time.
- **Concurrency, virtual voices, priority:** at most N of a cue or of a class (Stop Oldest / Quietest / Farthest /
  Lowest Priority, or Prevent New); inaudible voices and those over the channel limit (48) play on **virtually**
  (nothing mixed, their time goes on) and come back where they would be.
- **MetaSounds (lite)** (`.msynth`, **Window > MetaSound Editor**): a procedural sound rendered by the mixer as it
  plays - Oscillator (sine, band-limited saw and square, triangle, FM), Noise (white, pink), ADSR, Filter (low / high /
  band pass, its cutoff moving every sample), LFO, Mix, Multiply, Add, Map Range, Delay, On Play, Trigger Repeat, and
  **Parameters / Trigger Parameters** the game sets while it plays. Its output wave drawn in the editor.
- **Music:** crossfades between tracks (equal power), **stingers on the next beat or bar** (to the sample), and
  **ducking** - the Music submix goes down while the Voice submix speaks (the Ducker effect, any keys you choose).
- **Audio Insights** (**Window > Audio Insights**): every voice with its class, submix, attenuation, distance, level,
  real / virtual and occlusion; the submix meters and gain reduction; the reverb; the output's wave. **stat audio**
  in the console; `au.3dVisualize.Enabled 1` draws the sounds in the viewport with their radii (red line: occluded);
  `au.voices`, `au.MaxChannels`, `au.classvolume`.
- **Lua and Maniac Graph** - new `Audio` table: `Audio.play`, `Audio.play_at`, `Audio.stop`, `Audio.is_playing`,
  `Audio.set_volume`, `Audio.set_pitch`, `Audio.set_position`, `Audio.set_param`, `Audio.trigger`,
  `Audio.set_class_volume`, `Audio.class_volume`, `Audio.play_music`, `Audio.stop_music`, `Audio.set_tempo`,
  `Audio.stinger`, `Audio.voices`, and `actor:play_sound_attached` - each a node too. `Engine.play_sound` now plays a
  sound to its end (it was cut after 4 seconds). What a game's scripts started stops when the game ends.
- Sound Cues, MetaSounds and attenuation assets are packaged with the game, and what they name is checked.
  Documentation: `Docs/Audio.md`.

## New in v0.63 (Gameplay framework)
- **Gameplay framework** (Docs/Gameplay.md, Help > Documentation): Unreal's gameplay pieces and the systems most
  games are made of, for every game on the engine - components in Details (+ Add > Gameplay Framework), ready actors
  in **Place Actors > Game Framework**, data in **Window > Gameplay Data**, Lua, a node for every function in the
  Maniac Graph, C++ in `GameFramework.h`.
- **Gameplay tags** completed: hierarchical (`Weapon.Rifle` is a `Weapon`), the tags effects and abilities give,
  **tag queries** (`(Enemy | Boss) & !State.Dead`); the Tags Manager shows the tag tree and selects what a query matches.
- **Abilities and attributes** (Unreal's Gameplay Ability System): attributes with min / max / regeneration (health,
  shield, stamina...), **gameplay effects** as data (`.meffect`: instant / duration / infinite, add / multiply /
  override, periods, stacking, tags granted / required / blocked, cues), **abilities** as data (`.mability`: cost,
  cooldown, tag rules, cancel / block by tags, steps: wait, wait for release, montage, effect, event, launch).
- **Damage pipeline and health**: teams, resistances by damage type (hierarchical), shield, hit reactions, death
  (State.Dead, ragdoll or death animation, drop on death), revive; `on_damaged`, `died`, `killed` events.
- **Inventory and items** (`.mitem`: stack size, rarity, icon, mesh, tags, weight), slots and an ammo / resource pool,
  pickups, the item in hand on a socket, consumables with a use time. **Weapons** as data: hitscan and projectile,
  fire rate, semi / automatic, pellets, falloff, headshots, magazine and reload, spread and recoil patterns, aiming
  down the sights, muzzle / impact effects, explosions; breakable scenery and building pieces take the shots.
- **AI perception** (sight cone and line of sight, hearing, damage, memory, teams) into the behaviour trees, **cover
  points**, built-in tree actions (attack, chase, take_cover, reload, heal, wander, pick_up...) and a **combat bot**
  tree (`assets/behaviors/CombatBot.mbt`).
- **Navigation over several floors** (each cell keeps every floor with room above it) and **navigation links** (jump,
  ladder, door) that AIs cross.
- **Building**: walls, floors, ramps, roofs on a grid (build areas with their own grid, materials, health that grows,
  cost), a placement preview, support and **collapse**, edit-mode hooks. **Safe zone**: phases, a shrinking circle,
  damage outside, a Mist Wall that follows, `Zone.info()` for the HUD. **Loot**: tables with weights (`.mloot`),
  chests, spawners.
- **Physics joints** placed in the editor (hinge, ball, slider, fixed, spring; break force) and **vehicles** (the
  physics engine's wheeled vehicle) the player gets in and out of with E.
- **Shooter template** (New Project > Games): a third-person shooter made of all of it with generic content - weapons,
  pickups, chests, two combat bots, a building area and a safe zone; its rules and HUD in `assets/scripts/ShooterGame.lua`.

## New in v0.62 (Rendering)
- **Motion vectors for moving objects and skinned meshes** (`r.MotionVectors`): the depth prepass writes a velocity
  buffer - each draw's matrix a frame ago, each skin's last bone pose (skinned twice on the card), an instanced actor's
  last move, the last wind of trees and grass. TAA reprojects with it and drops the history where a surface was just
  uncovered; motion blur blurs each pixel along its own motion. A runner in front of a still wall: trail pixels 81 -> 23.
- **Occlusion culling** (`r.OcclusionCulling`, `stat culling`): the last frame's depth, reduced on the card to a small
  grid and read back without waiting, is moved to this frame's camera on the CPU (never nearer than the truth: no
  popping when the camera turns fast) and tests the box of every object, instance cluster and tree. Hidden things
  are drawn neither in the prepass nor in the lighting pass (shadows still draw them). 300 rocks behind a wall: 286 -> 2 draws.
- **Upscaling** (`r.Upscaler`, `r.ScreenPercentage` 50-100 %): **Temporal** (TAA gathers the jittered samples of a
  smaller picture into a history of the window's size, like Unreal's TSR) or **AMD FSR 1** (EASU + RCAS, written from
  AMD's published algorithm, MIT). Performance renders at 67 % with FSR 1, Low at 77 %. At 67 %: 12-19 ms instead of 22.
- **Anti-aliasing:** TAA (with motion vectors), FXAA or none; no MSAA - TAA and the upscalers replace it, as in
  Unreal's deferred renderer (Docs/Rendering.md says why).
- **Scene Capture 2D** (Place Actors > Cinematics, + Add on any actor): a camera that draws into a texture at its own
  size and rate - a minimap (orthographic), a mirror, a security camera's screen. A material shows it with the surface
  `capture:<name>`; Lua: `actor:set_capture(on, rate)`, `actor:capture_now()`, `Engine.capture_color(name, u, v)`.
- **Texture streaming and compression** (`r.TextureStreaming`, `r.TextureBudgetMB`, `r.TextureCompression`,
  `stat textures`): file textures are BC1 / BC3 (an eighth / a quarter of the memory), and on the card each holds only
  the mip levels its size on the screen needs, under a video memory budget (512 MB in Performance .. 2560 MB in Epic).
- **Edit > Project Settings > Rendering** keeps a project's defaults for all of them; `MANIAC_MOTION_VECTORS`,
  `MANIAC_OCCLUSION`, `MANIAC_UPSCALER`, `MANIAC_SCREEN_PERCENTAGE`, `MANIAC_TEXTURE_STREAMING`, `MANIAC_TEXTURE_BUDGET_MB`,
  `MANIAC_TEXTURE_COMPRESSION` switch them from a .bat; `ManiacTests` with `MANIAC_RENDER_BENCH=<folder>` measures each
  on a graphics card. Docs/Rendering.md.

## New in v0.61 (World)
- **World Partition, as in Unreal.** *World Settings > World Partition > Enable Streaming* cuts the level into cells
  of a grid (Cell Size, 128 m by default). The level's own file keeps what is always loaded - the landscape, the
  sky, water, characters, scripted actors, volumes - and every other actor is saved in the cell it stands in,
  `<Level>.cells/<x>_<z>.json` beside the level (an instanced mesh or painted foliage is cut into one piece per
  cell). Each actor has **Spatially Loaded** in Details (by its type, always, or spatially loaded). Turning it off
  writes one file again. Package Project takes the cells along and checks what they name.
- **Streaming while playing:** the game reads the level's own file and brings the cells within the **Loading Range**
  (384 m) of the player in - read and parsed on a worker thread, their actors made a few at a time each frame
  (**Actors per Frame**, **Time per Frame**) - and takes them away again once they are **Unload Margin** further
  (hysteresis). Their collision comes and goes with them. Play in the editor streams the level as it is in memory.
- **The editor loads the whole level**, or only a region of a big one (*Editor Opens Whole* off: the cells around
  the camera). **Window > World Partition** shows the cells on a map, coloured by state (loaded, loading, reading, not
  loaded; HLOD proxies), with *Load All* / *Load Region Around Camera*, and a click loads or unloads a cell; a save
  keeps the cells that are not loaded as they are. *Show Cells* (console `wp.ShowCells 1`) draws them over the
  viewport. **`stat streaming`** shows the streamer's numbers over the viewport.
- **HLOD:** *Build > Build HLODs* merges the actors of every cell into one mesh, simplifies it (meshoptimizer, about
  8 % of the triangles) and colours it from their materials; the proxies are saved beside the cells and drawn where a
  cell is not loaded, up to the **HLOD Range**.
- **Data Layers** (*Window > Data Layers*): named sets of actors ("Night", "Event") - shown or hidden in the editor,
  on or off when the game starts, switched while it runs with `Engine.set_data_layer("Night", true)`. The Outliner has
  a Data Layers column and a filter by layer; Details has a box for each layer.
- **Level Instances:** a level placed inside another as one actor (*Place Actors > Landscape > Level Instance*, or
  *Actor > Create Level Instance* from the selection). Its actors are made beside it, turned and moved with it, and
  the level that holds it saves only the reference. **Edit** edits them in place and **Commit** writes them to the
  level (every instance of it changes); **Open Level**, **Break Apart**.
- **Landscape Splines:** a road or a river bed along a spline - *Apply* levels the landscape under it (width, falloff,
  depth), paints a layer and sets a mesh along it (spacing, offset, both sides).
- **PCG Volumes** (procedural content): rules that scatter points on the landscape by density, filter them by slope,
  height, landscape layer, distance to the roads and spacing, randomise their scale and turn, and make an instanced
  mesh of them; the same seed always gives the same content (*Generate*, *Build > Generate PCG Volumes*). With World
  Partition the instances go into their cells.
- **Water Bodies:** a river along a spline (its width, a current from the first point to the last that carries the
  waves), a lake inside a closed spline, an ocean; *Carve Landscape* lowers the bed and blends the shore. Their
  surfaces are the engine's water planes, so `Engine.water_at` (swimming, floating) knows them.
- **Lua:** `Engine.set_data_layer`, `data_layer_active`, `data_layers`, `world_partition`, `cell_loaded`,
  `area_loaded`, `add_streaming_source`, `remove_streaming_source`, `streaming_stats`, `spawn_level_instance`,
  `level_instance_actors`, `pcg_generate`, `water_flow`, `spline_point`, `spline_length`. Console: `wp`, `datalayer`.
- The documentation: **Docs/World.md**.

## New in v0.60 (Maniac Engine for AI)
- **A command line for everything the editor does** (`src/Cli.h`): `ManiacEngine --cmd <command> [arguments] [--json]`,
  57 commands - projects from templates, levels, actors (spawn, move, delete, duplicate), **any value of an actor by its
  path** (`actor.set Lamp pointLight.intensity 50`, `Crate/staticMesh.material.baseColor`, `Hero/script.properties.speed`:
  the level file's own names, through the same serialisation as saving and loading, so every value Details saves; a value
  the engine does not keep is refused and the actor left as it was), components, world settings, assets of every kind
  that can be made (Level, Script, Material, Material Graph, Widget, Maniac Graph, Animation Graph, Particle System,
  Behavior Tree, Data, Prefab), import, rename / move / delete with references fixed, prefabs, scripts and graphs (Lua
  must compile, graphs are compiled), files inside the project, Map Check, **Data Validation** (`validate`), Package,
  the project's C++, the docs and the Lua API. `--help` for each command, JSON answers, exit codes (0 done, 1 failed,
  2 wrong arguments, 3 no project, 4 the check found problems); the log goes to stderr (`--log <file>`, `--quiet`), stdout
  carries only the answers. On Windows `maniac.exe` beside the editor is the same command line for a console window.
- **Batch session**: `ManiacEngine --batch <project>` keeps the project and the level loaded; JSON-RPC 2.0 (or plain
  command lines) on stdin, one answer a line.
- **MCP server**: `ManiacEngine --mcp <project>` - Model Context Protocol 2025-06-18 over stdio; every command is a tool
  with a JSON Schema (`actor_spawn`, `play`, ...), `play` returns its screenshot as an image; resources are the docs
  (`maniac://docs/<page>`), the Lua API (`maniac://api/lua.json`) and the project's levels and assets.
- **Play without a window**: `play --frames N` runs a level as the game (fixed 1/60 s, no input) and answers with its
  errors, warnings, the scripts' output and a screenshot (`Saved/Automation/Play-*`). New Lua: `Engine.check(ok, what)`,
  `Engine.report(key, value)`, `Engine.quit()` (with their graph nodes); `test` runs Data Validation and every level in
  `Content/Tests` and fails when a check failed.
- **Documentation for creators** (`Docs/`, Help menu): Documentation Index, Getting Started (a coin game from nothing,
  in the editor and from the command line), Making Games with an AI Assistant, File Formats, and three pages made from
  the engine itself - **API Reference (Lua)** (from the API table of `src/GraphApi.cpp`), **C++ SDK Reference** (from the
  SDK's headers), **Command Line and MCP** (from the command table). The build writes them to `Docs/`
  (`ManiacEngine --cmd docs.export <folder>`).
- **`AI/`** beside the editor (and in the installer): `SKILL.md`, a skill that teaches an AI assistant to make a game
  with the engine through these tools, and an example `.mcp.json`.
- **Linux distribution**: `tools/package_linux.sh [build] [out] [--test]` makes `ManiacEngine-<version>-Linux.tar.gz`
  (the editor, `maniac`, assets, templates, plugins, docs, AI, SDK; a launcher, a `.desktop` file and
  `install-desktop-entry.sh`); `--test` unpacks it and runs its command line and MCP server without a display.
- **What ships is checked**: `tools/check_shipping.py` (run by the installer and the Linux package) refuses any engine
  source file, any block of the engine's code pasted into a document, and any file of the private game.

## New in v0.59
- **Online like Unreal's: the server decides the movement.** A client sends what its player pressed (numbered inputs,
  5 bytes each, every one in several packets), moves its own pawn at once (prediction) and keeps the moves the server
  has not answered. The server plays the same inputs through the same step (`CharacterMove::step`), never more than
  real time has room for, and answers with where the pawn is and the last input it played; a client that is somewhere
  else goes back there, plays its newer moves again and eases what the player sees. A speed hack, a clock that runs
  fast and a teleport all end where the server says. Physics bodies are simulated by the server and seen by everyone.
- **Replication.** Details > **Replication**: Replicates, Replicate Movement, Net Update Frequency, Net Cull
  Distance, Always Relevant, Only Relevant To Owner, Net Priority, Net Dormancy. Replicated variables with OnRep
  (`self:set_var("health", 80)`, `on_rep_health(value, old)`), RPCs (`rpc_server`, `rpc_client`, `rpc_multicast`,
  each also `_unreliable`) with Unreal's rules enforced by the server, `has_authority`, `is_locally_controlled`,
  `get_owner`, actors spawned and destroyed while playing (`Net.spawn`), delta-compressed snapshots and a bandwidth
  limit with priorities. From Lua and from C++ game modules (`Replication.h`).
- **Dedicated server.** `ManiacEngine MyGame.maniacproject -server -port 7777 -maxplayers 16 -level <file>`: no
  window, no graphics card, no sound device, the log on the console. Every packaged game has `StartServer.bat` /
  `start-server.sh`; **Platforms > Package Dedicated Server** makes a package that is the server. **Play As Client**
  now starts a dedicated server for the level.
- **Network Emulation** in Play: latency, jitter, packet loss, duplicates, out of order, with the presets Average and
  Bad (Editor Preferences > Play - Multiplayer Options, the Play menu, console `net.pktlag`, `net.pktloss`, ...), and
  **`stat net`**: ping, kbps in and out, loss and corrections a second over the picture.
- **Sessions.** An Online Subsystem interface (`Online.h`): create, find, join and destroy a session, with **LAN**
  (found by UDP broadcast) and **Null** (direct IP) working. Friends, achievements, leaderboards and voice are
  interfaces without a service behind them yet. Lua: `Online.create_session`, `find_sessions`, `sessions`,
  `join_session`.
- **New Project > Multiplayer**: a third-person game with a host / find / join menu and a platform the server moves.
- **The store, decided by the server.** In an online game the server keeps every player's wallet (by the name he
  joined with, in `ServerWallets` beside the game's saves) and decides `Store.buy`, `Store.buy_bundle` and
  `Store.equip` with its own catalogue; a client shows the server's copy and gets the answer in
  `Engine.on("store_result", ...)`. A client cannot give itself currency or items; what a player wears is a
  replicated variable of his pawn (`equip_outfit`). Server: `Net.grant`, `Net.give`, `Net.wallet`,
  `Net.store_settings`; C++: `NetStore.h`. The rules (on / off, a new player's starting balance) are the
  project's: **Edit > Store > Online** (`Config/Online.json`).
- **Seamless travel** (`Net.travel(level)`: the server changes level, the clients follow without disconnecting) and
  **replays** (`Net.record(file)`, `Net.play_replay(file)`, pause, speed, seek).
- Everything is in **Docs/Online.md** (Help > Online).

## New in v0.58
- **Package Project for Windows and for Linux, from either one.** Platforms > Package Project (and File > Package
  Project) has a Platform choice. A packaged game is the engine's runtime under the game's name with a `game.json`
  beside it; the other desktop platform's runtime is an **export template** in `Platforms/<Platform>/` beside the
  editor (`ManiacEngine` + `template.json`), installed with the engine, so the Windows editor makes Linux games and the
  Linux editor makes Windows games. A missing template is said plainly and nothing is downloaded. A Linux package is a
  folder and a `<Name>-linux-x86_64.tar.gz` with a launcher (`<Name>.sh`), a `.desktop` file, an icon and
  `README-Linux.txt` (the programs keep their execute bit, also when packaged on Windows); a Windows package gets a
  `.zip`. From the command line: `ManiacEngine --package <project> --platform Windows|Linux [--name <Game>]
  [--out <folder>] [--no-archive]`. A project with C++ modules is packaged on its own platform.
- **2D: sprites, flipbooks, tile maps (as Paper2D).** Sprite sheets (`.msprites`: a picture, the sprites cut out of
  it, pivots, pixels per unit, pixel-art filtering), flipbooks (`.mflipbook`: frames with durations, frames per
  second, loop, events at frames that reach the actor as signals), tile sets (`.mtileset`: a grid of tiles and which
  are solid). Components: Sprite (tint, flip, sorting layer and order, size, lit / unlit), Flipbook, Tile Map (layers,
  per-layer collision, opacity), Collider 2D (box or circle, trigger, layers). Sprites are drawn over the 3D picture
  (hidden by what is in front), sorted by sorting layer (Project Settings > 2D), order and depth, and batched: one draw
  call per run of sprites that share a sheet.
- **2D tools in the editor:** File > Import Sprites (PNG), the **Sprite Editor** (slice by grid, by the islands of
  pixels or by hand; pivots with presets; pack a folder of pictures into one atlas), the **Flipbook Editor** (frames,
  speed, loop, events, a preview), the **Tile Map** painter (a tile set's palette, paint / erase / fill / pick in the
  viewport, layers, solid tiles), Place Actors > 2D (Sprite, Flipbook, Tile Map, 2D Camera, 2D Trigger), sprites picked
  by clicking them, and **Pixel Perfect** for orthographic cameras.
- **2D collision (Physics2D):** boxes, circles and solid tiles in the XY plane; overlaps at a point, in a box or a
  circle, ray casts, moving an actor until it touches something (sliding along it), triggers that tell their actor who
  came in and went out (`overlap2d_begin` / `overlap2d_end`).
- **Lua for 2D:** `Sprites.*` (spawn, pick, pick_world, screen_to_world, world_to_screen, exists, names, stats,
  view_size, sorting_layers), `Physics2D.*` (overlap_point, overlap_box, overlap_circle, raycast, solid_at),
  `Input.pointer()`, and the actor methods `set_sprite`, `set_sprite_tint`, `set_sprite_flip`, `set_sprite_order`,
  `play_flipbook`, `tile`, `set_tile`, `tile_at`, `set_collider2d`, `move2d`, `camera_pixel_perfect` and more:
  `Docs/Sprites.md` (opened from the Sprite Editor).
- **New template: 2D Puzzle** (New Project > Games): a tap-to-blast board for phones and PCs - tap a group of two or
  more blocks of one colour to clear it, the blocks above fall and new ones come in, bigger groups score more, five
  levels with goals and move limits, the best score saved. Its art is drawn by the engine in code when the project is
  made; its game is `assets/scripts/BlastBoard.lua`.
- **Touch and the phone's behaviour, on the PC too:** fingers (`Touch.count / get / by_id / events`) and gestures
  (`Touch.tapped`, `double_tapped`, `long_pressed`, `swiped`, `pinch` with twist, `drag`), measured in picture heights
  so a gesture is the same on every screen. The mouse is a finger in **Play > Standalone Game Mobile** (and wherever
  Project Settings > Mobile > Mouse as Touch is on): click = tap, drag = swipe, hold = long press, **Ctrl + drag = two
  fingers** (pinch, twist). **Project Settings > Mobile:** orientation (the mobile preview opens that way), safe-area
  insets (`Touch.safe_area()`; a preview device with a camera cut-out shows them in red), pause in the background.
  **Pause / resume:** the scripts hear `app_pause` / `app_resume` (`Engine.on`), `App.save_on_pause(slot, fn)` writes
  their progress with SaveGame when the app goes to the background, a game module gets `Touch::App::onChange`; on a PC
  the window losing the focus is the background. `Docs/Platforms.md`.
- **OpenGL ES 3.2 path (groundwork for phones):** `MANIAC_GLES=1` makes the editor, games and tests run on an OpenGL
  ES 3.2 context (Mesa's on a Linux PC): every shader gets `#version 320 es` and its precisions, uniform initialisers
  are set after linking, the few desktop-only calls are done another way, and the renderer takes its **Mobile path**
  (the Low graphics, no costly effects; also used by Standalone Game Mobile). All 44 renderer programs and the sprite
  shader compile on ES, and the picture tests pass there (see `Docs/Platforms.md` for the list of what ES lacks).
- **Android project skeleton - EXPERIMENTAL, UNTESTED:** Platforms > Android Project Skeleton (or
  `ManiacEngine --android-project <project> [--android-package <id>] [--game-activity]`) writes a Gradle / NDK project
  into `<project>/Platforms/Android` (NativeActivity or GameActivity, OpenGL ES 3.2, the project's orientation, the
  native glue for the window, pause / resume and fingers, the game's settings). It does not build an APK yet: the
  engine's Android runtime is not made, and the project was never built (no Android SDK / NDK here; nothing is
  downloaded). The glue's input calls into the engine exist and are tested.
- **Billing and Ads: interfaces with a desktop sandbox, NOT CONNECTED to any store or ad network** (no Google SDK
  code). `Billing.products / buy / owns / restore` and `Ads.ready / show / show_banner / hide_banner / showing`, the
  signals `purchase`, `ad_finished`, `ad_reward`; purchases and rewarded ads put currency and items in the Store
  wallet. The products, the reward and how the sandbox answers are in Project Settings > Mobile; test ads are grey
  "TEST AD (sandbox)" panels. `Docs/Platforms.md`.

## New in v0.57
- **Content Browser, as in Unreal.** It shows the real folders: **Content** (the project's), **Engine** (the engine's
  content, its shapes and its starter materials) and **Plugins** (a folder for every enabled plugin with content),
  with **Favorites** and **Collections** (named lists of assets, saved in `Config/Collections.json`) above and below
  them. A path with back / forward, a search with its own keys (`type:mesh`, `path:Content/Props`, `name:`, `ext:`,
  `size>1mb`, `refs:0`, `uses:`, `usedby:`, `collection:`, `is:unused`, `is:missing`, `|`, `-`), **Filters** by kind,
  three views (tiles with **thumbnails** and a size slider, a list, columns that sort), many assets selected at once,
  the keyboard (arrows, Enter, F2, Delete, Ctrl+D, Ctrl+A, Alt+Left / Right), and a line in the kind's colour under
  every tile. Up to four browsers (Window > Content Browser 2 / 3 / 4) and the Content Drawer are the same widget.
- **Asset Registry** (`src/AssetRegistry.h`): every asset with its kind (Level, Static Mesh, Skeletal Mesh,
  Animation - a model is told apart by what is in the file - Texture, Material, Sound, Prefab, Script, Font, Data,
  Behavior Tree, Light Profile, and by name Widget `.mui`, Animation Graph `.manim`, Maniac Graph `.mgraph`, Material
  Graph `.mmat` / `.mmatinst`, Particle System `.mfx`), its size, date, vertices / picture size / sound length, **what
  it uses and what uses it**. Kept in `Saved/AssetRegistry.json`; the folders are looked at again when the window gets
  the focus back. Other features add kinds with `AssetRegistry::registerAssetType(name, extensions, color, icon,
  open, create)`.
- **Rename and move with the references fixed**: the path is rewritten in every level, prefab, material, data file
  and script that names the file - only the path, not a byte else. A window says first what will happen (the dry
  run); the rewritten files are copied to `Saved/AssetBackups` and the last rename / move can be undone. Whole
  folders too; a `.gltf` takes its `.bin` along. **Duplicate**, **New Folder**, and **Delete** - which says who still
  uses the asset and sends it to the Recycle Bin / the trash, never away for good.
- **Reference Viewer** (right-click, Alt+R): who uses the asset on the left, what it uses on the right, all the way
  if asked; **Size Map (Totals)** for a folder; Copy Reference / Copy File Path; Show in Explorer.
- **Drag and drop**: into a folder (a move, references fixed), onto a collection, into the viewport (a mesh, a prefab
  or a sound is placed; a material, a texture or a script goes on the actor under the mouse), onto the Model, Script,
  Sound and Surface slots of Details. Files dropped on the window from Explorer are imported into the current folder.
- **Add** with every kind of asset by group; Level, Material (`.mmaterial`, with a small material editor), Script,
  Data and Behavior Tree are made now, the others when their editors register. **Import** copies a file in (a model
  with its files).
- Thumbnails of meshes, textures, materials, prefabs and levels, kept in `Saved/Thumbnails` under a name with the
  file's size and date (a changed file gets a new one).
- Console: `assets.find`, `assets.list`, `assets.info`, `assets.refs`, `assets.deps`, `assets.folder`,
  `assets.rename ... [dry]`, `assets.move ... [dry]`, `assets.undo`, `assets.duplicate`, `assets.delete`,
  `assets.new`, `assets.types`, `assets.collections`, `assets.rescan`. Lua: `Assets.find`, `Assets.list`,
  `Assets.info`, `Assets.references`, `Assets.referencers`, `Assets.exists`. Documentation: `Docs/ContentBrowser.md`
  (the browser's gear > Documentation).

## New in v0.56
- **Material Editor with nodes** (Content Browser > Add > Material; double-click a material to open it). A material
  is a graph (`.mmat`) that ends in the **Material** node: Base Color, Metallic, Specular, Roughness, Emissive,
  Opacity, Opacity Mask, Normal, World Position Offset, Ambient Occlusion. Blend modes Opaque, Masked, Translucent,
  Additive; shading models Default Lit, Unlit, Two Sided Foliage; Two Sided. Fifty kinds of node: constants,
  Scalar / Vector / Texture parameters, Texture Sample, Texture Coordinate, Panner, Rotator, Time, the math nodes
  (Add ... Lerp, Clamp, Power, If, Step, Smooth Step, Sine ...), vectors (Dot, Cross, Normalize, Append, Component
  Mask), Fresnel, Desaturation, Blend Normals, Noise, World Position, Vertex Normal, Vertex Color, Object Position,
  Camera Vector, Pixel Depth, Scene Depth, Reroute, Comment. Types follow Unreal's rules (a float fits any vector);
  a node with a problem turns red and says why. The window has the graph, a node search (right-click, or drop a
  link on the background), Details, a **live preview** (sphere, cube, plane, cylinder, your own model), Stats, the
  **Generated GLSL**, Apply and Save. The graph becomes one function inside the engine's own surface shader, with
  programs for the depth and shadow passes only when a mask or an offset needs them; graphs that make the same
  code share their programs.
- **Material Instances** (`.mmatinst`): a parent and other parameter values, no new shader - move a slider and the
  level's meshes change as you drag. **Material Functions** (`.mmatfunc`): a reusable piece of graph with inputs and
  outputs. **Material Parameter Collections** (`.mmatcol`): global values every material reads (wind, wetness).
- **On a mesh:** Details > Material > Material Asset (static meshes), Material Override (skeletal and instanced
  meshes), or drag the asset onto the mesh. **Convert to graph** turns a simple material into a `.mmat`. The
  materials of older levels work as before.
- **Lua:** `actor:set_material(path)`, `actor:set_material_scalar(name, value)`, `actor:set_material_vector(name,
  r, g, b, a)`, `actor:set_material_texture(name, file)`, `actor:material_parameter(name)`;
  `Engine.set_material_collection(collection, name, value...)`, `Engine.material_collection(collection, name)`.
  C++: `MaterialSystem::setScalar / setVector / setTexture / setGlobalScalar / setGlobalVector`.
- **Particle system editor** (Content Browser > Add > FX > Particle System, or From Preset). A system (`.mfx`) has
  emitters, each a stack of modules: Emitter State (loops, delay), Spawn Rate, Spawn Burst; Lifetime, Shape
  Location (point, box, sphere, ring, cone), Add Velocity, Sprite Size, Color, Sprite Rotation; Gravity, Force,
  Drag, Curl Noise, Point Attraction, Collision, Scale Sprite Size and Scale Color (curves over life), Kill Volume;
  Sprite Renderer (picture, flipbook, velocity stretch, sort), Ribbon Renderer (trails), Mesh Renderer (with a
  graph material). An emitter runs on the processor or on the graphics card (Sim Target). The window has the
  emitter columns (add, remove, reorder, switch off modules), a curve editor, a timeline (play, pause, loop,
  scrub), a live preview with bounds, and user parameters. The ten presets can be made into assets.
- **Particles in Lua:** `Engine.spawn("Content/Effects/X.mfx", x, y, z)`, `actor:set_particle_system(path)`,
  `actor:set_particle_param(name, value...)`, `actor:restart_particles()`.
- **Help > Materials** and **Help > Particles**: the creators' guides, in the editor's own windows.

## New in v0.55
- **Maniac Graph: visual scripting, our "Blueprints".** A whole game can be made with nodes, with no Lua or C++
  typed by hand. A **Graph Class** (`.mgraph`) goes on any actor like a Blueprint Class; the **Level Graph** belongs
  to the level (toolbar > **Level Graph**, as Unreal's Level Blueprint); a **Graph Interface** is a list of functions
  several classes promise to have. Content Browser > **Add > Maniac Graph**; Details > + Add > Maniac Graph (nodes).
- **Graph Editor** (Window > Graph Editor): My Graph (graphs, functions, macros, variables, event dispatchers, local
  variables), the node canvas (pan, zoom, box select, copy / paste, comments, reroute nodes, a minimap), Details,
  Compiler Results, Find in graph, and the **Generated Lua** tab. Right-click - or drag a wire off a pin - for the
  **search of all nodes** by category; dragged from a pin it offers what fits that pin and wires the new node.
- **Events:** Begin Play, Tick, Fixed Tick, End Play, Overlap Begin / End, Entered / Left a Trigger, Player Near /
  Away, Interact, Any Damage, Input Action, Key, Signal, and custom events with parameters.
- **Flow:** Branch, Sequence, For Loop (with Break), For Each (arrays and maps), While, Do Once, Do N, Gate, Flip
  Flop, Delay, Retriggerable Delay, Set Timer, Select, Switch on Int / String. **Functions** (with local variables,
  pure functions, recursion), **macros**, **Collapse to Function**.
- **Variables:** Boolean, Integer, Float, String, Vector, Rotator, Color, Actor Reference, arrays and maps. Tick
  *Instance Editable* and each actor has its own value in its Details panel. Maths, vector, text, comparison, boolean,
  array and map nodes; casts and Is Valid; **interfaces**, **event dispatchers**, Apply Damage.
- **Every function of the Lua API is a node**, made from one table of the API (name, category, parameters, defaults,
  tooltip); a test fails when a Lua function has no node. New Lua command: `Engine.script(actor)` - an actor's own
  script or graph as it runs, so scripts and graphs call each other. Scripts and graphs get `on_end_play()` when
  their actor is destroyed and when the game ends.
- **A graph compiles to Lua** - readable and the same every time - and runs in the script runtime: the same game can
  be nodes, Lua or C++. Errors and warnings name their node (an input that must be wired, a type mismatch, a node
  that never runs). Save while playing and the running game takes the new nodes at once.
- **Debugging in Play In Editor:** the nodes that run light up and sparks run down their wires; **breakpoints** (F9)
  stop the game before a node, **Step** (F10), **Resume**; **watch** the last value on any pin.
- **A nodes-only example:** the First Person template's gun is now a graph (`assets/graphs/FirstPersonGun.mgraph`;
  also `Coin` and `JumpPad`). Help > **Maniac Graph Guide** explains it all (`assets/docs/ManiacGraph.md`).
- A reusable node canvas for the editor (`src/NodeCanvas.h`): typed coloured pins, wires, pan / zoom, box select.

## New in v0.54
- **Animation Graph** (Unreal's Animation Blueprint) as an asset, `.manim`: a graph of pose nodes that ends in one
  output pose, driven by **parameters** (float, bool, int, trigger) set from Lua or C++. Nodes: Clip, **Blend Space**,
  **Aim Offset**, Blend, Blend Poses by Int / Bool, Apply Additive, **Layered Blend per Bone** (from a bone down, with
  a blend depth, in local or mesh space), **Slot** (where montages play), **State Machine**, **Save / Use Cached
  Pose**, Mirror, Pose Asset, Composite. State machines have states, transitions with conditions on the parameters,
  a blend time and curve, an **automatic rule** on the remaining time, priorities and transitions from any state.
  Add it to an actor with Details > Add Component > Animation Graph.
- **The engine's locomotion as a graph:** `assets/animation/Locomotion.manim` (idle, walk and run on the ground speed
  with stride-matched playback, a jump loop in the air, a slot for actions) gives the same poses as the built-in
  locomotion, which still works as before for every actor without a graph.
- **Blend Space 1D / 2D** (`.mblend`): samples on one or two axes, Delaunay triangles between them in 2D, one shared
  cycle so feet stay in step, rate matched to the real ground speed, notifies by phase. **Aim Offset**: the same,
  additive, in mesh space.
- **Animation Montage** (`.mmontage`): segments of clips, named **sections** (play on, loop, or jump to another),
  a slot, blend in / out, a play rate, **notifies** (moments and windows) and curves; an upper-body mask from a bone.
  **Animation Composite** (`.mcomposite`), and **curves and notifies for a model's own clips** (`.mclips`).
- **Skeleton asset** (`.mskel`): **sockets** (a named place on a bone, with an offset), **virtual bones**, extra clip
  files. Any actor can be **attached to a socket** of another actor's skeletal mesh (Details > Add Component >
  Attach to Socket), in the editor and in the game.
- **IK Rig** (`.mikrig`): chains (spine, head, arms, legs, fingers) and goals, read from the bone names of Unreal
  mannequin, Mixamo and Blender style skeletons or set by hand. A character's foot IK takes its legs from the rig, so
  it works for skeletons whose bones are not called `LeftUpLeg`.
- **IK Retargeter** (`.mretarget`): animations from one skeleton to another by chains, with a retarget pose (A-pose
  against T-pose), root motion scaled to the target's size and IK that keeps the feet at the source's height. Clips
  are baked to `.mclip` files, by bone names.
- **Mirror Data Table** (`.mmirror`), **Pose Asset** (`.mpose`), and **compression**: key reduction within a
  tolerance and frame stripping (one key in N) for baked clips.
- **Animation Editor** (Window > Animation Editor, or Content Browser > Add > Animation): a node canvas for the graph
  and one for each state machine, parameters with live values, the blend space grid with a preview point to drag, the
  montage timeline (segments, sections, notifies, play head), the bone tree with sockets and virtual bones, the IK
  rig's chains in colours, the retargeter's chain mapping and bake, and a preview of the skeleton that plays - also
  on the actor selected in the level (Show on Selected Actor).
- **Lua:** `actor:anim_set(name, value)`, `anim_get`, `anim_trigger`, `anim_state`, `anim_curve`, `set_anim_graph`,
  `play_montage(file [, rate, section])`, `play_animation(clip)`, `stop_montage`, `montage_jump(section)`,
  `montage_set_next(section, next)`, `montage_playing`, `attach_to_socket(parent, socket [, offset, rotation])`,
  `detach`, `socket_transform(socket)`; notifies arrive as `on_anim_notify(self, name, kind, source)` and as the
  actor's signal `"anim_notify"`.
- The node canvas of the Animation Editor is a part of its own (`src/NodeCanvas.h`), ready for other graph editors.
- The whole of it is described under **Animation (for creators)** below (Help > Documentation).

## New in v0.53
- **UI Editor** (Tools > UI Editor; Content Browser > **Add > User Interface > Widget**; a double-click on a widget in
  the Content Browser's new *User Interface* folder): menus, HUDs and whole screens of a game without C++, as UMG /
  Widget Blueprints in Unreal. A screen is a **widget file** (`.mui`, JSON). The window has a **Palette** (drag or
  double-click), a **Hierarchy** (drag to reparent and reorder; rename, duplicate, copy / cut / paste, delete, Wrap
  With), a **Designer** with zoom and pan, selection handles to move and resize, the anchors drawn on the parent, the
  **16 anchor presets**, preview sizes (1920 x 1080, 2560 x 1080, 1280 x 720, phone 1080 x 1920, tablet, 4K, custom),
  **Details** for every property, an **Animations** panel with a timeline, its own undo / redo, Save / Save As, and
  **Play preview**, which runs the widget in the Designer with the mouse, the keyboard and a gamepad.
- **Panels:** Canvas Panel (anchors, offsets, alignment, size to content, z-order), Horizontal / Vertical Box (auto or
  fill with a weight, spacing), Grid Panel (rows / columns with spans, or cells filled in order), Overlay, Scroll Box,
  Size Box, Border, Spacer. **Widgets:** Text, Image (tint, **9-slice**), Button (normal / hovered / pressed /
  disabled), Progress Bar, Slider, Check Box, Text Input, List View. Each has visibility, opacity, a render transform
  (translation, scale, angle, pivot), padding and alignment in its slot; fonts and sizes; **themes** (`.muitheme`:
  the look of each type and named styles).
- **Every screen size:** design units scaled by the screen's shortest side with UMG's DPI curve (0.666 at 720p, 1 at
  1080p, 2 at 4K), so one layout fits 16:9, ultrawide and a phone held upright; other rules and the curve are settings
  of the file.
- **UI animations:** tracks on opacity, translation, scale, angle, colours, value, canvas position and size, with keys
  and easing (linear, step, ease, cubic, back, bounce, elastic); play, loop, reverse, ping-pong, an event at the end.
- **Lua:** `UI.create` / `UI.show` a widget file, `tree:find("Name")`, `set_text`, `set_percent`, `set_image`,
  `set_visible`, `on_clicked`, `on_value_changed`, `on_hovered`, `tree:play("Intro")`, widgets added from the script
  (`add_child`) and any property by name (`w:set("fontSize", 30)`). Widget trees are drawn in Play In Editor and in
  packaged games by the engine's own renderer (no ImGui), with hover, focus and **keyboard / gamepad navigation**.
- **User Interface template** (New Project > Games): a main menu and a HUD made only in the UI Editor and one Lua
  script (`assets/ui/MainMenu.mui`, `assets/ui/HUD.mui`, `assets/scripts/GameUI.lua`).
- **Package Project** takes widget files and checks the pictures, fonts and themes they name.
- **Help > User Interface Guide:** the page for creators (panels, anchors, widgets, themes, animations, the Lua
  commands), in a window of the editor.

## New in v0.52
- **Plugins, as in Unreal.** A plugin is a folder with a `<Name>.maniacplugin` descriptor (JSON, modelled on
  `.uplugin`: FriendlyName, Description, Category, Version, VersionName, CreatedBy, DocsURL, EngineVersion,
  EnabledByDefault, IsBetaVersion, IsExperimentalVersion, CanContainContent, Modules, Plugins) and, as it needs them,
  `Content/` (assets, levels, prefabs, actor scripts), `Scripts/` (Lua run when a game starts), `Scripts/Editor/` (Lua
  run when the editor opens the project), `Resources/Icon.png` and `Source/` (C++ modules). Built-in plugins are in
  the engine's `Plugins` folder, a project's own in `<project>/Plugins`.
- **Edit > Plugins** (also from Project Settings): the groups with their counts on the left (All, Enabled, Built-In by
  category, Project, Installed), a search, and a card for every plugin with its picture, name, version, Beta /
  Experimental label, description, author and documentation (a plugin's Markdown opens inside the editor). The
  **Enabled** checkbox writes the project's file (`"Plugins": [{ "Name": ..., "Enabled": true }]`, as `.uproject`
  does); turning a plugin on turns on what it needs, turning one off turns off the plugins that need it. A banner says
  a reload is needed, and **Reload Now** mounts the new set without restarting.
- **Add** opens New Plugin with five templates: Blank, Content Only, Lua Gameplay, Editor Tool (Lua), C++ Module. The
  plugin is made in the project's `Plugins` folder with its descriptor, a README and a picture, and is on at once.
  **Edit...** changes a project plugin's descriptor.
- **Content is mounted by the plugin's name:** a level, a prefab or a script names a plugin's file as
  `Plugins/<Name>/Content/...` wherever the plugin's folder is. The plugins' prefabs are in Edit > Prefabs and their
  scripts in the list of scripts. A built-in plugin that is off resolves nothing, and no plugin that is off is packaged.
- **Plugins are checked:** one made for a newer engine, one that needs a plugin that is not installed, and plugins
  that need each other in a ring are not turned on, and the card says why. Enabled plugins load in the order of what
  they need.
- **Lua:** `Plugins.is_enabled("Name")`, `Plugins.list()`, `Plugins.info("Name")`, `Plugins.path("Name", "Prefabs/X.mprefab")`
  in every game script; `require("Plugins/<Name>/Scripts/lib/x")` for a plugin's modules. Editor scripts get
  `Editor.add_tool`, `Editor.exec` (a console line), `Editor.files / read / write`, `Editor.notify`: their tools are in
  **Tools > Plugin Tools**.
- **Console:** `plugins`, `plugin.info <Name>`, `plugin.enable <Name>`, `plugin.disable <Name>`, `plugins.reload`,
  `plugin.tool [id]`.
- **Package Project takes the enabled plugins** (descriptor, Content, Scripts, Resources, licence; not Source, not the
  editor's tools) to `Plugins/<Name>` beside the game, and leaves out the ones that are off; the package check lists
  what a level still names from a plugin that is off.
- **Three built-in plugins:** **Starter Props** (on by default: prefabs made of the engine's own content - a campfire,
  a crate with physics, a street lamp, the fox), **Health Pickups** (the player's health in Lua: a bar, pickups that
  heal, damage zones, the signals `health_changed` and `player_died`) and **Debug Overlay** (Beta: F3 while playing
  shows position, camera, frame rate and time of day; two editor tools).
- **Documentation for plugin makers:** `Docs/Plugins.md`, opened from Edit > Plugins > Documentation in the editor's
  own document window.
- **A safe first start on every graphics card** (the first run of a new exe on a Radeon could draw black pictures and
  then crash inside the driver, while its shaders were being compiled for the first time). Every shader program is
  now made in one place, and three things happen there: the driver is asked to compile on the calling thread
  (`GL_KHR/ARB_parallel_shader_compile`), the linked programs are kept in **the engine's own shader cache**
  (`%LOCALAPPDATA%\Maniac Engine\ShaderCache`, on Linux `~/.cache/Maniac Engine/ShaderCache`; a new driver or
  card makes new files, a damaged file is thrown away and compiled again, the folder stays under 64 MB), and on a
  cold start the programs are built one at a time and each one draws once before the first real frame. The log says
  what happened: `Shaders (the renderer): COLD start - 44 programs: 0 from the cache, 44 compiled ...`. Later starts
  load the programs from the cache. **Edit > Editor Preferences > Shader Cache > Clear Shader Cache** and the
  console command `shadercache` / `shadercache clear` empty it. Switches for testing a card:
  `MANIAC_GL_COMPILER_THREADS=<n>|default`, `MANIAC_SHADER_CACHE=0`, `MANIAC_SHADER_CACHE_DIR=<folder>`,
  `MANIAC_SHADER_CACHE_MAX_MB=<n>`, `MANIAC_GL_SERIAL=0`, `MANIAC_GL_WARMUP=0|1|2`.
- **Crash reports in the editor and in every game.** When the editor or a game crashes it writes a report
  (`Crash-<date>-<time>-<program>.txt`: what happened, where - module and offset - the calls that led there, and what
  it was doing: loading a level, Play, packaging, importing, compiling a shader program) to the user's `Logs` folder
  (`%APPDATA%\Maniac Engine\Logs`) for the editor and to the project's `Saved/Logs` for a game. The newest ten are
  kept. The next time the editor starts after a session that did not close as it should, the window **The previous
  session closed unexpectedly** shows the report, with **Copy**, **Open Logs Folder**, **Report a Bug** and
  **Dismiss**; a game says it in its log. **Help > Report a Bug** is now a window of the editor that offers the last
  crash report with the email.
- **Names for a crash report's offsets** (for the people who build the engine): every build keeps `<program>.sym` and
  `<program>.map` beside each program (the programs themselves stay stripped, and these files are never shipped), and
  `python3 tools/symbolize.py Crash.txt --symbols <build folder>` turns `ManiacEngine.exe+0x14d550` into the
  function's name and its source file's object. `ManiacTests --crash <folder>` crashes on purpose to try it.
- **Games in C++ with the installed engine (C++ game modules).** A project's own C++ lives in its `Source/` folder as
  one or more **modules** (the descriptor's `Modules` list, as in an Unreal project). A module is compiled into a
  library - `Binaries/Win64/<Module>.dll`, `Binaries/Linux/lib<Module>.so` - which the editor **loads when you press
  Play**, and loads again when it was compiled since ("the next Play runs the new code"). The game's own window
  (Standalone Game) and a packaged game load it too. No source of the engine is needed.
- **`GameModule`** (`GameModule.h`): `begin`, `tick`, `ui`, `end` with an `EngineContext` (the running `GameWorld`, the
  `Scene`, the project's folder); `MANIAC_GAME_MODULE(MyGame)` makes the class the module's. **`ActorComponent`**:
  a C++ class for actors (`beginPlay`, `tick`, `endPlay`); `MANIAC_ACTOR_COMPONENT(Door)` in its `.cpp`, and every
  actor with the tag `Door` gets one while the game runs. The module uses the engine that is running: one Log, one
  Audio, one ImGui, one set of assets - nothing is copied into the module.
- **The SDK** (`SDK/` in the engine's folder, installed by Setup): `SDK/include` (the engine's headers and the
  third-party headers they use), `SDK/lib` (the engine as prebuilt static libraries, and what the editor's program
  offers to modules), `SDK/cmake/ManiacEngineConfig.cmake` (`find_package(ManiacEngine)`: `maniac_game_module()`,
  the `maniac_engine` library and `maniac_program()` for a program of its own). The SDK says which compiler its
  libraries need; no `.cpp` of the engine is in it (the build and the installer both check).
- **Tools > New C++ Class...** (Actor Component, Empty Class, Game Module: the files from templates, in the module you
  choose; a project with no C++ yet gets its first module), **Tools > Compile** (Ctrl+Alt+F11: CMake and the compiler
  found on the PATH or in *Edit > Editor Preferences > C++ > Toolchain Folder*; the compiler's lines in the Output Log),
  **Tools > Refresh C++ Project** (writes `Source/CMakeLists.txt` from the Modules list - Unreal's Generate Project
  Files), **Tools > C++ Project** (the modules and their files, the tools found, the errors of the last compile - a
  click shows the line - and its output), **Tools > Show Source Folder**. The bottom bar shows *Compile*, *compiling*,
  the number of errors, or *compiled*.
- **New Project > Project Defaults > Code:** *Lua only* or *C++* (the new project gets a game module called after it).
- **Lua:** `Engine.has_module("MyGame")`, `Engine.call_module("MyGame", "add_score", 10)` (the module's `message()`).
  Console: `compile`, `modules`.
- **Command line:** `ManiacEngine <project> --compile [--out log.txt]` (Refresh and Compile, then out),
  `ManiacEngine --module-check <library> [--out report.txt]` (loads a module as Play does, runs a few frames, unloads
  it), `--create-project <template> <folder> <name> --cpp`.
- **Package Project** compiles the project's modules for the packaged game's own program and puts them beside it.
- See **Programming in C++** below for how it all works and which compiler to use.

## New in v0.51
- **A menu bar like Unreal's:** File, Edit, Window, Tools, Build, Select, Actor, Platforms, Help, and **Credits** as
  the last item. Each menu has a search box at its top (while you search, its submenus open flat), sections with
  titles, and a line icon and the keyboard shortcut for every item. Every item is a command with an id
  (`File.SaveAll`, `Actor.SnapToFloor`): its menu item and its shortcut run the same command.
- **File:** New Level (Ctrl+N), Open Level (Ctrl+O), **Open Asset** (Ctrl+P: type a few letters and press Enter - a
  level opens, a mesh is placed in front of the camera, a sound plays, a material goes on the selection), **Favorite
  Levels**, Recent Levels, Save Current Level (Ctrl+S), Save Current Level As (Ctrl+Alt+S), Save All (Ctrl+Shift+S),
  **Choose Files to Save** (the level, the input map, the store, the open script: tick what to save), Import glTF /
  GLB, Import Godot Project, **Export All** (a copy of the level as a level file of its own, beside the project's other levels), **Export
  Selected** (the selected actors as a prefab in `Prefabs/`), New Project, Open Project, Zip Project, Show Project in
  Explorer, Recent Projects, Exit.
- **Edit:** Undo (Ctrl+Z), Redo (Ctrl+Y), **Undo History** (every edit by its name, "Move Cube", "Duplicate
  Player_Mannequin": a click goes back or forward to that edit), **Cut / Copy / Paste** actors (Ctrl+X / C / V: as
  text on the clipboard, so they paste into another level or another project, with new ids and names, a little aside),
  Duplicate (Ctrl+D), Delete, Rename (F2), Editor Preferences, Project Settings, Keyboard Shortcuts, Input Map, Store,
  Prefabs.
- **Edit > Keyboard Shortcuts:** any command can get another key. Click its shortcut and press the keys (Escape leaves
  it as it was); Clear, Reset, Reset All. A key that another command had is taken from it, and the window says which.
  Your keys are kept in your settings, in every project.
- **Edit > Editor Preferences:** camera speed, mouse sensitivity, invert mouse Y, **remember the camera** (each level
  opens where you left its camera; a level seen for the first time opens with a view of its Player Start), load last
  project on startup, sound while editing, viewport statistics, Reset to Defaults.
- **Window:** the panels; **Light Mixer** (every light of the level in one table - color, intensity, attenuation
  radius, cast shadows, night only - the sun first; a click on a name selects the light); **Env. Light Mixer** (sun,
  sky light, sky atmosphere, volumetric clouds, height fog and exposure in one window); **Color Grading** (white
  balance, saturation, contrast, gamma, gain, scene tint, shadows and highlights gain on color wheels, exposure,
  vignette, reset); **Console Variables** (every variable with its value, range and help, to change there; the
  commands); **Statistics** (actors by kind; primitives, with the triangles of each mesh, sortable; rendering: draw
  calls, triangles, objects, LODs); Undo History; **Load Layout** and **Save Layout As** (named layouts of the panels,
  kept for you) and Reset Layout; Enable Fullscreen (Shift+F11); Game View (F11).
- **Tools:** **Tags Manager** (every tag of the level and how many actors have it: select them, add a tag to the
  selection, remove it, rename it everywhere), Script Editor, Map Check, Move Instances Out Of Other Objects, Put
  Floating Instances On The Ground, Statistics, Console Variables. **Build:** Build Level (the open level's reflection
  captures taken again and Map Check; the lighting is real time, so there is no lighting to build), Build Reflection
  Captures, Map Check.
- **Select:** Select All (Ctrl+A), Select None (Escape), Invert Selection (Ctrl+I), Select All of Same Type
  (Ctrl+Shift+A), and by type - lights, static meshes, skeletal meshes, instanced meshes, characters and pawns,
  cameras, particle systems, sounds, decals, scripted actors - or by tag.
- **Actor:** **Snap to Floor** (End: each selected actor goes down onto what is under it, on its own bottom), Reset
  Location / Rotation / Scale, Focus Selected (F), **Hide Selected** (H: not drawn while editing, still there when you
  play), Show All Hidden (Ctrl+H), Duplicate, Delete, Rename, Create Prefab from Selection.
- **Platforms:** Package Project, Packaging Settings, Supported Platforms: Windows, with Linux, Android, Web, macOS
  and iOS shown as coming with 0.58. **Help:** Documentation (F1), Viewport Controls, Console Variables, **Report a
  Bug** (an email to support@maniaclab.app with the engine's version and your graphics card in it), License Agreement,
  Send Release Notice, Credits, About.
- **Documents in the editor's own windows, never Notepad or a browser.** **Help > Documentation** shows this manual
  with its contents beside it and a search (Enter: the next place it is found, Shift+Enter: the one before);
  **Credits** shows the licences of everything the engine is made with, the same way. The Project Browser's
  Documentation and Credits open the same windows; the License Agreement no longer has "Open as Text File". The
  engine's `Markdown` and `DocView` do this, and a game can use them too.
- **The bottom bar like Unreal's:** **Content Drawer** (Ctrl+Space: the content over the bottom of the window), Output
  Log, **Cmd** (the console: Enter runs, Up / Down bring back the lines before, Tab completes, and the names that fit
  are shown above it while you type) and **All Saved** or **N Unsaved** (a click opens Choose Files to Save).
- **Console variables:** `r.Shadows`, `r.AmbientOcclusion`, `r.Bloom`, `r.AntiAliasing`, `r.Brightness`, `r.Effects`,
  `r.GlobalIllumination`, `r.ViewDistance`, `r.Sharpening`, `r.TextureQuality`, `r.Outlines`, `r.MotionBlur`,
  `r.ViewMode`, `editor.CameraSpeed`, `editor.MouseSensitivity`, `editor.Grid`, `editor.Stats`,
  `editor.RealtimeAudio`. A name says its value, a name and a value sets it (`r.Shadows 2`), `help <name>` says what
  it does; a value out of a variable's range is refused, and the console says what it takes. Commands: `help`,
  `stat fps` / `unit` / `none`, `quality <preset>`, `play`, `simulate`, `stop`, `open <level>`, `save`,
  `select <name>`, `lua <code>` (a line of Lua in the running game), `clear`.
- **Play like Unreal's** (the Play button, Alt+P, and the options beside it). **Modes:** Selected Viewport; **New
  Editor Window (PIE)**, the game in a window of its own inside the editor, at the size you choose; Standalone Game;
  **Standalone Game Mobile**, a phone-shaped game window with a phone's Low graphics (the phone, portrait or
  landscape: Advanced Settings); VR Preview (disabled: it needs a headset and OpenXR); **Simulate**. **Spawn Player
  At:** Default Player Start or Current Camera Location. **Multiplayer Options:** Number of Players (1 to 4) and
  **Play Offline**, **Play As Listen Server** (the editor is the server; the other players join it, each in a game
  window of its own on this PC) or **Play As Client** (a game window is the server and plays too - a server without a
  window comes with Online in 0.59 - and the editor and the others join it). **Advanced Settings:** window size,
  phone, server port, Game Gets Mouse Control.
- **Simulate (Alt+S):** the level runs - physics, scripts, AI, animation - while the editor's camera stays free, with
  no game HUD, as in Unreal. **F8** while playing: **Eject** (the editor's camera takes over where the game's was:
  select and move actors while the game runs, and their collision moves with them) or **Possess** (back to the
  player).
- **Game windows** (`ManiacEngine <project> -game`) take `-host <port>`, `-connect <address:port>`, `-name <player>`,
  `--title <text>`, `--window-pos x,y` and `-mobile` (a phone's Low graphics). A client keeps trying to reach a server
  that is still starting, for 30 seconds.
- **Maniac Engine Setup** lets you choose where Maniac Engine goes: **Anyone who uses this computer**
  (`C:\Program Files\Maniac Engine`, as administrator: the default, as Unreal does) or **Only for me**
  (`%LOCALAPPDATA%\Programs\Maniac Engine`). The engine's source is no longer installed: Maniac Engine is closed
  source, and making games in C++ comes with 0.52, with the engine's headers and ready-built libraries. The README it
  installs is the manual, without the sections about building the engine.
- **Fixes** (found by a review of 0.50.1; each has its test):
  - Saves: two games whose titles are not in Latin letters (in Greek, say) shared one save folder and could overwrite
    each other's saves. The folder now keeps them apart (with a mark of the whole title); a title in Latin letters
    keeps its folder, and saves from the shared folder are copied over once. After a save was recovered from its
    backup, the next save put the broken file in the good backup's place: a broken save is never kept as the backup.
  - Lua saves turned the number keys of a sparse table into text (an inventory with only `slots[5]` came back as
    `slots["5"]`): number keys stay numbers, and text keys that look like numbers stay text.
  - A camera looking straight down (or up) gave an invalid picture (NaN in its view): its view uses the picture's own
    up. The editor's Left and Right views were swapped.
  - In a paused game the clouds, the water and the leaves kept moving: the world's own motion stops with the game.
  - An actor with instanced meshes (walls, trees) removed by a script left their collision behind, an invisible wall;
    a removed character's capsule and ragdoll go with it too.
  - Cinematics: removing the one that was playing left the player without controls until the level changed (it ends
    first now); the Jump that skips a cinematic also made the player jump; the player could use doors and chests (E)
    while one played.
  - A lid or door opened on its hinge moved away from its box when the box was scaled differently on each axis.
  - Content Browser: the name and the kind under each picture are both readable.

## New in v0.50.1
- **Maniac Engine Setup.** The engine installs like any program: `Maniac Engine Setup.exe` puts the editor, its
  content, the templates, the licences and **the engine's source** in `%LOCALAPPDATA%\Programs\Maniac Engine` (for the
  user, no administrator), adds Maniac Engine to the Start menu and the desktop, makes `.maniacproject` files open
  with it, and appears in Settings > Apps to be removed. Projects are never touched by installing or removing it.
  Silent: `/S` (and `/D=<folder>`). Made by `tools/installer/make_installer.py` (NSIS 3).
- **The Maniac Engine License Agreement** (`EULA.txt`). The editor shows it at its first start, and again only when
  the agreement changes; it is accepted with its check box and Accept (Decline closes the editor). The Setup shows it
  too. In short: free to use; a royalty of 2% of a product's gross revenue above US$1,000,000 over its whole life,
  reported each quarter; a Release Notice to Maniac Lab when a product comes out. Help > License Agreement shows it
  again, with the day it was accepted. Help > Send Release Notice, and the button after Package Project, write that
  email to support@maniaclab.app in your mail program, ready to send.
- **A redesigned Project Browser.** Its own type (Inter), line icons the engine draws itself (`src/Icons.h`: sharp at
  any size, no picture files), cards and tiles. **Home**: Recent Projects in a box, See All Projects, Open Other, the
  templates, What's New. **What's New**: these release notes, by version. **Getting Started**: guides to a first game,
  the editor's mouse and keys, scripting with Lua and packaging. **Sample Projects**: the Showcase. **My Projects**:
  search, order (last opened, name), tiles or a list, Remove from List, Show in Explorer, Always load last project on
  startup. New pictures for the templates, each as the player sees it when the game starts.
- **Fixes** (found by a review of the source; each has its test):
  - Behaviour trees: a parallel ran again the children that had already succeeded (an action beside a wait ran on
    every tick of the wait: three rewards); a wrong kind of value (`"seconds": "2"`) passed the check and threw in the
    middle of a game - it is refused when the tree is read, by the field's name; text compared with a number counted
    as 0 (`"patrol"` equalled 0); a tree that failed to load stayed missing after its file was made or fixed (it is
    read again when the file changes).
  - Render Movie: the frames had no depth of field from the cine camera (Play had it); the clouds, water and particles
    moved by the real clock while the camera followed the movie's (every frame is now one step of the movie); the
    editor's grid and the selection outline could be in the frames.
  - Animation: a bone that only the run moved kept the run's pose in the walk (each clip is sampled over the rest pose).
  - glTF: a mesh without a material took the file's first (a red roof made the walls red) - it gets a plain one of its
    own; a mesh without a second UV set turned that set off for every mesh sharing its material (only that mesh reads
    its first set now); CUBICSPLINE animations played as straight lines between their keys - they are Hermite curves
    with the file's tangents (positions, rotations, scales, morph weights).
  - Store: two sets with nearly one name ("Dark Set", "dark_set") had one bundle id, and buying one gave the other's
    items; a bundle could cost more than its items (the round step was a minimum); a save that failed (a full disk)
    said it was saved; a catalogue with a wrong value emptied the one in use. Files are written whole or not at all
    (`src/Files.h`; the project file too).
  - Pictures: in an automated run, a screenshot left the PNG writer turned over, and every picture written after it
    (the Render Movie frames, a project's picture) came out upside down. PNG files are written by one function that
    sets the row order for each file (`Image::writePng`); the automation checks that the movie's first frame has the
    sky at the top.
  - Opening a project from the Project Browser on a Radeon: the browser's pictures were freed just before the renderer
    made its own textures, and the level's sky and ground came out white squares and black. They stay until the
    editor closes.
- Tests: 445 checks.

## New in v0.50
- **Projects, like Unreal.** The engine is one install (the editor, its content, its templates) and every game is a
  **project of its own**: a folder anywhere with its **`<Name>.maniacproject`** (Unreal's `.uproject`: name,
  description, template, startup levels, game program, target platforms, settings - JSON) beside its `Content/`
  (levels, models, scripts, prefabs, textures), `Config/` (input map, store) and `Saved/` (logs, autosaves, the
  editor's layout). Nothing of one game lives in the engine; a level's paths are relative to its project, and a file the
  project does not have comes from the engine's own content (the mannequin, fonts, sounds, example scripts), so a
  project made from a template works with nothing copied into it (`Project::findFile`). `src/Project.h`.
- **Project Browser** (Unreal's, at start-up): **Recent Projects** with their pictures (what the editor showed of
  each when it was last closed or saved, `Saved/AutoScreenshot.png`), **My Projects** (every project the editor knows
  of: opened lately or in the projects folder; open, show in Explorer, remove from the list), **New Project**,
  **Sample Projects**, the documentation, and **Load on Startup**: the browser, or the last project straight away.
  `ManiacEngine.exe <project>.maniacproject` opens a project directly, and on Windows a double-click on a
  `.maniacproject` does (the editor registers the file type for the user, never over another program's).
- **New Project with templates** (Games): **Blank** (a floor, the sky, a Player Start; Play flies a free camera, Unreal's
  Default Pawn), **First Person** (the camera is the player's eyes, his body is drawn only in the shadows; the left
  mouse button shoots balls that knock the crates over - `assets/scripts/FirstPersonGun.lua`), **Third Person** (a
  spring arm behind the mannequin, an arena with blocks, stairs, a ramp and crates) and **Top Down** (the camera above;
  **click on the ground and the character walks there** round the walls along the navigation mesh, hold the button to
  lead him with the cursor), and the **Showcase** sample (the engine's demo level, as a project of your own). Project
  Defaults: Target Platform, Quality Preset (Scalable starts the game at Medium). Project Location and Project Name,
  then Create: the project opens. From the command line: `--create-project <template> <folder> <name>`.
- **The player's camera as a setting of the character** (Details > Camera: Third Person, First Person, Top Down; field
  of view, arm length, eye height, top-down distance, pitch, yaw, click to move) - `CharacterComponent::View`. A level
  with no character plays a **free camera** from its **Player Start** (Place Actors > Basic > Player Start), else from
  where the editor looked.
- **File menu like Unreal's**: New Level... (Ctrl+N: Empty Level, Basic, Open World), Open Level... (Ctrl+O, Windows'
  own dialog), Recent Levels, Save Current Level (Ctrl+S), Save Current Level As... (Ctrl+Alt+S), Save All
  (Ctrl+Shift+S: the level, the input map, the store, the open script, the project), Import, **New Project...**, **Open
  Project...** and **Recent Projects** (the editor starts again with it, after asking to save the level), **Zip
  Project** (the project in a .zip without Saved and Packaged), **Open Current Project Directory**, Package Project,
  Exit.
- **Edit > Project Settings**: Description, **Maps & Modes** (Editor Startup Map, Game Default Map), Packaging (the
  project's own game program), Supported Platforms, Input. An older project (a folder without a descriptor) gets its
  `.maniacproject` with one button.
- **Play > Standalone Game** (the ⋮ beside Play): the level as it is now, saved or not, in a game window of its own
  (`ManiacEngine <project> -game <level>`), or the project's own game program when it has one.
- **Package Project** packages the open project: its Content and Config, the engine's content it uses and the
  licences; the game starts in the Game Default Map.
- Lua: `Engine.view()` (where the game is seen from and the way it looks), `Engine.spawn(kind, x, y, z, {scale, color,
  physics, mass, collision})`.

## New in v0.49
- **Build > Map Check** (Unreal's Map Check): finds the scenery that floats in a level - a building or a prop with
  nothing under it (a level brought in from another engine whose ground changed on the way, a house left where a
  heightfield could not keep the cliff it stood on, a prop dragged off a ledge). It looks at **whole buildings**, not
  piece by piece: an instance that reaches the ground (a landscape outside its holes, or a water surface) is held, and
  so is whatever touches a held solid instance (collision Mesh): floors on their walls, a lamp under a ceiling, the
  furniture of a room; a detail with no collision held that way holds the details on it (a rail on a balcony). Grass,
  bushes and trees hold no solid thing up: a house resting on a bush still floats. What is left, grouped by what
  touches what, is one row per building or prop, with how high it hangs and where.
  - **Go to** moves the viewport to it; **Put on the ground** moves the whole group down by the same amount (it keeps
    its shape), as deep into the ground as **the other instances of the same meshes stand in that level** (a house
    kit's foundation block is buried 4 m, a crate stands on top); **And level the ground** also levels the landscape
    under it to that height, blending into the ground around over 4 m (`Landscape::flattenArea`). **Put all on the
    ground** does every row (the ground levelled under the buildings, not under a fence or a sign). Ctrl+Z takes it
    back.
  - Details > Instanced Static Mesh > **Floats**: placed in the air on purpose (a cable, a sign on a wire, birds) -
    Map Check leaves it alone. Saved with the level.
  - **From the command line**, like Unreal's commandlets, for a build script: `ManiacEngine --map-check <level>`
    prints what floats (the exit code is how many groups: 0 = clean); `--fix` puts them on the ground and saves the
    level (`--out <file>` to save elsewhere).
  - In code: `LevelCheck::floatingGroups(scene)`, `LevelCheck::dropToGround(scene, group, flatten)`,
    `LevelCheck::groundAt(scene, x, z)`, `LevelCheck::isBuilding(group)` (`src/LevelCheck.h`).
- **Levels are saved compact and readable**: one key a line (a change to an actor is a few lines in a diff), arrays of
  numbers on one line, and every number as short as it is exact - `0.598`, not `0.5979999899864197`. A big island
  saved by the editor was 20.8 MB in 552 000 lines; now it is 11.4 MB, and it reads back bit for bit the same
  (`Scene::levelText`).

## New in v0.48
- **GPU particles** (Niagara's GPU sprites): any particle layer can live on the graphics card - tens of thousands an
  effect for the cost of a few hundred on the processor (Details > Particle System > **GPU Simulation**, or
  `ParticleLayer::gpu`). Position and velocity are textures the card moves itself every frame: gravity, drag,
  turbulence, bursts (`Particles::burst`), stretched sparks. **Collide With Scene**: they bounce off what the camera
  sees (the depth buffer: walls, roofs, cars), lose speed along it, come to rest - and on a **landscape everywhere**,
  also out of the picture (its heights on the card), through its holes too. Far away a spark or a flake is never
  smaller than a pixel and a half: it gets fainter instead of flickering out. New presets: *Sparks Shower*,
  *Snowstorm* (weather: keep the actor at the camera, the snow settles and melts), *Fireflies*. Lua
  `actor:particles_on_gpu(on, collide)`. `ParticleLayer::offset` places the spawn box from the actor (the Rain and
  the Snowstorm 9 - 10 m above the camera). `Renderer::gpuParticleRead` reads them back for tests and tools.
- **Day and night without steps** (the stylised day):
  - the light moves **every frame** (it was 4 times a second: with a low sun a house's shadow stepped metres);
  - **dusk and dawn in three stages**: the sun's light goes out (8 to 2 degrees), the one directional light moves to
    the moon while it is out, the moon's light comes up (the old switch at 17:53 moved every shadow and turned the
    walls blue at once). The **sky** is lit by the sun on its whole arc and by the moon apart from that light, so it
    never goes dark between them; the stars, the sun's and the moon's discs, the fog's daylight and the light
    shafts follow without a jump;
  - `Engine.is_night()` and the sky say night at midnight (the moon's height said "day");
  - **the editor's light values stay**: Sun Intensity and Colour, Sky Light, fog, exposure are the level's own (noon)
    values while the stylised day runs - the hour is laid over them (an edit used to jump back the next frame);
  - the sky's capture (reflections, sky light) is redone 4 times a second at most while the day goes by and
    **blended** in, so the ambient light never steps either.
- **Clouds that do not boil**: each frame's march through the cloud layer is blended into the last frames' at the same
  cloud (their own history, reprojected): a still sky is still. 4 times less flicker measured.
- **Renderer fixes**: the ground bounce colour eases by time, not by frames (it was 4 times faster at 120 FPS than at
  30); reflection captures notice every glow colour (only red was) and instanced meshes (a moved row of houses kept
  its old reflection), and a scene that keeps changing is captured once it holds still; a new level starts with
  nothing of the last one's light (GI probes, screen-space GI, captures - only the TAA was reset).
- **Sequencer fixes**: a cine camera is always a perspective lens (a cut from an orthographic game camera stayed
  orthographic); **Key** keys the scale at 1 too (the first key was left out and the actor began big) and a new
  light's intensity from its first key; events that fall in one frame run in the order of their times, across
  tracks; a **camera cut** (A to B, into and out of a cinematic, a Camera actor taking over) is a cut for the
  renderer: no motion blur from the jump, no TAA history from the other shot (`ViewOptions::cameraCut`,
  `GameWorld::takeCameraCut`); **Render Movie** stops and says so if a frame cannot be written.
- **glTF facial animation**: clips that animate morph target weights (lip sync, expressions) import and play; each
  mesh's targets are matched to the model's by name (`Animator::animatedMorphs`).
- **Package Project** follows a model's own files: a .gltf's .bin and the pictures it names outside itself (a level
  could point at a .gltf without its .bin and the check passed); a .glb's outside pictures.
- **Save games**: a slot left with only its backup (a save cut off between its two renames) is in `Save.list()`,
  and deleting it says it deleted something.
- **The engine comes without any game**: the source zip is the engine alone; a game's source is its own zip and builds
  next to it.
- Tests: `MANIAC_TEST_ONLY=<part of a name>` runs only those tests. 330 checks.

## New in v0.47
- **Orthographic cameras.** `Camera::orthographic` + `orthoSize` (half the picture's height in metres): no perspective,
  a thing is as large on the screen however far it is - a top-down, an isometric or a 2D game, a map. The whole
  renderer takes it: depth (the passes that read it get a linear depth), shadows (the cascades are boxes, not
  frustum slices), the level of detail (by the picture's size, not the distance), temporal anti-aliasing (its
  jitter goes where an orthographic matrix has it).
- **Game cameras** (`CameraComponent`; Place Actors > Cinematics > *Game Camera* / *Game Camera, orthographic*, at
  the viewport's view): a camera actor of the level that the game is seen through while it is active - of several,
  the highest priority - instead of the camera that follows the player. Perspective (field of view) or orthographic
  (size), near / far, **Follow Player** (it keeps the place it had beside the player). It looks along the actor's
  forward, so a script or a sequence moves it like any actor. Saved with the level.
  Lua: `actor:set_camera(true [, priority])`, `actor:set_camera(false)`, `actor:camera_ortho(size)`,
  `actor:camera_fov(degrees)`, `actor:camera_follow(true)`, `Engine.active_camera()`.
- **The editor's Top, Bottom, Left, Right, Front and Back views** (the view box at the top left of the viewport, or
  Alt+J top, Alt+H front, Alt+K left, Alt+G back to perspective, as in Unreal): orthographic, the right or middle
  mouse button drags the picture, the wheel zooms where the mouse points, F frames the selection, the gizmo works in
  them. The perspective view comes back as it was. (These views stand 5 km back from the scene: shadows are made
  where the scene is and there is no fog - `Camera::orthoFocus`.)

## New in v0.46
- **Mesh patterns**: a pattern painted over a whole model in two or three colours, on any Static Mesh or Skeletal Mesh
  actor (Details > **Pattern**): sheen, stripes, camo, galaxy, lava, neon lines. The model keeps its own light and
  dark detail, the pattern follows its shape and moves with it (it is laid on the model's own space, before any pose).
  What a weapon wrap, a team's colours or a rare variant of an item needs, without a second material. Saved with the
  actor; Lua `actor:set_pattern("stripes", r, g, b, r2, g2, b2 [, scale [, r3, g3, b3]])`, `"none"` takes it off.
  An actor without a pattern costs nothing more and is drawn exactly as before.
- `tools/godot_res.py` reads node paths of Godot's binary scenes as they are written (two 16-bit counts): scenes
  with skeletons and animations open now, not only static ones.

## New in v0.45
- **Store** (`src/Store.h`): what a game sells and what a player owns, as a part of the engine. A **catalogue** of items
  (the game names the types: outfits, tools, emotes, levels, power-ups), each with a rarity and a price - its own, or
  the price of its type and rarity from one table, times a factor for a sale. A **wallet**: a balance of the game's
  currency, the items owned, what is equipped in each slot. The catalogue answers what the shop shows today:
  everything while a category is small, a **daily rotation** once it is large (the same for everybody that day, on
  every platform; the new items always in), the newest first, a **new and featured** row, and **bundles** of the
  items of one set, cheaper than one by one and cheaper still for who owns a part. Free defaults, earned rewards and
  retired items are never sold. Edit > **Store...** edits it all (items, categories, prices, rules, a preview of
  today's shop) into `Config/Store.json`.
  Lua: `Store.items(type)`, `Store.item(id)`, `Store.categories()`, `Store.featured()`, `Store.bundles()`,
  `Store.price(id)`, `Store.buy(id)` (true, or false and why: `"too_expensive"`, `"owned"`, `"not_for_sale"`,
  `"unknown"`), `Store.buy_bundle(id)`, `Store.owns(id)`, `Store.grant(n)`, `Store.give(id)`,
  `Store.equip(slot, id)`, `Store.equipped(slot)`, `Store.balance()`, `Store.add{...}`. The wallet is kept in the
  save slot `store` by itself. Nothing in it talks to a payment service: how money becomes currency is the game's
  (call `grant` when the payment is confirmed).

## New in v0.44
- **Landscape holes** (Unreal's landscape hole / visibility tool): cells of the landscape that are not drawn and not
  solid - the mouth of a cave, a cellar, a pool dug into the ground. Landscape panel > **Hole** brush (Shift closes
  the ground again); from code `Landscape::cutHole(landscape, centre, halfSize, yaw, open, &room)` opens every cell
  wholly inside a rectangle and says what room they make, `Landscape::isHole`, `Landscape::holeCount`. The collision
  loses the same triangles, grass does not grow over a hole, and the open cells are saved with the level (a level
  without holes is saved as before). Limits: a hole is as fine as the landscape's grid (cover its edge with what
  you set into it), and a hole cut while the game runs is drawn at once but stays solid until the level is loaded
  again.
- **Water bodies of any shape and height**: a water actor's scale in x and z makes its square a rectangle and its yaw
  turns it (a pool, a canal). `Scene::waterSurfaceAt(x, z)` and Lua `Engine.water_at(x, z)` give the height of the
  water surface over a place (nil where there is none): what a game needs to make things float and characters swim
  in any water, not only in the sea.

## New in v0.43
- **Landscape: Near Detail** (`LandscapeComponent::nearDetail`, Details > Near Detail, 0 .. 1, default 0.7). A layer
  texture that repeats every 7 to 14 metres has run out of pixels under the player's feet: within 24 m of the camera
  each layer that is there is read again four times finer and grains the ground with that too (the way a landscape
  material in Unreal blends a near and a far tiling by distance). A steep face seen from two metres has rock grain
  instead of a brown smear. Not with Effects on Low (Performance, Low, Medium presets); on a RX 5600 XT at 1600 x 900
  it costs 1 % on Epic and 3 % on High - set it to 0 to have that back.

## New in v0.42
- **Particles that are streaks** (`ParticleLayer::stretch`): a particle is drawn as a line along the way it moves, as
  long as it travels in that many seconds, its width turned to the camera (Unreal: velocity-aligned sprites; Godot:
  stretched particles) - rain, sparks with a tail, speed lines. New preset **Rain** (Add > Effects > Rain): drops in a
  box 32 m wide around and above the actor; keep the actor at the camera and it rains wherever the player looks.
- Particle effects have a **Tint** (Details; multiplies the preset's colours: purple rain, green fire), saved with
  the actor when it is not white.
- glTF: `KHR_materials_specular` and `KHR_materials_ior` no longer get a line in the log (Blender writes them for
  almost every material).

## New in v0.41
- **Flip Green** for DirectX normal maps (green points down: made for Unreal or 3ds Max; bumps look like dents until it
  is on): `Material::flipNormalGreen` (Details > Flip Green, next to Normal Strength) and "Flip Normal Green" on an
  Instanced Static Mesh for a whole model. Saved only when it is on.
- **glTF files the importer cannot read say why.** A file that *requires* an extension this engine does not know is
  refused with the extension's name and what to do ("its meshes are Draco-compressed: export it again without Draco
  compression"; meshopt; KTX2 / Basis) instead of loading as an empty model. Material features that are not drawn
  (clearcoat, transmission, sheen, unlit...) are named once in the log: the model is not broken, it is plainer.
- **Older glTF materials** (`KHR_materials_pbrSpecularGlossiness`) keep their colour: the diffuse is the base colour,
  the glossiness one minus the roughness (they came in white).
- Instanced Static Mesh: Color Scale goes up to 4 (a dark stone texture can be brought up to a stone's brightness).
- `SYGKRISI-UNREAL-GODOT.md` section 0: what the engine has, has half of and lacks next to Unreal and Godot, by area.

## New in v0.40
- **Behaviour trees with a blackboard** (`src/BehaviorTree.h`): how a character decides, as an asset instead of code.
  A tree is a JSON file (`Behaviors/Guard.mbt`): `sequence`, `selector` (both resume the child that was running;
  `"reactive": true` asks again from the first child on every tick, so a higher branch takes over), `parallel`,
  `inverter`, `succeeder`, `repeat`, `cooldown`, `timeout`, `condition`, `action`, `wait`, `set`, `log`.
  `BehaviorTreeComponent` (Add > Behaviour Tree; Details: Tree, Step, and while playing what it is doing) runs it
  for an actor. Actions and conditions are functions of the actor's script (`chase(self, dt)` answers `true`,
  `false` or `"running"`); `move_to` (to a blackboard position) and `stop` are built in. The blackboard from Lua:
  `actor:bb_set("target", x, y, z)`, `actor:bb_get("alarm")`, `actor:behavior_state()`.
- **Scripts talk to each other.** Signals: `Engine.on("door_opened", fn [, owner])`, `Engine.emit("door_opened", ...)`,
  and an actor's own: `button:on("pressed", fn)`, `button:emit("pressed", who)`. Timers with a handle:
  `local t = Engine.after(2, fn [, owner])`, `Engine.every(0.5, fn [, owner])`, `Engine.cancel(t)` (a timer or a
  listener that belongs to an actor goes when the actor does). **Tags**: `actor:add_tag("enemy")`, `has_tag`,
  `remove_tag`, `tags()`, `Engine.find_tagged("enemy")`; the Details panel has a Tags field; saved with the actor.
- **Trigger volumes** (`TriggerComponent`, `src/Triggers.h`; Add > Trigger Volume): a box or a sphere at an actor,
  turned and scaled with it, that tells scripts who walked in and who left - every character and every moving
  physics body, or with "Only Tag" the actors that have that tag. The trigger's script gets `on_enter(other)` /
  `on_exit(other)`, the one who walked gets `on_trigger_enter(trigger)` / `on_trigger_exit(trigger)`, and anyone can
  listen: `gate:on("entered", function(other) ... end)`. `actor:set_trigger(true, "box", 4, 3, 4 [, tag])` /
  `(true, "sphere", 6 [, tag])` makes one from a script, `actor:inside()` lists who is in it, "Once" switches it off
  after the first one in. `Engine.overlap(x, y, z, radius [, tag])` asks once: the actors within a sphere, nearest
  first (an explosion, "which enemies are near me"). The editor draws every trigger's outline.
- **Script modules and fixed steps**: `local maths = require("lib.maths")` loads `Scripts/lib/maths.lua` (or the same
  path from the project's folder) once and gives every script the same table - shared code without globals; a name
  that leaves the project is refused. `function Thing:fixed_update(step)` is called 60 times a second whatever the
  frame rate (several times in a slow frame, not at all in a very fast one).
- **Levels from a script**: `Engine.load_level("Levels/Two.mlevel")`, `Engine.reload_level()` (menu -> chapter 1 ->
  chapter 2, "try again"). The game's player does the change after the frame.
- **glTF textures as their author meant them**: the sampler is kept (CLAMP_TO_EDGE and MIRRORED_REPEAT - an atlas no
  longer bleeds across its edge; NEAREST - pixel art keeps hard pixels) and so is `KHR_texture_transform` (offset,
  rotation, scale of the colour map place every map of the material: `Material::uvRow0 / uvRow1`). A picture that
  cannot be read is named in the log (KTX2 / Basis: "export it as PNG, JPEG or WebP").
- **Landscape**: `textureContrast` (Details > Texture Contrast, 0 .. 1) sets how strongly the layer textures grain the
  ground. The layer of unpainted ground is worked out once, when the weights are uploaded
  (`Landscape::fillUnpainted`), not for every pixel; a steep face keeps its own colour (the colour map read up to two
  mip levels coarser, in the same read). With Effects on Low (Performance, Low, Medium) each layer texture is read
  at one scale and grains the ground in light and dark only.
- **Level tool: Edit > Move Instances Out Of Other Objects** (`Destruction::separate`): instances of the selected
  instanced meshes that stand inside something else (loot dropped into furniture, a crate in a wall) move to the
  nearest free place on the same floor - at most 2 m, never through the front of a wall. A long one that lies free a
  quarter turn round (a crate set with its end in a wall) is turned where it stands instead. The log says what they
  stood in. `Physics::boxFree(centre, half size, rotation [, touched])` is the query behind it.
- **Speed**: a cluster of an instanced mesh is drawn with ONE call that says which instance it starts at
  (`ARB_base_instance`, on every card of the last ten years; without it the old way), instead of pointing six vertex
  arrays at the buffer again for every cluster in every pass - a town of 1,900 draws went from 136 to 214 frames a
  second on the Performance preset (RX 5600 XT, 1600 x 900; the pictures are identical, byte for byte). A material or
  a landscape is sent to the card only when it differs from the previous draw's (the chunks of a landscape, the
  copies of a prop: one run). The level of detail each object had is kept with the object (a hash table looked up
  for every draw cost a tenth of a millisecond); the two UV placement uniforms are sent only for materials that use
  them; a uniform's place in its program is found by the address of its name first (`Shader::loc`).
- **Profiler**: a game can time its own parts with the renderer's profiler (`renderer.profiler().scope("Game:
  interface")`);
- **Tests**: the first whole-frame test - a renderer is started, a small level is drawn, and the pixels are read back
  (single meshes in their own colours, an instanced row where each instance says).

## New in v0.39
- **Interaction** (`src/Interaction.h`), ready-made for every game:
  - `InteractableComponent`: an actor the player can use. A prompt when he is within reach (with a bar while the key
    is held), and the script event `on_interact()` when he presses - or has held - the "interact" action (E / pad X).
    Add > Interactable in the editor, Details: prompt, hold time, reach, once. Lua: `actor:set_interactable(enabled
    [, prompt [, holdSeconds]])`. A game with its own HUD reads `GameWorld::focus()`.
  - `Interaction::Hold`: the "hold the key for a moment" on anything, also on things that are not actors.
  - `OpenableComponent` + `GameWorld::openables()`: an instanced model with a part on a hinge - the lid of a chest, a
    hatch. The model is cut at a rim (`Destruction::cut`) and the far part swings open, and shut again. Details:
    rim, hinge, angle, seconds. Lua: `Engine.open(actor [, instance])`, `Engine.close(...)`.
- **`Physics::landing(from, to)`**: where something thrown comes to lie - never through a wall, never on the floor above.
- **`Display::captureCursor(window, captured)`**: when a menu takes the mouse the pointer appears in the middle of the
  window, not where the hidden camera motion had left it.
- **The splash every game opens with** (`Display::splash`, `src/Splash.cpp`): black, the "M" in white and under it
  "Powered By Maniac Engine". The window is created hidden and appears with the splash on it - never white - and it
  stays until the game's first frame (`Display::apply` draws it again when it changes the window while the level
  loads; `Display::splashEnd` keeps it up for at least 1.2 s).
- **Bloom without the veil.** With no threshold (Unreal's default, -1) the bloom texture is the whole picture, blurred.
  It was added on top: a bright copy of everything over everything - darks lifted, colours thinned. It is now mixed
  in (`Renderer::bloomMix`: 9 % at Unreal's default intensity 0.675), so light spreads from bright things and the
  picture keeps its darks. With a threshold the bloom is added as before. Measured on the same shot (RX 5600 XT):
  darkest twentieth of the picture 48 -> 32 of 255, and the colours of the level come through.
- **Landscape: unpainted ground has its texture.** Ground with no painted weights (most of an imported island) took
  the colour map alone: flat paint. It now takes the grain of the layer whose colour is nearest to the colour map
  there (green: the grass texture; sand and earth: the dirt; grey: the rock; a layer without a texture stays smooth).
  The grain is brightness with a little tint (`layerGrain`), two scales multiplied; a steep face is rock, and there
  the colour map is read blurred, so its marks no longer run down the slope as smears.
- **Picture stability** (found by a review of the code, each one checked against the source before it was changed):
  - TAA reads its history with the same un-jittered matrices as it writes it: with a still camera exactly its own
    pixel (it was a fraction of a pixel off every frame: thin lines went soft and far detail shimmered). Standing still,
    pixels changing by more than 4/255 from one frame to the next: 6.0 % -> 1.5 % of the picture, 17.6 % -> 3.7 % on
    far hills. Skinned characters keep less history (no trail behind arms and legs).
  - The sun's shadow is looked up with the surface's own normal, not the normal-mapped one (rough walls and hillsides
    sparkled); the PCSS filter's angle changes every frame under TAA; Low / Medium use a fixed filter.
  - Contact shadows are soft at both ends and fade out between 45 and 70 m (dots that came and went on far hills).
  - **Level of detail with memory** (`Renderer::lodWithMemory`): coarser at the threshold, finer only a fifth past it.
  - Local lights: each of the sixteen fades in and out on its own; the lights that stay are not touched.
  - Screen-space GI keeps a history of distance and drops the old light where the surface is not the same one.
  - Reflection captures are refreshed in turn; GI probes always read their textures at mip 4; the two decal samplers
    always have their own units; an alpha cutoff of 0 in a glTF is 0; the night sky's smoothsteps are the right way round.
- **Models with broken normals are mended when they load** (`Mesh::repairNormals`): where most triangles carry a
  normal pointing away from the side they face, the normals are computed again from the triangles and the log says
  which model it was. (The Battle Bus was such a model: ambient occlusion read its sides as buried and they went black
  wherever the sun did not reach.) Capsule shadows no longer fall on the skinned mesh that casts them.
- **Speed**: with sun shadows off (Performance, Low, Medium) the four cascades are cleared once, not every frame;
  camera motion blur is skipped while the camera stands still, has its own line in the profiler, and is off in
  Performance (`GraphicsSettings::motionBlur`).

## New in v0.38
- **The air of a place** (`Renderer::setAir(colour, density, amount)`): inside a storm, a swamp or smoke the level's
  fog turns to another colour and density, the sky with it, starting at the eye. For the frame only, never written
  into the level.
- **Local lights fade instead of popping**: more than sixteen lights in view used to be cut off sharply, and the
  seventeenth lamp of a street switched on and off as the camera turned. They now fade out over the last third of
  the distance to the first light left out.

## New in v0.37
- **Light probes that stay put** (`Renderer::updateGI`). The probe grid is toroidal in height too: a camera that
  crosses a 2.5 m layer (a jump, stairs, a slope, a third-person camera tilting) keeps three of the four layers
  instead of throwing all 576 probes away, and it must be a third of a layer past the edge before the grid moves. A
  cell the grid has just moved onto has no weight until it is captured (the sky light shows there), instead of the
  light of the cell that was stored in its place. Before, the light of a whole neighbourhood could be wrong for
  seconds, again and again.
- **Mist wall** (`MistWallComponent`): a wall of churning mist on a circle around an actor - a storm front, the edge
  of a zone, a force field. Radius, height, three colours, lightning; it fades into the sky and where it meets the
  ground. Add > Mist Wall in the editor, `actor:set_mist_wall(radius [, opacity])` and `actor:mist_wall_flash(0..1)`
  in Lua, saved with the level, one draw.
- **Destruction**: `split()` first finds the bodies a model is made of (triangles joined edge to edge). A shelf, a
  chair, a counter inside a one-mesh building are pieces of their own and take what stands on them; walls and floors
  are cut along the grid apart from them. A blow lands on the piece whose surface is there (`distanceTo`). `cut()`
  parts a model in two across an axis, body by body - the lid of a chest from its box. Debris is small chips that are
  gone in about 1.4 s (`Debris::lifetime`).
- **Animation**: `ModelAsset::markTurned(clip, nodes)` - the bones a clip has a rotation track for. A clip laid over
  another animation must leave the rest alone (hair, a tail).
- **Package Project finds what is really missing** (`src/Packaging.h`). The check now knows prefabs (`.mprefab`) and
  WebP pictures, and it opens every prefab and every Lua script it meets and follows what they name in turn: a level
  places a prefab, the prefab holds a model and a script, the script spawns another prefab. Each line of the report
  says which file asked for the missing one ("named by ..."); a prefab that cannot be read is reported too. Before,
  a level whose prefab was gone packaged with "0 missing references".

## New in v0.36
- **Pictures** (`src/Image.h`): one loader for PNG, JPEG, TGA, BMP... and **WebP** (libwebp's decoder, in
  `external/libwebp`). glTF files whose textures are WebP (`EXT_texture_webp`, embedded or files beside the model)
  now get them; `.webp` files work as material textures too.
- **Hands that hold** (`src/CharacterPose.h`), for any character with the humanoid bone names. Analytic two-bone IK on
  the arms, the hand turned so the fist closes round what it holds, everything measured on the skeleton:
  - `applyShoulderRest`: a long tool resting on the right shoulder. `applyToolSwing`: one diagonal swing of it
    (alternate `leftArc`), the shoulders wind up, the left hand joins on the handle where it reaches.
  - `applyGunHold`: a gun in both hands, the stock on the shoulder, the barrel exactly along the aim; a pistol held
    in front in both hands. `applyBarGrip`: both fists on a bar (a glider, a zipline handle).
  - `applyGrip` (the fingers close), `holdFist` (one fist to a point), `heldFrame` / `gunFrame` (where the held thing
    is, to place its model), `lowestBar` / `barHeightFor` (a glider's bar, and how high this character reaches it).
- ManiacTests: 96 checks.

## New in v0.35
- **Destruction** (`src/Destruction.h`), for every game:
  - An Instanced Static Mesh has **Breakable**, **Piece Size**, **Health** and **Break Material** in the editor.
    While the level is played, blows take health off an instance: it shakes, shows cracks in three stages, bursts
    into debris and loses its collision. `GameWorld::breakables()`; from Lua `Engine.damage(ox, oy, oz, dx, dy, dz,
    distance, amount)` and `Engine.explode(x, y, z, radius, amount)`.
  - A building that is a single mesh (Piece Size > 0) stays one draw until its first blow; then that instance is
    swapped for the pieces `Destruction::split()` made of its model, and they break one by one.
  - `Destruction::Debris`: lumps thrown out of what breaks; one instanced draw, no rigid bodies.
  - `Breakables::restore()` puts everything back, collision included (`GameWorld::restoreInstanceCollision`,
    `refreshInstanceCollision`).
  - **Edit > Put Floating Instances On The Ground** (`Destruction::settle`, `hangingBy`): instances that hang over
    what is beside them go down onto it; with undo.
- `Assets::put(id, model)`: a model made in code can be drawn by id like a file.

## New in v0.34
- **Character poses** (`CharacterPose.h`): `applyPosture` and `applyCrouchUpright` (a library crouch that bows to the
  ground: the back comes up, the head looks ahead). `HumanoidBones` finds clavicles and fingers.

## New in v0.33
- **Damage on instances** (`MeshInstance::damage`, 0..1): the lit shader draws thin cracks that start in patches and
  spread over the surface in three stages. Instanced draws carry it in a second per-instance vector (location 13).
- Ground bounce: the share of sunlit ground a surface looks out over comes from ten spread points (`groundSunShare`),
  and points outside the shadow maps no longer count as lit. The underside of a canopy had a hard-edged dark zone that
  also moved with the camera.

## New in v0.32
What a game other than ours needs, each with tests (67 checks in `ManiacTests`):
- **Input map** (`Input.h`): named actions bound to keys, mouse buttons and gamepad controls, `Config/InputMap.json`,
  Edit > Input Map; Lua `Input.action`, `action_pressed`, `action_released`, `axis`, `gamepad`.
- **Save games** (`SaveGame.h`): Lua `Save.write / read / exists / delete / list`; slots live in the player's
  profile folder, are written whole or not at all, and keep the save before them.
- **Collision layers and masks**: 8 layers, per body and per character; `Physics::raycastLayers`, Lua `Engine.raycast`.
- **Prefabs** (`Prefab.h`): a group of actors saved once, placed many times, rebuilt from the file; Lua
  `Engine.spawn_prefab`. `Scene::serializeEntity / deserializeEntity`, `GameWorld::adopt`, `ScriptSystem::attach`.
- Look, measured on the real graphics card: the light the ground sends back up keeps 40 % of its colour (ceilings
  and walls next to a lawn were green); landscape: large-scale variation of the meadow colour.

## New in v0.31
The performance reports, each checked against the code first (`EKKREMOTITES.md`, A13, says which held).
- **Profiler (F10):** the whole frame, the part outside the renderer and the **1 % low** (`FrameProfiler::frameMs`,
  `outsideMs`, `low1Ms`); `updateEnvironment` has a scope of its own.
- Lamp shadows follow the Shadows quality (Off: none, Low: 1 lamp, Medium: 2, High and up: 4).
- Not drawn, not paid for: a skinned character out of view and beyond the shadow distance, a particle effect out of
  view (no sorting, no upload, simulation without turbulence), the foliage shadow list with Shadows Off, the capture
  hash in a level without captures, a looping sound out of earshot.
- `Scene::findByUid` keeps an index (sequences, networking).
- Editor: a loading box with the current step while the shaders compile (`Shader::onBuild`, `Editor::loadingBox`).
- Height fog: Start Distance holds with Volumetric Fog on. Sun: the disk in the sky follows Source Angle.

## New in v0.30
Importing a model: the same GLB now looks the way its author made it.
- **See-through materials** (`alphaMode: BLEND`): a transparent pass after the opaque scene and the water, actors
  sorted far to near, opacity from the texture and / or the base colour. Exporters set BLEND on solid pictures too, so
  the importer reads the alpha channel (`classifyAlpha`): solid, cut-out, a copy of the brightness, or really
  see-through. The log says what it decided for each material.
- `emissiveTexture`, a separate occlusion map, and a **second UV set** (`TEXCOORD_1`, `Mesh::uv1`) for those two maps.
- Skinning: up to 8 influences a vertex are read and the 4 strongest kept; the joint matrices of the whole frame go
  to **one float texture** (no 128-joint limit, one upload a frame instead of one per draw per pass).
- Each image is uploaded once, in the colour space it is used in.
- Post Process: **Reflection Intensity** apart from Indirect Intensity (old levels load both equal).
- `Material::selfLightLocal`: a material's faint own light fades where less light arrives than under the open sky.
- Standalone player: a press of Jump waits for the next physics step (it was lost above 60 FPS); rigid bodies are
  read back only after a step.
- `ManiacTests` opens a hidden window, so tests may run a play session; `tools/tests/make_import_test_glb.py` writes
  the importer's test model.

## New in v0.29
The engine first: the code-review findings, each fixed where the code was plainly wrong, with a test where one can
run without a window. **`tests/EngineTests.cpp` (target `ManiacTests`)**: run it after every build.
- Sequencer: auto tangents stay between their keys (Fritsch-Carlson limit), events fire across the end of a loop
  and at 0 s, a tilted cine camera keeps its roll (`Camera::roll`).
- **`Packaging.h`**: Package Project copies every level, `Textures/` and `Imports/` as well, and reports every file a
  level names that is missing from the package.
- `NavGrid::findPath` reuses its working memory (it cleared three arrays the size of the grid per request).
- Local lights: cut-out materials and foliage-tool trees cast their shadows, the sixteen-light limit keeps the
  visible lights, a light keeps its shadow slot (and its cached cube), reflection captures refresh when a light's
  colour, rotation or cone changes.
- Shadows Low / Medium draw one / two cascades (all four were drawn at every level).
- Post: motion blur works without TAA, Bloom Off skips the pass, bloom uses the tonemapper's exposure floor, ACES
  vignette cannot go negative and takes Highlights Gain and Scene Color Tint, Reset grading resets all of it, Bloom
  Threshold has "None", sharpening fades in from 0 %, Ground Bounce Scale refreshes the sky capture.
- Debug views: Indirect Light keeps the probes on, Shadow Cascades colours by depth on every face.
- Water: the sun's glitter is shadowed, SSR Off switches its screen trace off, refraction follows the camera, spray
  fades against the surface, no screen-space GI correction from the sea floor.
- Game menus: the Low preset no longer turns itself into Custom; Textures and Outlines do mark it Custom.

## New in v0.28
- **Level files cannot be lost any more**: `Scene::save` writes next to the level and replaces it only after the new
  file is complete; a failed `Scene::load` leaves the open scene as it was; the editor backs the demo level up before
  it writes a new one over it.
- `SpringArm`: the camera never ends up beyond the contact point of its sweep (it could sit inside a wall).
  `NavGrid`: `findPath` no longer ends on a blocked cell, `nearestWalkable` respects its radius.
- GI probes are blended in when refreshed (bounced light settling made interiors flicker).
- `GameWorld::removeInstanceCollision`: the collision of one destroyed instance of an instanced mesh.
- `Display::prepareWindow`: dark title bar on Windows in dark mode, and a dark first frame instead of a white window.
- `EKKREMOTITES.md`: every open item, engine first.

## New in v0.27
Fixes from the first hour of play on 0.26.
- **GI probes follow a moving sun.** With the 0.26 budget a full round of the probe grid took a minute: at dusk the
  ground around the camera kept the light of the afternoon (a bright square with the player in the middle). A light
  that has changed by a tenth starts a fresh round at one probe a frame, and in between the lit shaders scale the
  grid by "light now / light when captured" (`uGIRelight`).
- **Lamp shadows are cached.** Four shadowed lamps x six cube faces x the whole scene were drawn every frame at
  night. A cube is drawn in full when the light in its slot changes, then one face a frame.
- **Only the diffuse sky light sees the fogged sky** (`skyFogged()` in the irradiance and probe-sky passes). The raw
  capture - mirror reflections, water - is the clear sky again: water looked like a sheet of fog in 0.26.

## New in v0.26
Measured on the
real graphics card (Radeon RX 5600 XT, 1920 x 1080) and against the Unreal reference shots at 12:00, 18:00 and 21:00.
- **GI probes no longer eat the frame.** The probe grid was refreshed 6 - 24 whole probes a frame (13 - 56 ms of GPU
  time and 20 - 65 ms of CPU time: the whole frame rate of Epic). The budget is now counted in cube faces: the grid is
  filled once behind the loading screen, then one probe a frame while the camera moves (nearest first) and one face a
  frame standing still. Measured: 1.3 ms GPU / 2.0 ms CPU, Epic 28 - 43 FPS -> 68 - 80 FPS.
- **Two-sided foliage** (`Material::translucency`, automatic for the cut-out leaves of swaying imported trees): a leaf
  lit from behind glows with the light that passed through it, wrapped, shadowed and yellower than its front. The fir
  that was a flat dark green now reads like Unreal's (lit side 0.22 0.32 0.14 against 0.26 0.34 0.15).
- **The height fog covers the sky** (`HeightFogComponent::skyFog`, default 1 as in Unreal), and the sky capture - the
  sky light and the reflections - sees the fogged sky, as Unreal's real-time capture does: a pale blue-violet noon, a
  mauve dusk, a violet night. Sky at noon 0.64 0.72 0.80 against Unreal's 0.62 0.70 0.81.
- **Ozone** in the atmosphere (Chappuis band, Hillaire 2020): deeper blue overhead, most of all at twilight.
- **Shadow-aware ground bounce**: the sunlit ground in the lower half of the sky light no longer lights walls that
  look out over ground in shadow (the shaded side of a house was 1.65 x too bright).
- **Stylised day** (`timeStyle 1`): the exposure follows Unreal's bias less its eye adaptation, calibrated on the
  reference shots; dusk and night are no longer washed out.
- **`setTextureQuality`** (`GL.h`, `GraphicsSettings::textureQuality`): anisotropic filtering 1x / 4x / 8x / 16x and a
  mip bias on Low, for the textures already loaded and every one loaded later.
- **Outlines** (`GraphicsSettings::outlines`): cartoon ink lines along depth and normal edges, fading with distance.
- **`Animator::solveLimbIK`**: two-bone IK on any limb. **`Physics::capsuleFree`**: room for a standing character.
- `MANIAC_QUICK_PATCH=<json>` (editor `--autotest`): tweaks merged into a level's components for look-dev runs.

## New in v0.25
- `Display::FrameLimiter` asks Windows for a 1 ms system timer (a sleep was late by up to 15 ms otherwise).

## New in v0.24
The basics, before anything new: flicker, frame rate, movement, camera, settings. What is general lives in the engine.
- **Flicker found and fixed.** A fighter standing on a slope slid slowly down it (a constant push into the floor), and
  the camera crept with him: every surface crawled. The camera arm was a single ray that flipped beside walls. Sampling
  noise (AO, GI, fog, clouds) now stays still when there is no TAA to average it. Measured over 40 still frames: pixels
  that change 47 % -> 1 % without TAA.
- **`Profiler.h`**: GPU (GL_TIME_ELAPSED) and CPU milliseconds of every render pass and of the game's own work. F10
  twice, and a line in the log every five seconds.
- **`Display.h`**: monitors, window mode (windowed / borderless / fullscreen), resolution, refresh rate, V-Sync
  (off / on / adaptive) and a frame limiter that sleeps and then spins the last millisecond.
- **Quality presets** in `Renderer.h` (`graphicsPreset`, `recommendedPreset` from the graphics card's name):
  Performance, Low, Medium, High, Epic. Shadows Low / Medium use four PCF taps instead of PCSS.
- **Sharper picture**: TAA reads its history with a Catmull-Rom filter; contrast adaptive sharpening in the final pass
  (`GraphicsSettings::sharpening`).
- Automated run: `tools/look/flicker.py`.
- Not done yet: the Unreal look itself (fog, sun colour, foliage shading), the pose modifiers and IK of the Godot
  characters. See `SYGKRISI-UNREAL-GODOT.md`.

## New in v0.23
- `Physics::raycastIgnoring()`: a ray that passes through one body (a vehicle's own collision).

## New in v0.22

## New in v0.21
- `InstancedMeshComponent::normalTexture` (a normal map override, cached like the colour override).

## New in v0.20
- **Stylised night sky** (`SkyAtmosphereComponent::style = 1`, a port of the Godot lobby sky) for menu stages.
- **Fixes:** samplers of different types no longer share texture unit 0 (strict drivers drew the runtime apps black);
  unpainted landscape ground shows the colour map instead of a black mirror; the water writes depth, so the height
  fog no longer draws a light square of the landscape's area on the open sea; `Renderer::invalidateScene()` for
  switching scenes; skinned meshes get LODs; Ogg Vorbis audio, looping and 2D UI sounds.

## New in v0.19
- **Online multiplayer (networking):** ENet transport (MIT), listen server / client with `NetDriver`
  (snapshots at 20 Hz, client movement at 30 Hz, 100 ms interpolation, relevancy by distance, events).
  Loopback test: `MANIAC_NETTEST=1 ManiacEngine --autotest out/`.
- **Unreal filmic tonemapper:** the UE5 ACES-based film curve (slope / toe / shoulder / white clip), colour grading
  in ACEScg with shadows / midtones / highlights, scene colour tint, blue correction, gamut expansion, cos^4 vignette
  and unthresholded bloom like Unreal's defaults. Older levels keep the ACES fitted curve.
- **Exact Unreal level import:** `Tools/mr_90_export_maniac.py` (in the Unreal project) writes the level as it is
  (every instance, custom data, material graph, light, fog and post setting); `tools/import_unreal_rawassets.py --level`
  rebuilds it here with the same transforms, materials, sun / sky / fog / grading for the chosen hour.
- Fog start distance, sky light colour, ground bounce strength, per-instance metallic and self-illumination,
  HDR frame dump for look-dev (`MANIAC_QUICK_HDR=1`).

## Programming in C++

A game can be made in the editor and with Lua alone. When you want your own C++ - a game mode, an inventory, an AI of
your own, anything that must be fast - the project gets a **Source** folder, as an Unreal project has. You need only
the installed engine: its **SDK** folder has the engine's headers and prebuilt libraries. The engine's own source is
not part of the product.

### What you need

| | |
|---|---|
| **Windows** | **MinGW-w64 GCC 13**, x86_64 (64-bit), **POSIX threads**, **SEH**, the **MSVCRT** runtime. One that fits: WinLibs "GCC 13.2.0 (with POSIX threads) + MinGW-w64 11.0.1 (MSVCRT)", Win64. |
| **Linux** | **GCC 13** (g++), x86_64. |
| **Both** | **CMake** 3.20 or newer; **Ninja** or make (mingw32-make on Windows). |

The engine's libraries are C++ static libraries, and those only link with the compiler they were made with. That is
why the kind matters: not the UCRT builds of MinGW-w64, not Visual C++ (MSVC), not Clang. `SDK/SDK.json` and
`SDK/README.md` name the exact compiler of your install. A newer GCC of the same kind usually works; the editor warns
when the version differs, and CMake stops with a message when the compiler is of another kind.

The editor looks for the compiler on the PATH. If it is somewhere else, set its folder (the one with `bin\g++.exe` in
it) in **Edit > Editor Preferences > C++ > Toolchain Folder**; the same section shows what was found.

### The first module

- **A new project:** *New Project > Project Defaults > Code > C++*.
- **A project you have:** *Tools > New C++ Class...*. The first class also makes the project's first module, called
  after the project.

The project now has:

```
MyGame/
  MyGame.maniacproject     "Modules": [ { "Name": "MyGame", "Type": "Runtime" } ]
  Source/
    CMakeLists.txt         written by the editor from the Modules list (Tools > Refresh C++ Project)
    MyGame/
      MyGame.h, MyGame.cpp the module: a GameModule
  Binaries/Win64/MyGame.dll   after Compile (Linux: Binaries/Linux/libMyGame.so)
  Intermediate/Build/         the compiler's own files (can be deleted)
```

Write the code in your own editor (*Tools > Show Source Folder*). Press **Tools > Compile** (Ctrl+Alt+F11, or
*Compile* in the bottom bar). The compiler's lines come in the Output Log; when there are errors, **Tools > C++
Project** lists them and a click shows the line. Then press **Play**: the editor loads the module and your code runs
in the game.

### Compile, Play, change, Compile, Play

The module is loaded when you press Play. Change the code, Compile, press Play again: the editor sees that the
library is newer and loads the new code. You can compile while the game is playing; the new code is used from the
next Play (a running game keeps the code it started with).

One object of your module class is made when a game begins and deleted when it ends. Keep what the game needs in
the object's members, not in global variables: that is what makes loading the code again safe.

### A game module

```cpp
// MyGame.h
#pragma once
#include <GameModule.h>

class MyGame : public GameModule {
public:
    void begin(EngineContext& ctx) override;                                   // the level is loaded, the game begins
    void tick(EngineContext& ctx, const GameInput& input, float dt) override;  // every frame (dt 0 while paused)
    void ui(EngineContext& ctx, ImDrawList* draw, const glm::vec2& origin, const glm::vec2& size) override;   // the HUD
    void end(EngineContext& ctx) override;
private:
    int m_score = 0;
};
```

```cpp
// MyGame.cpp
#include "MyGame.h"
#include <Log.h>
#include <imgui.h>

MANIAC_GAME_MODULE(MyGame)        // once in the module

void MyGame::begin(EngineContext& ctx) { LOG(Game, "MyGame begins in %s", ctx.scene.name.c_str()); }

void MyGame::tick(EngineContext& ctx, const GameInput& input, float dt) {
    if (input.jump) ++m_score;
    // ctx.world: the running game (player(), physics(), scripts(), destroyActor(), ...)
    // ctx.scene: the level (ctx.scene.reg is its EnTT registry: TransformComponent, StaticMeshComponent, ...)
}

void MyGame::ui(EngineContext&, ImDrawList* draw, const glm::vec2& origin, const glm::vec2&) {
    draw->AddText(ImVec2(origin.x + 16, origin.y + 40), IM_COL32(255, 255, 255, 255), ("Score " + std::to_string(m_score)).c_str());
}

void MyGame::end(EngineContext&) {}
```

`EngineContext` has `world` (the `GameWorld`), `scene` (the `Scene`), `projectDir`, `moduleName` and `inEditor`. The
engine's headers are yours to include: `Scene.h`, `Gameplay.h`, `Audio.h`, `Physics.h`, `Input.h`, `SaveGame.h`,
`Store.h`, `Navigation.h`, `Particles.h` and the rest are in `SDK/include/engine`. Your module uses the engine that is
running - the same Log, Audio, ImGui and assets as the editor - so anything the engine can do, your code can call.

### Code for actors: Actor Components

*Tools > New C++ Class > Actor Component* makes a class like this:

```cpp
class Door : public ActorComponent {
public:
    void beginPlay() override;        // the game begins, or the actor was spawned
    void tick(float dt) override;     // every frame
    void endPlay() override;
};
```

and in `Door.cpp` the line `MANIAC_ACTOR_COMPONENT(Door)`. Give an actor the **tag** `Door` (Details > Tags) and it
gets a `Door` object while the game runs - the actors of the level when it begins, and the ones spawned or tagged
later. In the class, `actor()` is the actor, `transform()` its transform, `get<T>()` another of its components,
`scene()` and `world()` the level and the game. No other file changes when you add a class: compile and play.

### Lua and C++ together

A script can ask the module something: `Engine.call_module("MyGame", "add_score", 10)` calls the module's
`message(ctx, "add_score", "10")` and returns what it returns (nil when there is no such module);
`Engine.has_module("MyGame")` says whether it is running. From C++, `ctx.world.scripts()` reaches the scripts.

### More modules, and your own CMake

*New C++ Class > Game Module* adds another module to the project (its own folder in `Source/`, its own library).
*Tools > Refresh C++ Project* writes `Source/CMakeLists.txt` again from the Modules list. If you want to write that
file yourself, delete its `# MANIAC-GENERATED` line: the editor then leaves it alone.

By hand, without the editor:

```
cmake -S Source -B Intermediate/Build -G Ninja -DManiacEngine_DIR="C:/Program Files/Maniac Engine/SDK/cmake"
cmake --build Intermediate/Build
ManiacEngine MyGame.maniacproject --compile          (the same, as the editor does it)
ManiacEngine --module-check Binaries/Win64/MyGame.dll --out check.txt
```

`find_package(ManiacEngine)` gives `maniac_game_module(<Name>)`, and also `maniac_engine` (the engine as a static
library) with `maniac_program(<target>)` for a game that is a program of its own with the engine linked into it
(`GameExecutable` in the descriptor: Play > Standalone Game runs it).

### Packaging

*Package Project* compiles the modules once more for the packaged game's own program and puts them beside it (on
Windows a library names the program it takes the engine from: the editor's `ManiacEngine.exe` while you work, your
`<Game>.exe` in the package). The compiler must be there when you package a project with C++.

### Rules that keep it working

- Compile with the compiler the SDK names, and compile again after you install a new version of the engine (a module
  made for another engine version is refused, with a message).
- Do not let a C++ exception leave your module: catch what you throw. (One that gets out is caught at the engine and
  the module is stopped until the next Play.)
- On Windows the module carries its own copy of the C++ standard library. Strings, vectors and the engine's types
  go back and forth freely; do not pass `std::ostream`, `std::locale` or `std::thread` objects between your code and
  the engine.
- A crash in your code is a crash of the editor, as with any engine that loads game code: save before you play new
  code.
## Animation (for creators)

Everything here is an asset: a small text file (JSON) in your project, usually in the folder `Animations`. Make one
with **Content Browser > Add > Animation**, or with **New** in **Window > Animation Editor**; double-click an
animation asset to open it there. Assets name clips and bones by their names, so one asset serves every model that
has the same skeleton.

The Animation Editor has the project's animation assets on the left, the open asset in the middle and a **preview**
on the right: the skeleton as a figure you can turn (drag) and zoom (wheel). Choose the **preview mesh** above it.
**Show on Selected Actor** puts the same pose on the skeletal mesh you have selected in the level, so you see the
real model in the viewport. Ctrl+S saves the asset; actors in the level that use it take the new version at once.

### Using a graph on an actor
1. Select an actor with a skeletal mesh (a character, an animal, a door with bones).
2. **Details > Add Component > Animation Graph** and choose the graph file. `assets/animation/Locomotion.manim` is
   the engine's own idle / walk / run / jump for models with the clips Idle, Walk, Run and JumpLoop.
3. Optional: a **Skeleton** asset (sockets, extra clips, the clips' notifies) and an **IK Rig** (the legs of foot IK).

A character (player or AI) fills these parameters of its graph by itself every frame, if the graph has them:
`speed` (m/s over the ground), `grounded`, `vertical_speed`, `direction` (degrees between where it moves and where
it faces) and `moving`. Everything else you set from a script. Without a graph an actor animates as it always did
(Idle / Walk / Run clips of the Character component); the component then only plays montages.

### Animation Graph (.manim)
A graph is made of **nodes**. Each node gives a pose; a node's inputs are the poses of other nodes; the node marked
**Output** gives the pose of the mesh. Right-click the canvas to add a node, drag from a node's output (right) to an
input pin (left) to connect, drag a connected pin away to disconnect, Delete removes the selected node. The bar
under a node shows how much of the final pose it is right now.

| Node | What it does |
|---|---|
| Clip | Plays one clip (loop or once, play rate, its own notifies) |
| Blend Space | Mixes clips placed on one or two axes by parameters (see below) |
| Aim Offset | Lays an additive blend space over its input: look / aim by yaw and pitch |
| Blend | Mixes two inputs by a fixed alpha or by a float parameter |
| Blend Poses by Int / Bool | Shows the input a parameter names, cross-fading over a blend time |
| Apply Additive | Lays the second input, as a difference to a reference pose, over the first |
| Layered Blend per Bone | The layer takes one bone and everything below it (an upper body over running legs). Blend Depth feathers it over several bones; Mesh Space keeps the layer's directions whatever the base does |
| Slot | Montages played in the slot of this name go over the input |
| State Machine | States and transitions (see below) |
| Save / Use Cached Pose | Evaluates a part of the graph once and uses it in several places |
| Mirror | Swaps left and right while a bool parameter is true |
| Pose Asset | Lays named poses over its input, each by the parameter of its name |
| Composite | Plays an Animation Composite |

**Parameters** are on the left: Float, Bool, Int or Trigger. The value beside each one drives the preview at once
(try the speed); **Default** keeps it as the value the graph starts with. A trigger is true for one update and is
used up by the transition it fires.

**State machines.** Double-click a State Machine node to open its canvas. Each state shows the pose of one node of
the graph (a new state comes with a clip node of its own; pick another under **Shows**). Drag from the dot on a
state's right edge to another state to make a **transition**; click it to edit:
- **Conditions** on parameters (`speed > 0.1`, `grounded` false, a trigger); all must hold. None: it goes at once.
- **Blend Time** and **Blend Curve** (linear, smooth, ease in / out).
- **Automatic**: it goes when the state's animation is about to end (with the blend time, or your own time, left).
- **Priority**: of several that hold in one frame, the highest goes.
- Right-click a state > **Add Transition from Any State** for transitions that can fire wherever the machine is.
The state marked **Entry** is where it starts. While the preview runs, the current state is green and the bar shows
the blend. A state that is entered starts its animation from the beginning.

### Blend Space (.mblend) and Aim Offset
Samples are clips at places on an axis (1D: speed) or two (2D: speed and direction). The pose at a point is the mix
of the nearest samples: the two neighbours in 1D, the corners of the triangle round the point in 2D (the editor
draws the triangles). **Drag the orange point** to preview; drag a sample to move it, double-click the grid to add
one, right-click a sample to remove it.
- **Synchronise**: the samples share one cycle, its length mixed from theirs, so a walk and a run stay in step.
  Untick **In Cycle** for a sample that should keep its own time (an idle).
- **Match Rate to Axis Speed** (1D gaits on a speed axis in m/s): the cycle plays faster or slower so the feet cover
  the real ground speed and do not slide.
- **Notifies by phase**: 0 is the start of the cycle, 0.5 its middle (the engine's locomotion has FootL and FootR).
- **Additive (Aim Offset)**: the result is the difference to a reference pose, laid over another animation by an
  Aim Offset node. Typical: nine one-frame poses on yaw and pitch from -90 to 90.

### Animation Montage (.mmontage) and Composite (.mcomposite)
A montage is an action played on demand: an attack, a reload, an emote.
- **Segments**: clips (or parts of clips, at a rate, repeated) one after another.
- **Sections**: named points on the timeline. After a section the montage plays on, **loops** (next = itself) or
  jumps to another section. A script can jump (`montage_jump`) or change what follows (`montage_set_next`): hold a
  charge loop until the button is released.
- **Slot**: the Slot node of the graph with that name plays it. Without such a node it goes over the whole pose.
  **Only From Bone** makes it an upper-body montage.
- **Blend In / Out**, **Play Rate**.
- **Notifies**: named moments (or windows with a duration) on the timeline; **curves**: values over time.
Drag on the timeline to scrub, drag a section's flag or a notify to move it, Play to hear the events in order.
A **Composite** is only the segments, notifies and curves: several clips as one animation for a graph.

### Notifies and curves in scripts
```lua
function Hero:on_anim_notify(name, kind, source)
    -- kind: "notify", "begin" / "end" (a window), "montage_started", "montage_blending_out", "montage_ended",
    --       "state_entered", "state_left"
    if name == "Hit" then Engine.damage(self.target, 20) end
end
-- or, from anywhere:  hero:on("anim_notify", function(name, kind, source) ... end)
```
| Lua | |
|---|---|
| `actor:anim_set("speed", 3.2)`, `actor:anim_set("armed", true)` | set a parameter |
| `actor:anim_get("speed")`, `actor:anim_trigger("attack")` | read one, fire a trigger |
| `state, seconds = actor:anim_state("Locomotion")` | where a state machine is |
| `actor:anim_curve("Effort")` | a curve's value now |
| `actor:set_anim_graph("Animations/Hero.manim")` | change the graph |
| `actor:play_montage("Animations/Attack.mmontage", rate, "Section")` | play a montage (true when it started) |
| `actor:play_animation("Wave", blend_in, blend_out, rate, loop, slot)` | one clip of the model as a montage |
| `actor:stop_montage(name, blend_out)`, `actor:montage_jump("End")`, `actor:montage_set_next("Loop", "End")` | |
| `playing, section, seconds = actor:montage_playing(name)` | |
| `sword:attach_to_socket(hero, "hand_r", x, y, z, pitch, yaw, roll)`, `sword:detach()` | sockets |
| `x, y, z, pitch, yaw, roll = actor:socket_transform("hand_r")` | a socket in the world |

Notifies and curves of a model's own clips (a footstep in a walk that came with the file) are kept in **Clip
Settings** (`.mclips`): pick the clip, add notifies at the preview's time, add curves. Name the file in the
Skeleton asset and every graph on that skeleton fires them.

### Skeleton (.mskel): sockets and virtual bones
The bone tree is on the left (with a search box); click a bone to see it in the preview. **Socket on this Bone**
adds a socket: a name, the bone, and a position / rotation offset; its place is the green mark in the preview.
To put something in a hand: select the thing in the level, **Add Component > Attach to Socket**, choose the
character as Parent and the socket (a bone's name works as a socket too), and tune the offset. It follows the
socket in the editor and in the game; its own scale stays.
A **virtual bone** sits where its target bone is, as seen from its source bone: a place for IK and for sockets.
**Clips** lists `.mclip` files (retargeted, mirrored or compressed clips) that are added to the model.

### IK Rig (.mikrig) and IK Retargeter (.mretarget)
An **IK Rig** says which bones are what: chains (Spine, Head, LeftArm, RightLeg ...) from a start bone to an end
bone, and goals that pull a chain's end. **Auto-Detect from Bone Names** reads Unreal mannequin names (`thigh_l`),
Mixamo names (`mixamorig:LeftUpLeg`) and Blender names (`thigh.L`); correct the table by hand for anything else.
Each chain has a colour in the preview. Pick a goal and move **Test Offset** to see the chain reach. A character's
foot IK uses the chains **LeftLeg** and **RightLeg**.

The **Retargeter** brings animations from one skeleton (Source Mesh) to another (the preview mesh):
1. **Auto-Detect Both Rigs**, then check **Chain Mapping**: each target chain takes the motion of a source chain.
2. If one character rests in a T-pose and the other in an A-pose, press **Align Retarget Pose**.
3. Legs have **IK** on: with Blend to Source at 1 the feet are as high over the floor as the source's (no floating
   or sinking when the proportions differ); at 0 the leg keeps the source leg's direction instead.
4. **Bake Clips**: tick the clips, choose keys per second and the compression, **Bake to .mclip Files**. List the
   files in the target's Skeleton asset (Clips) and its actors can play them.

### Mirror Data Table, Pose Asset, compression
- **Mirror Data Table** (`.mmirror`): the left / right bone pairs (found from the names). **Bake Mirrored Clip**
  writes a clip with the sides swapped; the Mirror node of a graph does it live.
- **Pose Asset** (`.mpose`): pick a clip and a time in the preview and **Capture** the pose under a name (a fist, a
  smile, a lean). The Pose Asset node lays each pose over its input by the parameter of the pose's name.
- **Compression** (Clip Settings, and when baking): keys that their neighbours already give within the tolerance
  are removed; **Frame Stripping** keeps one key in N first. The result says how many keys were kept.

### Physics Asset (.mphys): the ragdoll's bodies and joints
Choose a bone on the left: **Add a Body on this Bone** (or **Generate from the Skeleton** for all of them). A body is a
capsule (along its bone), a box or a sphere, placed in its bone's frame in metres (drag its white square in the
preview); its **mass** and damping. Its **joint** hangs it from the body above: **Swing 1 / Swing 2** (the cone it
swings in), **Twist Min / Max** about the **Twist Axis** (**Along the Body** sets it), **Touches its Parent**. **Never
Touches** lists the bodies it passes through (Generate fills it with the bodies that overlap at rest). **Simulate**
drops the ragdoll in the preview; **Push** shoves the selected body. Give it to a mesh in **Details > Physics and Root
Motion > Physics Asset** (**New** there makes one from that mesh's skeleton).

### Root motion
In **Clip Settings** pick the clip and tick **Enable Root Motion**: the preview then shows it in place, and the line
under it says how far the whole clip moves and turns. Then say where the character takes root motion from: the
graph's **Root Motion** (under its parameters) - **From Montages Only** (the default: an attack that lunges, a vault),
**From Everything** (the graph's own clips walk the character), **Ignore** (in place, nothing moves) or **No
Extraction** (the root moves in the pose, away from the capsule). An actor can choose its own in Details. While root
motion drives a character its input waits; the turn of a clip turns it.

### Sync markers, sync groups, inertialization
Give the gait clips **Sync Markers** in Clip Settings ("L" and "R" where each foot plants): a blend space then keeps
every sample at the same place between the same two markers, however differently the clips are timed. Put clip /
blend space nodes in the same **Sync Group** (a field of the node): the heaviest leads, the others follow it - a
state entered starts in step with the state it leaves. Tick **Inertialization** on a transition for a blend without a
crossfade (the old state stops at once; its difference fades out of the new pose).

### Control Rig (.mctrlrig)
**+ Control** adds FK, IK (Two Bone), Look At or Foot Placement; they are solved top to bottom (**Up** / **Down**).
Each has a **Weight**; IK and Look At have a **Target** in the model (metres, the feet at the origin), **Relative**
(an offset from where the animation puts the chain's end) or at a **Socket / Bone** (an offset in its frame). To
animate: choose a **Base Clip**, move to a time, set a control's value (or drag its square in the preview), **Key**;
**Bake to Clip** writes the base clip with the keys as a new clip. In the game, add a **Control Rig** node to the
graph after the locomotion; scripts set targets in the world with `actor:anim_control("Look", x, y, z)`.

### Motion Matching (.mposedb)
Instead of a state machine that says which clip plays, Motion Matching searches a **Pose Search Database** a few
times a second for the frame whose pose and whose path over the ground are nearest to what the character does and is
about to do, and jumps there (the jump is hidden by inertialization).
- **Make one:** Animation Editor > New > **Pose Search Database** (it starts with the preview mesh's feet, hips and
  locomotion clips). **+ Clip** adds a clip; each has **Tags** ("Stand", "Crouch"), **Loop**, the **Range** that is
  searched, a **Cost Bias**, and for a clip that runs in place (its root does not move) an **In-Place Speed** - the
  speed its path goes forward at (empty: the clip's own speed from its file) - and **In-Place Turn**. **Bones** are
  the bones whose place and velocity count (feet and hips are the usual), the **Trajectory** the points of the path
  that count (seconds before and after now: -0.33, 0.33, 0.66, 1.0) with their weights.
- **Build** works out the features of every frame and shows how many and how long it took; the slider shows a frame,
  its pose and its path (orange); **Try a Search** asks for a speed and a direction and shows the frame chosen, its
  cost and how many microseconds the search took. The game builds the same once and keeps it in the
  DerivedDataCache (`<user dir>/DerivedDataCache/PoseSearch`); a changed clip or database is built again.
- **Use one:** a graph's **Motion Matching** node (New > Animation Graph (Motion Matching on the ground, jump) makes a
  whole one). Its Details: the **Database**, **Search Interval**, **Continuing Pose Bias** (how much better another
  frame must be before it jumps: more = steadier), **Blend Time** (inertialization), **Tags** (only clips with these),
  **Play Rate Range** (an in-place clip plays faster or slower to match the speed), **Foot Lock** (a planted foot
  stays where it is, by two-bone IK on the IK rig's legs).
- **What it reads:** a character gives its capsule's velocity and the velocity its input asks for; the path ahead is
  predicted by a critically damped spring (and the facing turns to the movement - a first-person character keeps
  facing where it looks). Without a character the graph's `speed` and `direction` parameters ask (the editor's
  preview). Root motion: with the graph's Root Motion **From Everything** the clips' own move (or an in-place clip's
  speed) moves the character.
- **Lua:** `actor:set_motion_tags("Crouch")` (`""` = the node's own), `clip, time, cost, jumps = actor:motion_match()`,
  `actor:set_motion_input(x, y, z)` (the velocity asked for, for an actor no character movement drives).
- **Console:** `a.MotionMatching.Enabled`, `a.MotionMatching.Debug` (the paths in the viewport: asked for in green, the
  matched frame's in orange, the clip and cost over the head), `a.MotionMatching.BruteForce`,
  `a.MotionMatching.IntervalScale`, `a.MotionMatching.VelocityHalfLife`, `a.MotionMatching.FacingHalfLife`,
  `a.MotionMatching.ResetStats`; `stat motionmatching` (searches, microseconds a search, jumps, rows compared).
- **Third Person template:** its player has `Content/Animations/MotionMatching.manim` (the Mannequin's Idle, Walk,
  Run, Sprint in `MotionMatching.mposedb`), off: Details > Animation Graph > **Enabled** turns it on.

### What is not there yet
Morph target curves in montages, Deformers, Control Rig gizmos that turn (FK is set with numbers), root motion over
the network (a client's predicted pawn ignores it), physical animation (bodies that follow the animation by motors).

## Features (v0.18)

**Editor:** Unreal-style docked layout with these panels: Viewport, Place Actors, Outliner, Details, World Settings, Content Browser and Output Log. It also has:
- Move, rotate and scale gizmos with snapping
- Click-to-select with an orange outline
- Undo and redo
- Drag and drop from the Content Browser into the level
- Play In Editor (Alt+P, Esc to stop)

**Rendering pipeline (OpenGL 4.1):** depth/normal prepass, then forward PBR lighting with no overdraw.

**Shadows:**
- Sun: 4 cascaded shadow maps with stable fitting and texel snapping, blended between cascades
- PCSS soft shadows that harden at contact, set by the sun's source angle
- Screen-space contact shadows
- Point and spot lights: cube shadow maps

**Sky and lighting:**
- Physically based sky atmosphere (Rayleigh and Mie scattering, plus a multiple-scattering approximation). The sun colour comes from atmospheric transmittance, so sunsets are physically correct.
- Image-based lighting from the captured sky (GGX-prefiltered reflections and diffuse irradiance)
- Screen-space reflections

**Area lights:** point and spot lights take a Source Radius (spherical area lights):
- Sized highlights that conserve energy (representative point method)
- Contact-hardening PCSS cube-map shadows: a blocker search inside the light's footprint makes shadows sharp at contact and softer with distance, like real lamps

**Rect lights:** rectangular area lights (Unreal's Rect Light) for panels, softboxes and windows.
- Diffuse light is the exact irradiance of the rectangle (the polygon form-factor integral), so light wraps and fades like a real panel close up.
- Specular uses the point of the panel the reflection ray hits, with the lobe widened by the panel's size: glossy floors show a rectangular highlight.
- Contact-hardening cube-map shadows sized by the panel. One-sided: nothing is lit behind the panel.
- The glowing panel is drawn with the light's own radiance (Show Source).

**IES light profiles:** point, spot and rect lights take a photometric profile, the way real luminaires spread their light (wall scallops from downlights, the batwing of a street lamp).
- Built-in: Downlight, Spot Rings, Street Lamp, Wall Sconce, Bare Bulb and Diffuser.
- Real IESNA LM-63 `.ies` files are read from `assets/ies` and the project's `IES` folder; two sample files are included. Profiles are treated as rotationally symmetric (all horizontal planes averaged).
- The Details panel shows a polar candela plot of the chosen profile.

**Exposure and bloom (Unreal-style):**
- Eye adaptation meters a 64-bin luminance histogram, centre-weighted, and averages the 35–95 % band. A dark night sky or a small hot spot no longer swings the exposure.
- The bloom threshold applies to the exposed image. Wider bloom levels add progressively less, which gives a bright core with a faint halo instead of a haze.

**Sequencer (cinematics):** Unreal-style Level Sequences, edited in Window > Sequencer.
- Tracks for actors: location, rotation and scale keys with smooth auto tangents that never overshoot, a lens track for cine cameras (focal length, aperture, focus), a light intensity track, and event keys that call a function of the actor's Lua script.
- Camera Cuts: which cine camera films when. With Camera Cuts on, the viewport looks through them while you scrub.
- Scrub the ruler, drag keys (snapped to frames; Ctrl for free), Delete removes a key, right-click removes a cut. Selected actors show their motion trail in the viewport.
- Cine Camera actors have a physical lens (16:9 full-frame sensor): the focal length sets the field of view and drives depth of field. Place one from Cinematics and it starts at the current view.
- Auto Play turns a sequence into an intro cinematic: when the game starts, the game camera films through its cuts and the player waits. Jump skips it. Lua: `Engine.play_sequence(name)`, `Engine.stop_sequence(name)`, `Engine.is_sequence_playing(name)`.
- Render Movie writes every frame as a PNG to `Saved/Movies/<sequence>`.
- The demo level includes `Seq_Flythrough`: a crane over the plaza, a cut to a close-up in the lighting gallery, a hopping sphere and a breathing lamp.

**Reflection captures:** Box Reflection Capture actors render the lit scene into a GGX-prefiltered cube map array.
- Reflections are parallax-corrected by intersecting each reflection ray with the box, so interiors reflect their own walls instead of the sky.
- Captures blend at the box edges; smaller boxes take priority.
- They recapture automatically when geometry, lights or the sun change, and once more after the GI settles.
- The same reflections are used as the SSR fallback.

**Time of day and night:**
- The sun follows its real path for the latitude you set (35° by default) and the clock you set. Drag the clock in World Settings to light a level at any hour. Set a day length to make the clock run during play.
- After dusk the moon becomes the key light (with soft moonlight shadows), the sky becomes a dim moonlit sky, and procedural twinkling stars and the Milky Way appear.
- Fog dims with the light, and eye adaptation reaches further at night.
- Point and spot lights can be set to Night Only (street lamps switch on at dusk).
- Lua: `Engine.time_of_day()`, `Engine.set_time_of_day(h)` and `Engine.is_night()`

**"Maniac GI":**
- A dynamic multi-bounce GI probe grid that follows the camera, with toroidal updates and validity-weighted probes that resist leaking
- Screen traces (SSGI): short cosine-weighted rays are marched through the depth buffer at half resolution.
  - Where they hit, the lit colour of the surface replaces the probe light for that direction, which adds contact bounce and colour bleeding.
  - Temporal accumulation with reprojection and neighbourhood clamping, followed by a depth- and normal-aware upsample.
  - Bounce builds up over frames, because each frame traces the previous lighting.
- SSAO and specular occlusion

**Materials:** glTF base colour, normal map and packed occlusion/roughness/metallic textures. The tangent frame is computed per pixel, so no tangent data is needed.

**Decals:** Puddle, Cracks, Leaves, Dirt, Graffiti (the Maniac Lab M, sprayed, with drips) and Arrow.
- Each decal is a box that projects along its local Y onto any surface facing it, including landscapes and walls. They change albedo, roughness and normals.
- Puddles make the ground wet: darker, mirror-smooth and flat, so they reflect the scene through SSR and the reflection captures.
- Place them from Effects. Selected decals show their projection box.

**Starter Content materials:** Bricks, Concrete, Wood Floor, Metal Plate, Tiles, Marble, Gravel, Plaster and Asphalt.
- Each is authored procedurally as full PBR maps: albedo, a normal map from the height field, and cavity AO, roughness and metal maps.
- Your own textures: drop `.png` or `.jpg` files into `Textures/`. Companion maps named `*_normal` and `*_orm` are picked up automatically.
- World Aligned (triplanar) mapping with whiteout normal blending, so scaled meshes never stretch, plus Tiling and Normal Strength
- Content Browser → Materials shows real thumbnails. Drag a material onto any object in the viewport, or double-click to apply it to the selection.

**Post-processing:**
- TAA
- Eye adaptation (auto exposure)
- Bloom and screen-space light shafts
- Exponential height fog
- ACES tonemapping and vignette

**Cinematic lens (World Settings → Lens):**
- Physically based depth of field: the circle of confusion comes from the f-stop, the lens focal length and a 35 mm sensor. Auto-focus on the screen centre eases in like a focus pull, or set a fixed focal distance. Bokeh is gathered on a golden-angle spiral (scatter-as-gather), with near-field blur over sharp edges.
- Camera motion blur by reprojection, set by the shutter fraction (in Play mode and packaged games)
- Chromatic aberration and film grain

**Color grading (World Settings → Color Grading):** white balance (temperature in K, plus tint), saturation, contrast, gamma and gain. Grading is applied in scene-linear space before the filmic curve, as in Unreal.

**Volumetric fog:** a jittered, half-resolution ray march through the height fog, resolved by TAA and upsampled with depth awareness. It is lit by:
- The shadowed sun (cascades and cloud shadows)
- The sky
- Every point and spot light, with their shadows (visible light cones, glowing lamps)

It uses a Henyey-Greenstein phase function and energy-conserving integration. You can set the scattering distribution, albedo, extinction, view distance and local light scattering in World Settings.

**Gameplay scripting (Lua 5.4), the Blueprint equivalent:**
- Add a Script component to any actor. The script returns a table with `start()`, `update(dt)`, `on_player_enter(player)` and `on_player_exit(player)`.
- Its `properties` show up in the Details panel and can be overridden per actor, like exposed Blueprint variables.
- Built-in Script Editor (Window → Script Editor). Ctrl+S checks the syntax before saving, and hot-reloads into the running game during Play In Editor.
- Runtime errors appear in the Output Log with a traceback. A failing script is paused instead of spamming.

The scripting API:
- `self`: position, rotation, scale, translate, rotate, forward, destroy, set_visible, set_color, set_emissive, set_light, play_sound, add_impulse, launch, set_particles
- `Engine`: log, time, find, find_all, player, spawn, after (timers), hud, message, play_sound
- `Input`: down, pressed
- A shared `Game` table for game state
- Scripts are sandboxed: no file or OS access

Sample scripts: Rotator, Coin (pickup), JumpPad, LightSwitch and CoinGame (a game mode with a score HUD). The demo level is a small coin hunt built with them.

Place Actors → Gameplay has Coin, Jump Pad, Rotating Cube, Coin Game Mode and Empty Scripted Actor (which creates `Scripts/MyScript.lua` from a template). Static meshes can be set to No Collision. Scripts are packaged with the game.

**Audio (miniaudio):**
- 3D Ambient Sound actors with panning and a natural distance curve. Each one has an inner radius and a falloff distance, both shown as rings in the viewport.
- Looping or one-shot playback, with volume, pitch and Auto Activate settings
- Footsteps driven by the animation's heel-strike notifies. The sound matches the surface under the foot: grass on landscapes, hard floor elsewhere.
- Jump and landing sounds
- A built-in library of procedurally synthesised sounds (campfire, wind, water, fountain, birds, footsteps). It is generated by `tools/build_sounds.py`, so it needs no licences.
- Sounds folder in the Content Browser: double-click to listen, drag into the level to place
- Realtime audio toggle in the toolbar
- The automated test mixes offline and checks the levels

**Particle systems (Niagara-style presets):** Campfire (flames, smoke, sparks and a flickering shadow-casting light), Smoke, Sparks, Fountain, Snowfall and Magic. Particles render as soft, depth-faded billboards; flames and sparks blend additively and emit light, while smoke is lit and sorted back to front. You can place them from Place Actors → Effects and edit them in Details.

**View modes:** Lit, Unlit, Lighting Only, Maniac Mesh LOD, Wireframe, Normals, AO, Shadow Cascades and indirect light (GI).

**"Maniac Mesh" (step 1):** an automatic LOD chain for every mesh (meshoptimizer), picked by screen size, plus frustum culling. The stats overlay shows how many triangles this saves.

**Animation:**
- glTF skinning and morph targets (facial expressions)
- An Idle, Walk and Run blend space with phase-synchronised gait and playback matched to the character's real speed
- Idle variation
- Two-bone foot IK on stairs and slopes, plus lean into turns
- A human mannequin driven by CMU motion capture
- Ragdolls (physics animation, like Unreal's Physics Asset): 11 capsule bodies on the pelvis, chest, head, legs and arms, joined by swing-twist constraints with human joint limits (knees and elbows bend one way, the neck and shoulders have wider cones). Press R in Play to go limp and again to get up; characters also get up on their own after 4 s. The get-up blends from the pose the body landed in back to locomotion. Lua: `self:ragdoll(vx, vy, vz)` and `self:get_up()`.

**AI navigation:**
- When play starts, the level is sampled with physics ray casts into a walkability grid. Cells next to walls, drops and tree trunks are eroded by the agent radius.
- A* on the 8-connected grid avoids corner cutting, and paths are string-pulled into a few waypoints.
- AI pawns follow paths with turn-rate steering, arrival slow-down and speed-matched locomotion.
- Scripts can order moves with `self:move_to(x, y, z, run)`, `self:stop()` and `self:is_moving()`.
- Show → Navigation draws the walkable cells in Play mode, like Unreal's P view.
- New samples: Follower.lua (the demo fox follows you) and Patrol.lua (an AI guard walks between waypoints).
- Place Actors → Characters has Fox (follows player), AI Guard (patrol, with 4 waypoints) and Waypoint.

**Game UI for scripts (UMG-lite):**
- `UI.text`, `UI.rect`, `UI.bar` (health or progress bars) and `UI.button` (returns true when clicked)
- `UI.cursor(true)` releases the mouse for menus
- Coordinates are normalised to the screen. The same UI works in Play In Editor and in packaged games.
- The demo's coin hunt has a score panel and a win dialog.

**Trees and the foliage tool:**
- Procedurally grown Oak, Pine and Birch. Branches grow recursively with parallel-transport bark tubes and an automatic LOD chain, and use procedural tileable bark textures.
- Leaves are alpha-tested cards drawn from generated leaf and needle atlases. The mips are coverage-preserving, so distant trees don't go bald. Canopy normals make the crown shade as a volume.
- Leaves are lit by translucency (sunlight and sky through the leaves).
- GPU instancing in the shadow, depth and lighting passes. Wind sway follows a per-vertex bend weight, and leaves flutter.
- Per-instance LOD; trees also cast shadows from outside the view.
- Landscape Mode → Foliage brush: pick the species and density, Shift erases. You can also place single trees from Place Actors → Landscape.
- Each tree gets a trunk collider in play.
- The open world template grows forests: broadleaf woods in the valleys, pines on the heights, and clearings, keeping clear of the lake and the spawn point.

**Physics:** Jolt Physics, with:
- Rigid bodies and auto convex collision for static glTF props
- A character controller that walks stairs and slopes and pushes objects
- A spring-arm camera with collision

**Volumetric clouds:** a ray-marched cloud layer built from tiling Perlin-Worley noise. It moves with the wind and casts shadows on the ground and into the GI probes.

**Landscape:** a 256 m heightfield in LOD chunks with no cracks between them. It has:
- An automatic layered material: grass, rock on slopes, snow on peaks and painted dirt
- Sculpt, smooth, flatten and paint brushes (Landscape Mode)
- Triangle-mesh collision
- An "Open World Level" template

**Grass:** GPU-instanced grass on the landscape's grass layer. It is placed in camera-centred tiles, fades smoothly with distance, sways in the wind and lets sunlight through its blades.

**Water:** Gerstner waves with small surface ripples, plus:
- Refraction and depth-based absorption
- Screen-space and sky reflections with Fresnel
- Sun glints and shoreline foam

**Instanced Static Meshes (Unreal's HISM):** one glTF model drawn thousands of times in a few draw calls. Instances are grouped into 48 m clusters that are frustum culled, distance culled (Cull Distance) and LOD'd together, in the main view, the shadow cascades, local light shadows, GI probes and reflection captures. Each instance carries a tint. Collision: none, a triangle mesh per 64 m cell (houses, walls), or a trunk cylinder (trees). Material overrides per component: albedo texture (optionally projected in world space for meshes without UVs), alpha-tested cut-outs, colour scale, roughness.

**Vertex colours and paint masks:** glTF `COLOR_0` multiplies the base colour. The vertex alpha marks paintable parts: instance tints apply there, and a paint texture (siding, bricks) is projected in world space onto their vertical faces, like the Unreal kit material it was made for.

**Cut-out materials:** glTF `alphaMode` MASK is alpha tested in every pass (prepass, shadows, GI). The colour map gets coverage-preserving mips, so leaves don't thin out with distance.

**Textured landscapes:** a macro colour map over the whole terrain (Unreal's "macro variation") multiplied by a tiling detail texture per layer (two scales per layer so the repeat doesn't show, triplanar rock on cliffs). Per-layer roughness and an Unreal-style Specular input (matte asphalt instead of a wet-looking road). Any chunk size that divides the resolution (1009 x 1009 heightmaps work).

**Natural sky light:**
- Sky Light intensity (Unreal's SkyLight): how much the sky lights shadowed surfaces, applied to the irradiance and the GI probes alike.
- Ground bounce: the lower half of the sky capture takes the colour of the landscape around the camera, so snow fields lift the shadows and forests don't.
- Colour grading Shadows Gain and a Min Auto Exposure, matching Unreal's post-process settings.

**Game View (F11):** the viewport fills the window, without panels, icons, grid or gizmos.

**Characters:** the default mannequin is a robot built on the Mesh2Motion (CC0) human, with 19 retargeted clips. Capsule indirect shadows soften the sky light under characters.

**Imports:**
- *Import Godot Project* (File menu) rebuilds a Godot island (heightmap, biomes, trees, rocks, houses, roads) as a level.
- `tools/import_unreal_rawassets.py` rebuilds an Unreal Engine map from its RawAssets (heightmap, splat maps, JSON placement lists, glTF kits): landscape with a baked copy of the Unreal ground material, every house piece, prop and tree as instanced meshes, road markings, street lamps, sea, sun, sky and post-process.

**Package Project:** File > Package Project builds a standalone game folder containing the executable, assets, the level and `game.json`. The game starts straight into play mode, fullscreen, with Esc for the pause menu.

**Levels:** JSON `.mlevel` files in `Levels/`. Landscapes are stored compactly as base64.

## Credits

- Motion capture: CMU Graphics Lab Motion Capture Database (mocap.cs.cmu.edu), BVH conversion by Bruce Hahne. Free for any use.
- Mannequin body and animations: Mesh2Motion by Scott Petrovic (mesh2motion.org), art assets CC0.
- Robot model: Tomás Laulhé (Quaternius), CC0. Expressions added by Don McCurdy.
- Fox model: PixelMannen (CC0). Rigging and animation by @tomkranis (CC-BY 4.0), from the Khronos glTF sample assets.
- Third-party code licences are listed in `LICENSES/THIRD_PARTY.md`.
