Skip to main content

Module target

Module target 

Source
Expand description

Export targets as data (ADR-0008 §1): a TargetProfile says what a target’s display shows, how fast it runs, what the player can press, what a game may spend there, and which platform backend builds it. The engine’s profiles are the files of targets/ at the repository’s root (playdate.ron, steam-deck.ron, …); a game adds one, or overrides one by its id, with a file of its own. As a format (ADR-0007): TargetRon.

Every unit is an integer: pixels are u16, milliseconds u32, bytes and instructions u64.

Structs§

Budgets
What a game may spend on a target (ADR-0008 §6). A budget left out is not measured there yet.
Display
A target’s screen.
FrameRate
The frames a second a game holds on a target.
Input
What the player can press on a target (ADR-0008 §3).
Insets
Insets from each edge of a display, in device pixels.
Size
A screen’s size, in device pixels.
TargetProfile
One export target.
TargetRon
A target profile file (target-ron, .ron), read and checked as TargetProfile::from_source says.

Enums§

Color
How many colours a display shows.
Quit
How the player leaves a game on a target.
Status
Whether the engine runs on a target yet.