Elaztek Developer Hub
Blamite Game Engine - Keystone  00345.11.30.21.1814.blamite
A library that enables the use of Qt in Blamite's editing tools.
tick.cpp File Reference
#include "tick.h"
#include <iostream>
#include <string>
#include <Strings/components/logger/logger.h>
#include "components/events/events.h"
#include "components/events/event_types/event_types.h"

Functions

float checkElapsedTime ()
 
void doTick ()
 Fires a #Blam::Events::TickEvent event to inform all listeners to update based on the game tick. More...
 

Variables

int editor_max_tickrate = 10
 Maximum number of times doTick() should be run per second. More...
 
int editor_ticks_this_second = 0
 Number of game ticks that have been run this second. More...
 
unsigned long editor_total_runtime_ticks = 0
 Number of game ticks that have been run during entire program execution. More...
 
LARGE_INTEGER editor_last_second_time
 Timestamp of previous second/tick counter reset. More...
 
LARGE_INTEGER editor_clock_frequency
 The frequency of the CPU clock. Used in calculations for tick rate. More...
 
float editor_seconds_per_tick = 1.0f / float(editor_max_tickrate)
 The number of seconds within a single tick. Usually much less than 1 second. More...
 
float editor_total_elapsed_time = 0.0f
 The total amount of time elapsed this second. Used to determine how many ticks have run this second. More...
 
bool editor_run_tick_loop = true
 Whether or not to continue running the game tick loop. More...
 
bool editor_pause_tick = false
 Whether or not to temporarily pause the game tick. More...
 
bool editor_has_tick_stopped = false
 Whether or not the game tick loop has terminated. More...
 

Function Documentation

◆ checkElapsedTime()

float checkElapsedTime ( )

◆ doTick()

void doTick ( )

Fires a #Blam::Events::TickEvent event to inform all listeners to update based on the game tick.

Variable Documentation

◆ editor_clock_frequency

LARGE_INTEGER editor_clock_frequency

The frequency of the CPU clock. Used in calculations for tick rate.

◆ editor_has_tick_stopped

bool editor_has_tick_stopped = false

Whether or not the game tick loop has terminated.

◆ editor_last_second_time

LARGE_INTEGER editor_last_second_time

Timestamp of previous second/tick counter reset.

◆ editor_max_tickrate

int editor_max_tickrate = 10

Maximum number of times doTick() should be run per second.

◆ editor_pause_tick

bool editor_pause_tick = false

Whether or not to temporarily pause the game tick.

◆ editor_run_tick_loop

bool editor_run_tick_loop = true

Whether or not to continue running the game tick loop.

◆ editor_seconds_per_tick

float editor_seconds_per_tick = 1.0f / float(editor_max_tickrate)

The number of seconds within a single tick. Usually much less than 1 second.

◆ editor_ticks_this_second

int editor_ticks_this_second = 0

Number of game ticks that have been run this second.

◆ editor_total_elapsed_time

float editor_total_elapsed_time = 0.0f

The total amount of time elapsed this second. Used to determine how many ticks have run this second.

◆ editor_total_runtime_ticks

unsigned long editor_total_runtime_ticks = 0

Number of game ticks that have been run during entire program execution.