# Changelog, part 2

Part 2 of 7: [newer](../changelog.md) · [older](3.md).

- **A shipped game plays over a network**: `frost export desktop` gives a game with a
  `[net]` table a player with the `net` feature, which takes `--host [IP:PORT]` and
  `--join IP:PORT` (`--for SECONDS` with no window); a game without one is exported as
  before, with no network code. A peer the others dropped for silence ends with E0549
  ("the others played on without you from step N"). `net.condition` takes
  `cut_after_ms` and `cut_for_ms`.
- **Multiplayer, live**: `frost dev GAME.toml --host` and `--join IP:PORT` play a game
  with other windows at 60 steps a second; `frost run --headless --host|--join --seconds S`
  plays with no window. `net.desync` takes `entity`, `component` and `field`;
  `net.status`'s `desync` names who last wrote the value on each side (`written_here`,
  `written_there`) and `net.status` has `words`. the engine's `duel` example's `Match` has `travel`,
  so its checksums moved. No other game plays or sums differently.
- **Together copies**: `copy.make {of: [copies]}` makes a copy that shows those copies' changes merged on the game,
  never landed; it goes when one of them changes. The landing log keeps the texts of its most recent 256 landings.
- **`copy.diff`**: what a copy changed, or a landing wrote, line by line, bounded. The landing log keeps each landing's
  texts and stages, and each file's lines added and removed; an older log's entries are answered without them
  (`copy.diff` of such a landing is `E0551`).
- **Shared moments**: copies made from one moment of the game park with one moment between them until each moves;
  `copy.list` answers `shared`. Nothing a copy does changes.
- **Pages**: `copy.list` answers at most 100 copies unless `limit` says (`next` names where to go on), and
  `copy.events` at most 500 events (`limit`, `next`). A tool that read every copy in one answer asks again after `next`.
- **`copy.claim`**: a copy may claim scene things and files, advisory: everyone sees it, nothing is refused for it, a
  landing on a claimed thing says whose it was (`claimed`).
- **Cheap copies**: a copy's files are clones where the disk can (APFS), and its record keeps its base's texts once,
  shared by every copy, in `.frost/copies/.texts`: 20.8 KB a copy of Ballast against 766 KB. A record an older engine
  wrote (texts in it) is still read; one written now is not read by an older engine.
