# Changelog, part 3

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

- **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.
- **A 3D game has a car: `Vehicle`**: on an entity with a `Collider` and a dynamic `Body`
  it makes the body a car on four wheels, with springs, an engine and gears. A script
  drives it by writing `Vehicle.forward`, `right`, `brake` and `handbrake`, and reads
  `speed`, `revs`, `gear` and `touching`; `physics.wheels(car)` and `physics.read`'s
  `vehicles` say where its wheels are. A `Vehicle` in a 2D game, on a body that is not
  dynamic, without a `Collider` or made of what no car is stops the load, with what to do
  (`E0459` to `E0462`). A 3D game with physics that declares a component of its own named
  `Vehicle` no longer loads: give it another name. A 3D game without one, and every 2D
  game, is as it was, and no checksum moves.
- **`frost test` says a game with no recorded run apart: it has not passed**: a project
  with no `replay` was `ok: nothing to replay` and counted in `all passed`. Its line now
  starts `no recorded run:`, and the last line counts it apart (`tested 2 games: 1 passes,
  1 has no recorded run`); `all passed` is said only when every game has a run and held to
  it. The exit status is as it was, 0 unless one failed. `--json` adds `state` to each run
  (`"passed"`, `"failed"`, `"no_replay"`) and the counts `passed` and `no_replay` beside
  `failed`; a run's `passed` is still false only for a failure, so read `state`. A script
  that looked for `all passed` or `: ok:` sees such a game no longer match. No game changes.
- **A hand has a token of its own, and the engine holds it to the editor's mode**: the
  editor's `session.token {tag, mode?}` answers `{tag, hand, mode, file}` and writes a join
  file for that hand alone beside the session's (`PATH.handN`), which `frost mcp --join-file`
  takes. Whoever joins by it is that hand under any name, and `session.mode {hand, mode:
  "plan"}` refuses its writes (`E0447`) on every connection that came by its token, open
  or made later, until another mode lets it. A hand's token of another session is `E0458`.
  Nothing changes for a client of the session's own token or the read-only one, except
  that a name a connection says never joins a hand that has a token. No game changes.
- **`audio.requests` says the music playing now, and a restore puts the requests back**:
  `music: {name, since, paused}` or null, however long ago the music started. A game put
  back with `game.restore` has the requests (and `made`) it had at the snapshot, without
  those of the future it came back from, and the music then playing starts again, at the
  volumes (`sound.volume`, `sound.effects`, `music.volume`) set by then. No game changes.
- **A 3D game's `frame.capture` and `frame.view` answer `view_projection`**: the 16 numbers
  (column-major, world to clip) the picture's meshes were drawn with, so an editor puts a
  point of the world on the picture: after the divide, x and y from -1 to 1 span the whole
  picture, y up, depth reversed. `frost run --shot` and a held web player print it too. A 2D
  game answers no such key. No checksum or picture changes.
- **`project.remove {file}` removes any file of the game**: it leaves the project file's lists
  and is deleted, refused while anything else names it. `{kind, name}` still takes back a
  `project.add`. No game changes.
- **A step drawn again tells one picture**: `profile.steps` and `profile.frame` with `step`
  give a step's `draw_calls`, `quads`, `instance_bytes` and the renderer's other counters,
  and the time of its picture's spans (`render.build`, `gpu.submit` and the rest), as the
  last picture drawn of it took them, where they added every picture (a paused game
  captured three times said 10, 20, then 30 draw calls, and three pictures' time; now 10
  and one picture's time each time). `totals` adds one picture a step. The slowest steps
  and each script's share were never touched by it (the step's own time, the scripts'
  time). No game changes.
- **A load that cooked again says why**: `game.info` has `cooked`, `{fresh, cached, ms,
  why}`, with `why` one of `importers`, `files`, `first`, `off`; `frost` prints one line on
  stderr when a load, or the first frame, cooked something now and took over half a second. The cook's cache
  keeps an `importers` file beside its blobs; a tool that lists the cache folder finds it.
- **`project.refs {file}` lists every place that names a file of the game**: what an editor
  asks before it renames or removes one; a script's call whose file is made as it runs is
  listed as one that cannot be followed. No game changes.
- **A game writes its own full-frame effects in WGSL**: `[render] effects = { lines = {
  file = "lines.wgsl" } }`, run by a pass as `bright` or `panini` are, with the pass's
  `threshold` and `strength` (set each frame through `Pass`; an effect has no clock), at
  most 8, reading 1 or 2 targets. One that does not compile is refused at its own file and
  line when the game loads (`E0456`), with no device, so a check and an export for the
  browser refuse it too. The engine's five effects are now plain WGSL files written the same
  way, so a game can start from any of them, and each draws the same pixels as before. No
  checksum or picture changes; the engine's scan example is new.
- **The engine's sentences say "repository", not "git"**: `frost test`'s line and `reason`
  name "the game as committed (the repository's last commit …)" and "the folder is not a
  repository"; flags and docs that name the tool keep it. No game changes.
- **A thing under a parent takes its Opacity, and a new `Tint` part, from the things
  above it**: a whole rig fades or flashes with one write on its root. **What it does to a
  game:** one with `Opacity` on a thing that others are under now draws those others faded
  too (a parent at 0.5 over a child at 0.5 is drawn at 0.25); no checksum changes. The
  interface's `Inherit` is as it was. `Tint = { color }` is new. Known visible change:
  Scrap Riot's nine recordings keep their checksums, and of 3,750 frames compared 15 differ,
  in two cases (an entering robot's glow and hit-flash now fade in with it; Bolt's white
  flash now blinks with him), both what the original's own code does.
