KernelAPI reference
Class RunOptions
Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Game lifecycle and time
Options shared by every launcher: scripted input, captures and run limits.
public sealed record RunOptions : IEquatable<RunOptions>Inheritance
Implements
Constructors
RunOptions()
public RunOptions()Properties
CaptureDirectory
Directory where script “capture” commands write PNGs.
public string CaptureDirectory { get; init; }Property Value
FirstFrame
Called once, right after the first frame is presented (the start screen, or the game’s first frame), from the loop’s thread. Phone hosts use it to keep the system’s launch screen up until the game has something to show.
public Action? FirstFrame { get; init; }Property Value
Graphics
The graphics options the run started with, after the launcher’s overrides (Screen starts from them); null uses Graphics.
public GraphicsSettings? Graphics { get; init; }Property Value
MaxUpdates
Stops after this many updates (0 = unlimited).
public long MaxUpdates { get; init; }Property Value
Mute
Sets the sound effect and music volumes to 0 after Load.
public bool Mute { get; init; }Property Value
PaceToDisplay
Whether real-time runs count elapsed time in refresh periods of the display that paces them
(IDisplayPacing), which removes the stutter of an irregular wake-up (true by default). False
takes every frame’s time as measured (the launcher’s –pacing measured), for comparisons.
public bool PaceToDisplay { get; init; }Property Value
Profiler
Measures every frame and the phases of the start (the launcher’s –profile), or null to measure nothing.
public FrameProfiler? Profiler { get; init; }Property Value
Script
Scripted input to play, or null for none.
public InputScript? Script { get; init; }Property Value
Seed
Seed for Random (1 by default).
public int Seed { get; init; }Property Value
StartScreen
Whether the game’s start screen (StartScreen) is drawn while it loads, for runs whose time mode (TimeMode) is not deterministic and games whose identity keeps it on (true by default).
public bool StartScreen { get; init; }Property Value
StateTrace
Receives the simulation state hash after every fixed step (ComputeStateHash), with each section’s hash when Sections is true; null (the default) hashes nothing. Two deterministic runs of the same build, script and seed record the same trace; FirstDivergence names the first update and section where two differ.
public StateTrace? StateTrace { get; init; }Property Value
TimeMode
How the loop advances time (the launcher’s –time): RealTime with the wall
clock, or Deterministic, one fixed step per frame. It wins over the game’s
Configure; null (the default) keeps the game’s choice, else the composition’s
RunPreset (the headless platform’s: deterministic), else real time. Nothing a platform does depends on
the mode: it belongs to the loop only.
public TimeMode? TimeMode { get; init; }Property Value
Methods
<Clone>$()
public RunOptions <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(RunOptions?)
public bool Equals(RunOptions? other)Parameters
other RunOptions?
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(RunOptions?, RunOptions?)
public static bool operator ==(RunOptions? left, RunOptions? right)Parameters
left RunOptions?
right RunOptions?
Returns
operator !=(RunOptions?, RunOptions?)
public static bool operator !=(RunOptions? left, RunOptions? right)Parameters
left RunOptions?
right RunOptions?