Expand description
What the commands that run the game need from it: GameTools.
The shuyi binary knows no game. A game gives its tools in a program
of its own, which runs crate::main_with with them; shuyi.ron
names that program (crate::project::GameProgram) and shuyi runs
it with cargo run for the commands that run the game: frame-png,
lang-status, font-atlas (which keeps the characters the game’s text
uses; --no-text runs it without the game), and the contract’s
check, run, scene, replay, playtest, autobalance,
import and bake.
Structs§
- Autobalance
Plan - What
autobalancesearches on one of the game’s stages (GameTools::autobalance_plan): who plays it and how they are judged, as aPlaytestPlansays, and the stage it may change, its type the game’s (Tunable). The command picks the entrants asked for and runs the search (shuyi_core::autobalance_by), each setting’s tries played on every core and judged once. Build it withAutobalancePlan::newand assign the rest (ADR-0039). - GameArg
- A game option as given.
- Game
Audio - The audio a game ships on a target whose export bakes it
(
GameTools::audio). Build it withGameAudio::new(ADR-0039). - Game
Bake - What a game bakes into its pack (
GameTools::bake). Build it withGameBake::new(ADR-0039). - Game
Lang - A game’s languages, for
lang-status. Build it withGameLang::new(ADR-0039). - Game
Option - An option a game adds to
frame-png. Build it withGameOption::new(ADR-0039). - OneBit
Skin - A skin’s one-bit look (
GameTools::one_bit): its palette of roles and the pattern map beside it (ADR-0008 §4). Build it withOneBitSkin::new(ADR-0039). - Playtest
Plan - What
playtestplays on one of the game’s stages (GameTools::playtest_plan): its entrants, its checks, and how one try is played. The command picks the entrants asked for, plays their tries on every core, times them and judges them once. Build it withPlaytestPlan::newand assign the rest (ADR-0039). - Searched
- What
TunableStage::searchfound. - Tunable
- The stage an
AutobalancePlanmay change, of the game’s stage definition typeS: the command never seesS, only what the search found (TunableStage). Build it withTunable::new(ADR-0039).
Traits§
- Game
Tools - What a game gives the commands that run it. Only
frame-png’s andlang-status’s parts are required; a contract operation whose part a game leaves out answers that the game’s tools don’t offer it. - Tunable
Stage - A
Tunableof any stage type, asautobalanceruns it.
Functions§
- check_
start - Checks that the start options
startare ones the game offers (options): each names one, has a value if it takes one and has none if it takes none. Every operation that starts the game calls it first, whether the options came from the command line or from JSON. - code_of
- The problem code of
error, from aGameToolsmethod:codes::NOT_OFFEREDifis_unsupported, elsecodes::GAME_ERROR. - game_
arg - The game’s start option
flag, one ofoptions, with its value fromvalueif it takes one. - is_
unsupported - Whether
error, from aGameToolsmethod, isunsupported’s: the game left the method at its default. - run_
in_ game_ program - Runs
commandwithargsin the game’s tool program ofprojectand returns its exit code; 3 if there is none, or cargo doesn’t start (codes::PROJECT_FILE,codes::TOOLCHAIN). - unsupported
- What a game whose tools don’t offer
opanswers: they lack the methodmethod.
Type Aliases§
- Evaluate
- How the search has a setting played: given one try on the stage of
that setting (entrant index, seed, the turn it stops at) and the tries
to play, their report, judged.
autobalanceplays them on its threads. - PlayTry
- A plan’s one try (
PlaytestPlan::play): entrant index, seed, the turn it stops at. - Playtest
Checks - A plan’s checks (
PlaytestPlan::checks): given the names of the entrants that play, the checks over them. - Stage
Play - A
Tunable’s one try: the stage, entrant index, seed, the turn it stops at. - Stage
Write - A
Tunable’s writer: the files it wrote of a changed stage.