- **A saved test says which game it tests**: a top-level `test_of = "game.toml"`, which
  `frost test --write` writes, `frost test --json` and `frost projects` report and `frost check`
  holds to a project file beside it (`E0445`). Left out: game.toml. No game changes.
- **A run that draws nothing decodes no model picture**: a model's pictures are read and
  decoded when something is first drawn, not at load, so `frost test`, `frost bench` and a
  headless game load faster and smaller. A picture's header is still checked at load (a
  missing file, another format or impossible sizes are errors there and in `frost check`, as
  before); a picture whose body is damaged is now an error at the first frame, naming it.
- **A person's edits are told one by one**: in blame, each write a client makes is a run of
  its own (an edit and its undo are two), and a write made right after `blame.on` mid-game
  has the step the game stands at, not 0. No game changes.
- **An Accept can be undone**: `frost test --write` keeps the copy it replaces
  (`.frost/accepted/NAME.before`, one level), and `frost test --unaccept RUN.toml` puts it back
  once the run's project file is as it was. No game changes.
- **`frost check` warns of a `Pass` that gives its numbers to a pass that reads neither**
  (`W0457`): one on `copy`, `blur`, or a pass that draws changes nothing.
- **A model's pictures go to the device with every level, and their pixels are let go**:
  a picture a model is drawn with is uploaded with its smaller levels (so it does not
  shimmer drawn small), one at a time, and its decoded pixels are dropped once it is on the
  device; on a new device the model is read again from its file. A new picture no longer
  puts every other one on the device again. No checksum or picture changes.
- **`frost run --size` says when it replays a recording in another frame**: a recording holds
  the pointer as a share of the frame and is made in the project's frame, so a game whose
  scripts read `frame.size()` (to fit its camera) plays it as another game at another
  size. W0456 says so, with both sizes; leave `--size` out to replay it as it was made.
  A window of another size changes nothing: it shows the project's frame with bars.
- **`frost projects [DIR] [--json]` lists a folder's project files**: each with its space and
  how many scenes it lists, in the order `frost test` walks them. No game changes.
- **E0447 writes a text it names in quotes**: `world.set with entity "platform", path
  "a, b.luau" is refused`, each value as JSON writes it, so the sentence can be taken apart
  whatever a name holds. No game changes.
- **An exported game takes its own picture**: `frost_player --picture-at N --out FILE.png`
  plays the game's recording N steps, draws that step off-screen (no window ever opens),
  writes it as a PNG and prints how long the program took to its first frame ("started in
  0.21 s"). It is pixel-equal to what `frost run --shot` draws at that step on the same
  machine (the same pixels, not the same file).
  A player is 49,840 bytes larger for it.
- **A wide 3D view can be bent by the Panini projection, and a pass's numbers set each
  frame**: the effect `panini` bends what a pass reads by the Panini projection of distance
  `strength` (0 none, 1 cylindrical), the middle kept and the edges of a wide view pulled
  in, filling the frame. `Pass = { of, threshold, strength }` on one thing gives a pass
  its numbers this frame, so a script can turn a bloom up or the bend with speed; `E0449`
  (new): it names a pass the graph has not, or two give one. **What it does to a game:**
  `Pass` is declared in every game; no checksum or picture changes.
- **`game.info`, `game.check` and `frost check --json` answer `csharp`**: one field more for
  every client, null for a game with no C# script (and for every game of an engine built
  without C#, which is every released one). For a game with one it is `{solution, dotnet,
  compiler}`: the file a C# language server is started on, which the engine now writes
  itself whenever the game is loaded or checked, and the .NET and the compiler the engine
  uses. No game changes.
- **Who let a thing go is kept**: `blame.gone {name}` says which step the last thing of a
  name was despawned in and by what (a script's line, a client), or the scene change it went
  with and the line that loaded the next scene. No game changes.
- **`frost test --json`, `frost check --json` and `frost check --costs --json` say how long they
  took**: each answer carries `took_ms`, the engine's own time for the run in whole
  milliseconds. It is the one field that differs from run to run: a program that compares
  two answers leaves it out.
- **3D models are lit as their materials say**: in linear light, each part by its metal
  and roughness (a shine from the sun and the lamps), its normal picture, its occlusion,
  its glow, and a masked material's cutoff. A material's `fragment` function is handed and
  returns its colour in linear light. **What it does to a game:** every lit 3D picture
  changes (brighter falloff, shine on smooth and metal surfaces); no checksum changes.
  A glTF material that does not say its metal is metal, as glTF says.
- **A model's pictures download small on the web**: for the web and phone profiles (and
  `frost export web`) a picture inside a model is cooked packed, its level 0 as a PNG file
  (VTEX format 2), and its levels are made again when it is read, by the same function,
  byte for byte. The Spin Top hull cooks to 15.4 MB for the web where it was 69.8 MB;
  loading it takes about 0.2 s more natively for the picture it draws. The desktop
  profile is as before. Nothing a game draws changed.
- **A failed step says so**: `game.info` gives `failed_step` (the step a script's error
  stopped part way, null when the last step finished) and `whole`. No game changes.
- **`frame.capture {times: true}` says what the picture took**: `took: {draw, read,
  encode, text}` in milliseconds, the engine's share of a picture's way to a client.
  Without it the answer is as before. No game changes.
