Coldwave Read the docs

Protocol: events#

The events commands a program sends to a running game, as the engine describes them: what each takes, what it answers and what it does. Back to all commands.

events.read#

events.read {name?: text} -> {step: integer, events: [record]} · read, read-only

Reads the events the last step sent. They stay readable until the next step starts.

ParametersTypeMeaning
name?textOnly events with this name. Left out: every event.
ResultTypeMeaning
stepintegerHow many fixed steps have run.
events[record]One {name, entity, other, value} per event, in the order sent. entity, other and value may be null; other is the second entity of a contact or a sensor event.

events.since#

events.since {step?: integer, after?: integer, name?: text, to?: integer, against?: text, run?: text} -> {step: integer, from: integer, made: integer, events: [record], against: text, run: text} · read, read-only

Reads the events of every step after a given one, each with its step: what was sent during a game.step of many steps or a game.try. The log is of one line of time: game.reset starts it again at step 0 and game.restore at the snapshot's step, and it keeps the latest 65536 events.

ParametersTypeMeaning
step?integerEvents of steps after this one are returned: pass the step of the last answer you had. Left out: every event the log keeps.
after?integerOnly events whose n is greater: pass the made of the last answer you had to get each event once, whatever the step. When made comes back smaller than the one you hold, the log was started again (game.reset, game.seek that loaded, game.restore): start from 0.
name?textOnly events with this name. Left out: every event.
to?integerOnly events of steps up to this one. Left out: up to the step the game is at.
against?text"accepted": the events of the game as it was last accepted (frost test --write keeps it in .frost/accepted beside the project file), played aside from its own files on the recording from step 0 to to (left out: the step the game is at): what a timeline draws as the accepted run's events beside the ones now. The game being served is not touched. Left out: the game's own log.
run?textAnother of the game's recorded runs, read in place of the game's own: a project file with a replay in the game's folder, named from it with / as frost test lists them (tests/jump.toml), played aside from step 0 on its own recording. With against, that run as accepted. The game being served, and the run it plays, are not touched. Left out: the game's own.
ResultTypeMeaning
stepintegerHow many fixed steps have run.
fromintegerThe step the answer starts after: the one asked for (0 when none was), or a later one when the log does not go back that far.
madeintegerHow many events were sent since the log was started: the n of the newest.
events[record]One {n, step, name, entity, other, value} per event, in the order sent. n counts the events from 1. step is how many steps had run when the step that sent it ended, as events.read would have said it.
againsttext"accepted" when the events are of the accepted game, else null.
runtextThe run asked, as it was named; null for the game's own log.

Generated from Coldwave 0.0.1 r289, 2026-11-30 by the binary itself: do not edit by hand.