Elaztek Developer Hub
Blamite Game Engine - Keystone  00390.07.02.23.1947.blamite
A library that enables the use of Qt in Blamite's editing tools.
BlamKeystone::Tick Namespace Reference

Namespace containing components relating to the editor tick. More...

Functions

BLAM void PrepareTick ()
 Prepares required data for the tick loop. More...
 
BLAM void TickThread ()
 Function containing the tick loop. More...
 
BLAM uint64_t GetCurrentTickRate ()
 Retrieves the current tick rate. More...
 
BLAM int MaxTicksPerSecond ()
 Retrieves the maximum number of ticks per second. More...
 
BLAM void ResumeTickLoop ()
 Resumes the tick loop if it has been paused. More...
 
BLAM void PauseTickLoop ()
 Temporarily pauses the tick loop. More...
 
BLAM void EndTickLoop ()
 Terminates the tick loop. More...
 
BLAM bool HasTickStopped ()
 Determines whether or not the tick loop has finished terminating. More...
 
BLAM bool IsTickLoopRunning ()
 Determines whether or not the tick loop is currently running - NOT whether it is paused. More...
 
BLAM void SetCurrentTickRate (int tickrate)
 Stops the editor tick, updates the tick rate, and re-starts the editor tick. More...
 

Detailed Description

Namespace containing components relating to the editor tick.

Similar to the game engine tick, this tick allows for periodic, routine tasks to be run consistently.

Function Documentation

◆ EndTickLoop()

void BlamKeystone::Tick::EndTickLoop ( )

Terminates the tick loop.

This should only be called at shutdown, as this will cause the tick thread to conclude as well.

+ Here is the caller graph for this function:

◆ GetCurrentTickRate()

uint64_t BlamKeystone::Tick::GetCurrentTickRate ( )

Retrieves the current tick rate.

Can be used to measure any potential performance losses.

Todo:
Calculate average TPS from past minute, as it currently just returns the ticks this second.
Returns
The average TPS (see todo message)

◆ HasTickStopped()

bool BlamKeystone::Tick::HasTickStopped ( )

Determines whether or not the tick loop has finished terminating.

Used to prevent premature editor shutdown while in the middle of proccessing a tick.

Returns
true if the tick loop has ended. Otherwise returns false.

◆ IsTickLoopRunning()

bool BlamKeystone::Tick::IsTickLoopRunning ( )

Determines whether or not the tick loop is currently running - NOT whether it is paused.

Returns
true if the tick loop is running, false if it has been stopped (or not yet started).
+ Here is the caller graph for this function:

◆ MaxTicksPerSecond()

int BlamKeystone::Tick::MaxTicksPerSecond ( )

Retrieves the maximum number of ticks per second.

Returns
The maximum TPS.

◆ PauseTickLoop()

void BlamKeystone::Tick::PauseTickLoop ( )

Temporarily pauses the tick loop.

Pausing the tick loop without stopping it entirely can be used in situations where you want to halt game simulation (in a pause screen while in singleplayer, for instance).

+ Here is the caller graph for this function:

◆ PrepareTick()

void BlamKeystone::Tick::PrepareTick ( )

Prepares required data for the tick loop.

+ Here is the caller graph for this function:

◆ ResumeTickLoop()

void BlamKeystone::Tick::ResumeTickLoop ( )

Resumes the tick loop if it has been paused.

+ Here is the caller graph for this function:

◆ SetCurrentTickRate()

void BlamKeystone::Tick::SetCurrentTickRate ( int  tickrate)

Stops the editor tick, updates the tick rate, and re-starts the editor tick.

Parameters
tickrate- The new tickrate.
+ Here is the call graph for this function:

◆ TickThread()

void BlamKeystone::Tick::TickThread ( )

Function containing the tick loop.

This is a blocking call and should only be run in a separate thread.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: