Trace Engine
A Raycaster Engine in C
Loading...
Searching...
No Matches
Tom_Engine.h File Reference
#include "log.h"
#include "app_input.h"
#include "graphics.h"
#include "trigonometry.h"
#include "trc_camera.h"
#include "trc_random.h"

Go to the source code of this file.

Functions

void app_init (void)
 
void app_update (const float delta_time)
 
void app_close (void)
 

Function Documentation

◆ app_close()

void app_close ( void  )

This is the last called function before closing the window and all that, here you should put free if you called a malloc or save files

◆ app_init()

void app_init ( void  )

This is where the first things you want to happen in your game should be: initialize structures, maps, players, do your mallocs, everything that happen only once and at the start of the game should be here

◆ app_update()

void app_update ( const float  delta_time)

This function is called every frame, so if you want some structure to update, or get a current key state, or redraw the window to show a menu, should be here

Note
If something updates position (like the player or an entity) you also should multiply that distance by delta_time (the difference in time between the last frame and the current one)