Table of Contents

Component Engine

(NOTE) Time space component controls time for a Space.

Methods Properties Base Classes Derived Classes
Step Dt component
Constructor DtOrZero
TogglePause Frame
GloballyPaused
MaxDt
MinDt
Paused
RealDt
RealTimePassed
StepCount
TimeMode
TimePassed
TimeScale

Properties


Dt : real

read-only

var Dt : Real

DtOrZero : real

read-only

var DtOrZero : Real

Frame : integer

The current frame we are on (starts at 0 and counts up for every frame that is run) This value counts up regardless of if the space is paused.

var Frame : Integer

GloballyPaused : boolean

read-only

var GloballyPaused : Boolean

MaxDt : real

The maximum amount of time we send when running in 'ActualFrametime' mode If this value is set too high and the user does anything to pause their system or the game (example grabbing the window) then a large frame time will be sent out and physics objects will jump very far (causing tunneling and random bounces)

var MaxDt : Real

MinDt : real

The minimum amount of time we send when running in 'ActualFrametime' mode Ideally this is set to a very small non-zero value to prevent any division by zero errors.

var MinDt : Real

Paused : boolean

If the time space is paused then we cease sending out logic update events When paused, the Dt will remain at whatever it was (it will NOT be set to 0)

var Paused : Boolean

RealDt : real

read-only

var RealDt : Real

RealTimePassed : real

var RealTimePassed : Real

StepCount : integer

Causes the engine to update multiple times before rendering a frame.

var StepCount : Integer

TimeMode : TimeMode

When set to fixed framerate the Dt/frame time will never change (it will send whatever the project frame-rate-limiter is set to) This means it is important to run with a frame-rate limiter of some kind otherwise the game will appear to run much faster/slower Note: For determinism, you should always run in FixedFrametime mode When set to actual framerate we will send out the real time that the engine is encountering (clamped by MinDt / MaxDt)

var TimeMode : TimeMode

TimePassed : real

var TimePassed : Real

TimeScale : real

Scale the speed of time for interesting effects like bullet time or fast paced gameplay. TimeScale is clamped to be positive.

var TimeScale : Real

Methods


Step : Void

Allows the engine to be advance one frame forward. Useful for debugging one frame at a time. |Name|Type|Description| |---|---|---|

function Step()

TimeSpace : Void

constructor

Name Type Description
function TimeSpace()

TogglePause : Void

Toggles the state of paused. |Name|Type|Description| |---|---|---|

function TogglePause()