Unit Breakout.Types

Description

Value types, logical units and simulation budgets shared by the engine.

Source: src/Breakout.Types.pas (line 2).

Overview

Classes, Interfaces, Objects and Records

Name Description
Record TBall X/Y are the top-left of the bounding square; Size is the diameter.
Record TPaddle Logical bounds of a horizontal capsule.
Record TBrick One axis-aligned solid.
Record TGameConfig Physical dimensions/speed in logical units and seconds; paddle angles in degrees.
Record TGameSnapshot Detached state returned by TGame.Snapshot.
Record TSeededRandom Local deterministic LCG, independent of the global Random state.

Functions and Procedures

function GameStateName(State: TGameState): string;

Types

TGameState = (...);
TGameCommand = (...);
TBrickKind = (...);

Constants

LogicalFieldWidth = 688;
LogicalFieldHeight = 453;
FixedDeltaSeconds = 1.0 / 120.0;
MaxElapsedSeconds = 0.1;
MaxStepsPerCallback = 12;
MaxImpactsPerStep = 8;

Description

Functions and Procedures

function GameStateName(State: TGameState): string;

Stable diagnostic name, independent of player-facing translations.

Source: src/Breakout.Types.pas (line 95).

Types

TGameState = (...);

Explicit lifecycle; only gsPlaying advances through normal Step calls.

Values
  • gsReady
  • gsPlaying
  • gsPaused
  • gsLevelComplete
  • gsGameOver
  • gsVictory

Source: src/Breakout.Types.pas (line 13).

TGameCommand = (...);

Input intent, independent of keyboard bindings or VCL events.

Values
  • gcLaunch
  • gcRestart
  • gcTogglePause
  • gcDeactivate
  • gcDebugStep

Source: src/Breakout.Types.pas (line 15).

TBrickKind = (...);

Stable identities; scoring and sprite selection live in Breakout.Bricks.

Values
  • bkGreen
  • bkYellow
  • bkCyan
  • bkRed
  • bkSilver
  • bkGold

Source: src/Breakout.Types.pas (line 17).

Constants

LogicalFieldWidth = 688;

Shared logical field dimensions, independent of client pixels or DPI.

Source: src/Breakout.Types.pas (line 8).

LogicalFieldHeight = 453;

This item has no description.

Source: src/Breakout.Types.pas (line 9).

FixedDeltaSeconds = 1.0 / 120.0;

Simulation quantum: 120 steps per simulated second.

Source: src/Breakout.Types.pas (line 71).

MaxElapsedSeconds = 0.1;

Maximum elapsed time accepted by one loop callback; excess is recorded.

Source: src/Breakout.Types.pas (line 73).

MaxStepsPerCallback = 12;

Work budget against unbounded catch-up after a stalled callback.

Source: src/Breakout.Types.pas (line 75).

MaxImpactsPerStep = 8;

Collision-iteration budget; unresolved remaining time is discarded.

Source: src/Breakout.Types.pas (line 77).


Generated by PasDoc 1.0.4.