- // TODO the main run loop needs to be tested and pruned
- if (iupdate_sum > 0)
- {
- // Calculate a time step that spreads the updates out as much as possible
- // used because really quick updates are nearly wasted
- float time_step = ((float)(start - last_Block_Update)) / iupdate_sum;
-
- // run the updates
- for (int i = 1; i <= iupdate_sum; i++)
- {
- handleInput();
- update(time_step*i / 1000);
- }
- // remove the updates that where run from the sum
- update_Sum -= iupdate_sum;
- last_Block_Update = tickCountMicro();
- }