Table of Contents

Class GameLoopConfig

Namespace
Gloam.Runtime.Config
Assembly
Gloam.Runtime.dll

Configuration for the roguelike game loop execution (input-driven, real-time rendering)

public sealed record GameLoopConfig : IEquatable<GameLoopConfig>
Inheritance
GameLoopConfig
Implements
Inherited Members

Properties

HandleTimingInExternalMode

When LoopMode is External, this defines whether the loop should handle timing internally If false, external timing management is expected (default: true)

public bool HandleTimingInExternalMode { get; init; }

Property Value

bool

KeepRunning

Function that returns true while the game should continue running

public required Func<bool> KeepRunning { get; init; }

Property Value

Func<bool>

LoopMode

Defines how the game loop should be managed (default: Internal)

public LoopMode LoopMode { get; init; }

Property Value

LoopMode

RenderStep

Gets the rendering step interval calculated from TargetFps

public TimeSpan RenderStep { get; }

Property Value

TimeSpan

SleepTime

Sleep time between loop iterations when no rendering is needed (default: 5ms)

public TimeSpan SleepTime { get; init; }

Property Value

TimeSpan

TargetFps

Target frames per second for rendering (default: 60 FPS)

public double TargetFps { get; init; }

Property Value

double