Expand description
run and scene: the game started headless as the game’s options
say, a script of keys, controller buttons, actions by name and waits
played, and some frames more. run answers with the top screen, the frame as text, the
scene, what happened, the sounds asked for, the game’s log and its
modules; scene with the scene and the log. With --perf, run also
measures each frame and answers a summary of the times, and with
--perf-out writes every kept frame as a JSON line (super::perf);
where the heap is counted by memory tag, it takes a heap snapshot
before the script and one after the last frame, and answers what held
the heap and what grew. With --session, the game starts from a session
record instead (shuyi_platform::session), played to its end or to the
first frame this build plays differently, and the script goes on from
there.
Structs§
- RunInput
- What
runandsceneplay. - RunOutput
- What
runsaw. - Scene
Ask - What
sceneis asked for beyond the scene: one value of its data, by pointer, and its data’s shape. - Scene
Output - What
scenesaw.
Constants§
- MAX_
IDLE_ FRAMES - The most frames
framesmay ask for: about 28 simulated minutes. - NO_
SHAPE - The limit of
scene --shapeon a scene whose data has no shape.
Functions§
- ask_
scene outputansweringaskin place of its scene: the value at its path, and its data’s shape, with what the shape’s absence adds tolimits; or the problem code and why, a path that names nothing. With no scene, or nothing asked, it is left as it is.- check_
actions - Whether
session’s game can press every actionscriptnames: one with a key or a button (Session::actions). An error names the step and the game’s actions, before anything plays (run,sceneand MCP’sstepcall it). - keys
- A script of keys, for tests and callers that only press keys.
- limits_
of - What a run of
framesframes couldn’t show: the frames after the game asked to quit (on framequit), the frame if no screen isopen, and the scene, if there is none because ofno_scene. - parse_
args - Reads
run’s andscene’s arguments (not--json), the game’s startoptionsamong them. - perf_
out_ path - Where
--perf-out <path>writes:pathfrom the project’s folderroot, as the operating system takes it. - run
run: playsinputingame; a trace file (perf_out) is written from the working folder (run_atsays from where).- run_at
run: playsinputingame; a trace file (perf_out) is written from the project’s folderroot, as the CLI and the MCP server run it.- run_
output - What
sessionshows after its run, asrunanswers it, with its limits. - scene
scene: playsinputingame, and answers with the scene; a record is read from the working folder (scene_atsays from where).- scene_
answer - The answer
opgives withsession’s scene, askedask, and how far its record played,record: it passes if there is a scene and the record played no differently (differs). - scene_
at scene: playsinputingame, a record read from the project’s folderroot, and answers with the scene. It passes if there is one and a record played no differently.- scene_
output - The scene
sessionshows, assceneanswers it, with its limits. - scene_
output_ text - What
scenesaw, for people. - text
- What
runsaw, for people. - usage
- The usage of
run(andscene, ifopsays so), with the game’s startoptions.