- **How a 3D pixel is lit**: `frame.at`'s `drawn` says each light's share of the pixel's light and why
  (`in shadow`, `faces away`, `out of its reach`, how far, and how far into a Sky's haze), worked out by
  the lit pass's twin on the CPU.
  No game behaves differently.
- **W0459**: `frost check` and `frost export web` say of a ground over 512 samples a side how much memory its mesh takes (about 80 MB at 1024). A warning only.
- **A ground is drawn in tiles**: 64 by 64 cells each, only those in view, each with every corner, every second or every fourth (the fewest that move it under half a pixel), 8 bytes a corner: a ground of 1024 samples a side holds about 12 MB on the device where it held 80 MB. `render.passes` counts a draw a tile. No world value, checksum or picture of a test game moves.
- **A ground is drawn in tiles**: 64 by 64 cells each, only those in view, each with every corner, every second or every fourth (the fewest that move it under half a pixel), 8 bytes a corner: a ground of 1024 samples a side holds about 12 MB on the device where it held 80 MB. `render.passes` counts a draw a tile. No world value or checksum moves; a ground's picture may differ by one level in up to about one pixel in a thousand from its one mesh's (each corner's normal is kept in two 16-bit numbers, and its x, z and uv are worked out on the device), so the ground test games' kept shots were taken again: ground climb 114 and end 114, evening late_morning 106 and afternoon 189, fields 168, lamps day 141 and night 57 pixels of 230,400, each by one level. Every other test game's shot is as it was.
- **W0459**: `frost check` and `frost export web` say of a ground over 512 samples a side how much memory its tiles take (about 12 MB at 1024). A warning only.
- **Night lamps**: `Light = { ..., night = true }` shines only as the Sky's sun goes down, of the picture alone (its `energy` stays as written). Off by default: no game behaves differently.
- **What a 3D pixel draws**: `frame.at` answers `drawn`, the thing whose triangle is drawn at the
  pixel (posed shapes too) with its part, triangle and material, whatever colliders are in front;
  `blame.pixel` names it in a 3D game, where it named nothing. No game behaves differently.
- **Pictures for an editor of posed things**: `frame.capture` draws a thing at a clip and time for one
  picture (`pose`), the bones of every posed thing (`overlay = "skeleton"`), the picture a seek to a
  step would show (`step`) and the one a `game.try` from a snapshot would show (`from`, `inputs`,
  `steps`), none moving the game; `assets.cooked` says a model's clips and bones and `game.info` the
  project's `poses`. Posing reads a column at a time (1,600 figures: 1.4 to 0.95 ms a picture). No
  game behaves differently and no checksum or shot moves.
- **Haze**: `Sky = { ..., haze = 20, haze_far = 80 }` fades the meshes into the sky's horizon colour from 20 to 80 units from the eye. Off by default: no game that says nothing draws differently.
- **`copy.list` for hundreds**: `{summary: true}` answers counts and groups with no rows; `{group, after, limit}` pages
  the rows and answers `next`. A list asked with none of them is as it was.
- **`copy.events`**: what a party did, in order: each copy made, working (with the things and fields it changed),
  asked to land, tested, landed, held, refused, queued, rebased, parked, given, dropped. Nothing changes for a game.
- **The landing queue**: `copy.queue` and `copy.flush` land many copies' changes in batches, each tested once, in the
  order asked; a batch that fails is halved down to the landing that fails. `copy.list` answers `queued`. `copy.land`
  is as it was.
- **`keeps_things`**: a Luau script may say at its top level which numbers it keeps in `state` are things,
  `keeps_things({ "bits.*.e" })`; a landing then holds them to the same things when an add moves them, as a C#
  `Thing` field already is. `frost check` plays the game's run and warns of a kept number that looks like a thing's and
  is not declared (`W0312`, with the line to add) and of a declared path that holds no thing (`W0313`). The templates
  declare theirs. The line keeps nothing: no checksum moves. A game with a global of its own named `keeps_things` must
  rename it.
- **A test of a change pairs things by name**: `frost test --says`, `change.test` and a landing compare the two games
  with each named thing matched by its name and the others by their order (or by slot when the change says
  `entities`); a change that only moved things to other slots (a thing added to a scene) no longer differs where it
  did not say, unless a script keeps a moved thing's number in `state`, which is compared as a number. A part may be a whole thing, `added_7`.
  `world.checksum` takes `paired`. No game plays differently and no recorded checksum moves.
- **A landing merges a scene by thing, part and field**: `copy.land` and `copy.rebase` merge a `.toml` file's
  things, parts and fields, so two copies that changed other fields of one thing (on one line, or lines that touch)
  both land where they were refused (`E0477`) before; the same field changed two ways is still refused, now naming
  the thing, part, field and both values (`data.clashes`). A part said may be one thing's, `ball.Transform.x`
  (`world.checksum`, `change.test`, `frost test --says`): nothing a game does changes, and no checksum moves.
- **The Sky's sun casts shadows**: `Sky = { ..., shadows = true, reach = 30 }` casts the sun's shadows as a sun `Light` with `shadows` does, moving with the time of day; a sun Light's shadows beside a Sky are not cast (its light was not used already). A ground casts and receives them as any mesh. No game that says nothing behaves differently.
- **Ground layers and questions**: a ground's `.ground.toml` may give up to four picture `layers`, by slope and height, and `ground.at` says their weights; scripts ask `ground.at(x, z)` (Luau) and `Ground.At(x, z)` (C#), the protocol's answer; an export ships a ground only as its cooked `.vgrd`, not its heights picture.
- **A person, a gait and a clip's events**: the engine's `figure/art/figure.gltf` example is a person of
  eleven joints with seven clips (idle, walk, run, sit, type, carry, wave) for a game to
  copy. `Gait = {}` beside a `Pose` plays idle, walk or run as fast as the thing goes over
  the ground, with no script. A project's `[poses]` names what a model's clip sends as it
  plays (`walk = { seconds = 1.0, events = [{ at = 0.25, name = "step" }] }`), read with
  `events("step")`. Posed things are cheap by the hundred: one pose a clip and step (every
  4 steps for a thing drawn under 64 pixels tall), worked out only for what the picture or
  the sun's shadow map sees. `Gait` is declared in every 3D game: one of a game's own of
  that name must be renamed. No recorded game moves.
- **A model plays its clips in a game**: a 3D thing with a `Mesh` and `Pose = { clip = "walk" }`
  plays the model's glTF clip (its nodes moved, its skin bent), with `speed` and a `fade`
  between clips, posed on the CPU the same bits in a browser and shadowed like any mesh.
  `Pose` is declared in every 3D game: a 3D game that declared a component of its own named
  `Pose` must rename it. The model importer (5) keeps a model's nodes, skins and clips in
  it (VMSH 3, a model with neither is written as before), so such a model is cooked again
  once. A clip's turns between keys are mixed and made one long (nlerp) where
  `assets.picture` turned them along the arc, which a picture between keys may show.
- **Multiplayer by rollback** (`docs/multiplayer.md`): a project file may have a `[net]`
  table (`delay`, `window`, `sync_every`), and the protocol has `net.host`, `net.join`,
  `net.run`, `net.condition`, `net.status`, `net.desync` and `net.leave`. A project file
  with a `[net]` table is refused by an older `frost`. No game plays or sums differently.
- **C# refuses the machine's clock and unseeded chance** as a script compiles (`VEN105`):
  `DateTime.Now` and its kin, `Environment.TickCount`, `Stopwatch`, `new Random()` with no
  seed, `Random.Shared`, `Guid.NewGuid()`. A script that read them did not replay; count
  steps or add up `dt`, and draw from `World.Random`.
- **A game in C# ships to the desktop**: `frost export desktop` of a game in C# compiles each
  script ahead of time (Native AOT) into `game/csharp/`, and the player runs it with no .NET;
  `--fetch` lets the one package that needs be fetched when the SDK has it not (`E0311`).
  Coldwave's second download, `-csharp`, has a `frost` with C# and desktop players that run it.
  A web export of a game in C# is refused, desktop only (`E0482`). No Luau game behaves
- **Shapes with no file**: `Mesh = { file = "box" }` (`sphere`, `plane`, `capsule`,
  `cylinder`) draws one of the engine's own one-metre shapes, sized by the thing's scale.
  Such a name was refused when the game loaded, so no game that loaded behaves differently.
- **A new game's first Accept takes its shots**: `frost test --write` takes each shot that
  has no picture kept yet and says so (`took shots/title.png (step 30), its first
  picture`), where it failed on them; a kept picture is never written over by it, and
  one that changed still fails for `frost check --shots --write-shots`. No game behaves
  differently.
- **What making a 3D game found**: a model's material with a glow colour and no glow
  picture (glTF's `emissiveFactor` alone) glows by that colour, as glTF says, where it
  was drawn with no glow at all. No checksum moves; such a model's picture does. A 3D
  game has `Follow`: `Follow = { of = "hero" }` on a camera keeps it behind the thing and
  looking at it, in front of walls, with no script (`back`, `up`, `aim`, `speed`, `walls`).
  No game that has none behaves differently.
- **Ground**: a 3D game has a `Ground = { file, color }` part, a height field read from a
  `.ground.toml` and a 16-bit grey PNG, cooked, drawn and asked with `ground.at`. A game
  with none is as it was. A 3D game that declared a component of its own named `Ground`
  must rename it.
- **Spot lights, a sun's shadows and a model's picture**: `Light = { kind = "spot", inner,
  outer }` lights a cone along its turn's -z (whole within `inner` degrees, out by `outer`;
  one of the eight lights a pass has, with the point lights). A sun with `shadows = true`
  casts shadows within `range` of the point `range` ahead of the Camera. `assets.picture`
  draws one model file alone, at a moment of one of its glTF clips, for an asset viewer;
  the model importer (4) keeps a skinned mesh's `JOINTS_0` and `WEIGHTS_0`, so such a model
  is cooked again once. `inner`, `outer` and `shadows` are left out of the checksum at their
  defaults: no recorded game moves and every game that asks for neither draws as before.
- **C# has the rest of Luau's API**: `Physics` (every question and push of Luau's
  `physics`, 2D and 3D), `Save`, `Data` (both as `Ven.Table`), C# libraries (a `.cs` file
  under `libraries`) and `OnRestore()`; `docs/csharp.md`'s table has no row left without C#.
  the engine's `csharp/` example holds Vigil, the car and the 3D questions in C#, each the Luau
  test game's world at every step. A push takes a `Vec2` or `Vec3` (`Physics.Impulse(crate,
  new Vec2(40, 120))`). `frost dap` debugs a game in C# through the person's own netcoredbg.
  No Luau game behaves differently.
- **C# scripts have Luau's API** (in a `frost` built with `--features dotnet`, which no
  release is): `World`, `Input`, `Events`, `Sound`, `Music`, `Scene`, `Frame`, `Tuning`,
  `Quat`, `Ui` and `OnScene` (`docs/csharp.md`). What a C# call changes is done when the
  script's step returns, in the order asked. A C# script's errors say their column, blame
  names its lines. A game in C# is refused in a sentence where there is no C# and by `frost
  export` (`E0482`); `frost test` passes over it in a `frost` without C#. No Luau game behaves
  differently.
- **A sky and the time of day**: a 3D game has a `Sky = { time, turn }` part, from whose
  time in hours the engine works out the sun's way, colour and strength, the sky's light
  and the sky's colours, drawn by a new kind of pass, `draw = "sky"`; a 3D game with no
  `[render]` whose scene gives a thing a `Sky` draws `sky`, `meshes`, `layers`. A game
  with no Sky draws and plays as it did, every checksum the same. A 3D game that declared
  a component of its own named `Sky` must rename it.
- **Copies' loose ends**: `copy.make {for}` for a tag whose hand works in another copy
  is refused (`E0480`, naming that copy) and makes nothing, as `copy.give` refuses it;
  it moved the hand into the new copy and left the other without one. `copy.land`
  holds each saved test of the game to what the copy said, on its own recording, and
  writes the run it now comes to in the same change, as it does the game's own: a saved
  test that held before a landing holds after it, where it failed until `frost test
  --write` was run on it; one that moves where the copy did not say holds the landing.
  `frost test --unaccept` after the game's first Accept takes the copy away with the
  folders that Accept made (it refused: nothing was kept from before), so Accept and its
  undo leave the game's folder as it was to the byte. `debug.stack` says each frame's
  `column` (the stop's for the innermost, the line's first code for the others), and `frost
  dap` sends it in its stack frames, where it sent 1. No game behaves differently.
- **Truths the editor asked for**: `blame.value {step}` answers who wrote a value as it
  stood at any step of the recording, blame on or off, and leaves the game where it was;
  every run of writes says `old_step`. A script's error says its `column` in `data`, and
  for a nil it indexed or called `nil` (`{name, how, key, also, since}`, `since` for a
  field of `state`); `debug.state` says `column` and `nil` of a stop. `render.passes`
  says each pass's `cpu_ms`, a measurement. `project.rename`, `project.refs` and the
  other `project.*` commands work for a game served by a bare file name (`frost serve
  game.toml`), which `E0464` refused. A picture renamed through `project.rename` keeps
  its recorded runs as a script does (`runs`), where it moved them. No game behaves
  differently.
- **A renamed script keeps its recorded runs**: `project.rename` of a script writes what
  each recorded run that held comes to under the new name (the game's and its saved
  tests', only the digits of each sum) and carries the game as accepted, in the same
  change `project.undo` takes back; the answer lists them as `runs`. A script renamed by
  hand still fails `frost test`, which now says it was renamed, naming both files, where it
  said the old name's `state` was not there. No game behaves differently.
- **Copies are kept**: a copy idle ten minutes, made room for when a seventeenth would be
  live, or asked with `copy.park` is parked (its game let go, one moment kept) and woken
  by the next command that reaches it; at most 256 are kept (`E0479`). `copy.give` gives
  a copy to another hand, and the one it had is refused (`E0480`). Copies' bases and the
  landing log are kept on disk (`.frost/copies/NAME.json`, `.frost/landings.json`), so a game
  served again finds its copies, parked, and numbers its landings on; a folder there with
  no record is listed and never reused (`E0481`). `copy.list` adds `held` and `moment`
  and lists parked copies; `copy.drop` no longer waits for a busy copy and answers
  `busy`; `copy.make` answers `parked`. A file that is a join file (an `address` and a
  `token`) is never copied into a copy. `change.test {folder | copy}` and `copy.land` add
  the stage `put_back`, which fails a change whose game, put back at a step, plays on
  another way (a `local` that keeps part of the game). No game behaves differently.
- **A copy lands**: `copy.land` merges a copy's changes onto the game line by line, tests
  them on the recording and writes them as one change `project.undo` takes back, with the
  run and the shots it changed accepted in the project file and `shots/`; `copy.rebase`
  puts a copy on what has landed; `copy.landed` is the log. New codes `E0477` (lines
  changed on both sides) and `E0478`. `change.test`'s `on.landing` and `copy.make`'s
  `base.landing` are now numbers (0 before any landing), not null; `copy.list` adds
  `landing`, `behind`, `busy` and `tests`, and no longer waits for a busy copy. A copy no
  longer gets the session's join files. No game behaves differently.
