Header menu logo Mibo.Raylib

Program<'Model, 'Msg> Type

The Elmish program record that defines the complete game architecture.

A program ties together initialization, update logic, subscriptions, and rendering. Use the Program module functions to construct and configure programs.

Record fields

Record Field Description

AssetsBasePath

Full Usage: AssetsBasePath

Field type: string voption

Optional base path for asset loading. Set via Program.withAssetsBasePath.

Field type: string voption

Config

Full Usage: Config

Field type: (GameConfig -> GameConfig) list

List of configuration callbacks that transform the default GameConfig.

Each callback receives current config and returns a modified copy.

Field type: (GameConfig -> GameConfig) list

DispatchMode

Full Usage: DispatchMode

Field type: DispatchMode

Controls when dispatched messages become eligible for processing.

See DispatchMode.

Field type: DispatchMode

FixedStep

Full Usage: FixedStep

Field type: FixedStepConfig<'Msg> voption

Optional framework-managed fixed timestep configuration.

Field type: FixedStepConfig<'Msg> voption

HasInput

Full Usage: HasInput

Field type: bool

Whether the input service is enabled. Set via Program.withInput.

Field type: bool

HasInputMapper

Full Usage: HasInputMapper

Field type: bool

Whether an input mapper service is enabled. Set via Program.withInputMapper.

Field type: bool

Init

Full Usage: Init

Field type: GameContext -> 'Model * Cmd<'Msg>

Creates initial model and commands when the game starts.

Field type: GameContext -> 'Model * Cmd<'Msg>

Renderers

Full Usage: Renderers

Field type: (unit -> IRenderer<'Model>) list

List of renderer factories for drawing.

Field type: (unit -> IRenderer<'Model>) list

Subscribe

Full Usage: Subscribe

Field type: GameContext -> 'Model -> Sub<'Msg>

Returns subscriptions based on current model state.

Field type: GameContext -> 'Model -> Sub<'Msg>

Tick

Full Usage: Tick

Field type: (GameTime -> 'Msg) voption

Optional function to generate a message each frame.

Field type: (GameTime -> 'Msg) voption

Update

Full Usage: Update

Field type: 'Msg -> 'Model -> 'Model * Cmd<'Msg>

Handles messages and returns updated model and commands.

Field type: 'Msg -> 'Model -> 'Model * Cmd<'Msg>

Type something to start searching.