# Changelog, part 4

Part 4 of 8: [newer](3.md) · [older](5.md).

- **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.
- **Copies of the game, one per agent**: `copy.make`, `copy.list` and `copy.drop` make,
  list and drop a copy of the game in `.frost/copies/NAME/` beside the project file, played
  in the same engine on a thread of its own; a hand made for it (`copy.make {for}`) acts
  in it with every command, and the session's owner names one with `copy: NAME` on any
  command. `change.test {copy}` and `with: [{copy}]` test a copy's changes. New codes
  `E0473` to `E0476`. With `before` alone, `change.test` now lists the game's own changed
  lines in `hands`. No game behaves differently.
- **`change.test` tests a folder of changed files with no repository**: `change.test
  {says, folder}` plays the folder's files over the served game's beside the game's own,
  on its recording, and holds the run to what it said as `frost test --says` does; `with:
  [{folder}]` plays other changes under it on both sides (two that pass alone, together),
  and `before: {folder}` holds the files on disk to a whole game kept in another folder.
  Its answer adds `stages`, `steps`, `on`, `hands` and `ms`; with a folder `says` may be
  empty, and a folder it cannot test is refused (`E0472`). Without `folder` and `before`
  it is as it was. No game behaves differently.
- **`project.remove {file}` has two ways through, and is undone**: `maybe: true` removes a
  file although places that only may name it remain (a script's call whose name is made
  as it runs; the answer lists them as `maybe`), and `unlist: true` takes its name out of
  the project file's other keys and lists in the same change (`recording = "run.toml"`),
  refused in words for the start scene and where the game would not load. A file's remove
  is now a change `project.undo` takes back and `project.redo` makes again: the file is
  moved into `.frost/removed/N/` beside the game (answered as `kept`) and no longer
  deleted outright; delete that folder to let it go. `project.refs` gives each place
  `why`: `"made"` for one not followed, else null. No game changes.
- **A `Collider` is as large as its thing's scale makes it**: its shape is its written
  size times the thing's scale in the world (`Scale` in 2D; `sx`, `sy`, `sz` in 3D; its
  own times its parents'), at the load and whenever the scale changes, for bodies,
  sensors, movers, tilemaps and a car's body, and in `physics.read`, the overlay and a
  pick. It was the written size whatever the scale, so a crate drawn double collided at
  its old size. A circle, sphere or capsule scaled unevenly (a cylinder: unevenly along x
  and z), and any collider scaled by 0, is refused (`E0471`) at the load, at the next
  step and at a `world.set`; below 0 mirrors. A changed scale makes the body again
  (`contact_end`, then `contact`), its mass following its size. To keep the old size,
  divide `w`, `h`, `d` (or a polygon's `points`) by the scale, or put the `Collider` on a
  thing that is not scaled and what is drawn on a thing under it; do the second for a
  picture whose scale a script or a tween changes. A recorded game with a scaled collider
  moves its checksum; none of the engine's did.
- **An eye's picture is the size asked, and an eye can have no perspective**: with `eye`,
  `frame.capture`'s `width` and `height` are the picture's size, exactly (1 to 4096 each,
  the frame's where left out), where before they shrank the frame's own shape to fit; its
  `view_projection` has that shape, with fov held from bottom to top; and `frame.at`,
  `frame.in` and `frame.view` take the same `width` and `height` with an eye (refused
  without one). `eye.ortho`, in place of `fov`, is a picture with no perspective, that many
  world units from bottom to top. An eye's capture now says `view: null`, and an eye with
  `target` is refused in words. Without an eye every answer is as it was.
- **A 3D pick says the part of the model, and a pass says its draws**: a `frame.at` hit of
  kind `Mesh` has `part`, `{index, mesh, primitive, material, point, distance}` for the
  first triangle the ray meets, or null where it is in the model's box and meets none (and
  null for a `Collider`); `render.passes` gives each pass `draw_calls`, the draws it made in
  the last picture drawn, null before one. Both are new keys; no game changes.
- **A 3D game is looked at from an `eye`**: `frame.capture`, `frame.at`, `frame.in` and
  `frame.view` take `eye: {at: [x, y, z], turn: [x, y, z, w], fov?, near?, far?}` and draw,
  pick and measure the game from there in place of its `Camera`, for that answer only; the
  answer's `view_projection` is the eye's. What the layers draw (a HUD) is left out of such
  a picture and its hits. Nothing of the game changes and no checksum moves. `E0449` now
  says both refusals: a `view` in a 3D game, and an `eye` in a 2D one. `blame.pixel` takes
  no eye.
- **`graph.uses {kind: "clip", name}` says who plays a clip**: the `[clips]` key that
  declares it, each scene thing whose `Clip` starts with it, and each script line that sets
  a `Clip`'s `name` to it or spawns a thing with it, the name written out. A name that
  comes through a variable is not found. No game changes.
- **A `Collider` with no `Body` under a parent is held where its parents put it**: in 2D
  and in 3D the physics held such a collider at its own `Transform` read as a place in the
  world, away from where it is drawn. It now stands where `Parent` puts it, turned with its
  parents, and goes with them each step; its size is still not scaled. A game that relied
  on the old place puts the thing under a group (an entity with no `Transform`) or under
  nothing. A `Body` or `Mover` under a placed parent is refused as before (`E0455`). A
  recorded game with such a collider may move its checksum; none of the engine's did.
- **`frame.at` and `frame.in` answer for a 3D game's things**: `frame.at {x, y}` now also
  lists each thing the ray through the pixel meets, the nearest first, by its `Collider`
  (box, sphere, capsule, cylinder) or else the box around its `Mesh`'s model, with
  `projected: true`, the `point` met and its `distance`; `frame.in` each thing whose box,
  as the camera projects it, touches the box asked. A 3D game's answers were only what its
  layers draw, and those hits are as they were, in front. A 2D game's answers are the
  same bytes, and no checksum moves. `blame.pixel` is as it was.
- **`project.rename` renames a file of the game with every name of it, and `project.refs` lists more**:
  `project.rename {from, to}` moves one file and writes the new name over the old in the
  project file, the saved tests, the scenes, the files of values and the scripts, each where
  it stands and in the spelling it had, as one change `project.undo` takes back byte for byte
  and `project.redo` makes again (`E0463` to `E0470` say why not, with what to do). No game
  changes until it is asked. `project.refs` now also lists a plain string in a script or in
  a `data` file that is the file's path, and a name spelled another way (`./art/hero.png`), so
  `project.remove {file}` refuses a file such a string names; a `data(...)` whose argument is
  made as the script runs now counts only against a `.toml` file. A planning hand's refusal
  (`E0447`) says `from` and `to` among what was tried. No checksum moves.
