- /* time for a new logical frame? */
- if(elapsed_ticks > TICKS_PER_FRAME) {
- elapsed_ticks -= TICKS_PER_FRAME;
- float timestep = 1.0 / LOGICAL_FPS;
- real_time += timestep;
- timestep *= speed;
- game_time += timestep;
-
- process_events();
- update_gamelogic(timestep);
+ if (elapsed_ticks > TICKS_PER_FRAME*4) {
+ // when the game loads up or levels are switched the
+ // elapsed_ticks grows extremly large, so we just ignore those
+ // large time jumps
+ elapsed_ticks = 0;