![]() |
Blamite Game Engine - blam!
00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
|
#include "tick.h"
#include <iostream>
#include <string>
#include "components/core/events/events/Tick/TickEvent.h"
#include "components/core/events/events.h"
#include "components/diagnostics/crash/crash.h"
#include "components/diagnostics/logger/logger.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 | max_tickrate = 60 |
Maximum number of times doTick() should be run per second. More... | |
int | ticks_this_second = 0 |
Number of game ticks that have been run this second. More... | |
LARGE_INTEGER | last_second_time |
Timestamp of previous second/tick counter reset. More... | |
LARGE_INTEGER | clock_frequency |
The frequency of the CPU clock. Used in calculations for tick rate. More... | |
float | seconds_per_tick = 1.0f / float(max_tickrate) |
The number of seconds within a single tick. Usually much less than 1 second. More... | |
float | 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 | run_tick_loop = true |
Whether or not to continue running the game tick loop. More... | |
bool | pause_tick = false |
Whether or not to temporarily pause the game tick. More... | |
bool | has_tick_stopped = false |
Whether or not the game tick loop has terminated. More... | |
float checkElapsedTime | ( | ) |
void doTick | ( | ) |
Fires a #Blam::Events::TickEvent event to inform all listeners to update based on the game tick.
LARGE_INTEGER clock_frequency |
The frequency of the CPU clock. Used in calculations for tick rate.
bool has_tick_stopped = false |
Whether or not the game tick loop has terminated.
LARGE_INTEGER last_second_time |
Timestamp of previous second/tick counter reset.
int max_tickrate = 60 |
Maximum number of times doTick() should be run per second.
bool pause_tick = false |
Whether or not to temporarily pause the game tick.
bool run_tick_loop = true |
Whether or not to continue running the game tick loop.
float seconds_per_tick = 1.0f / float(max_tickrate) |
The number of seconds within a single tick. Usually much less than 1 second.
int ticks_this_second = 0 |
Number of game ticks that have been run this second.
float total_elapsed_time = 0.0f |
The total amount of time elapsed this second. Used to determine how many ticks have run this second.