- Have a variable that holds the update interval. An interval of 3 means all the drawing stuff is done every THIRD frame
- If the game runs too slow, the player can set/change the interval value in the game options
Code:
do
Logic()
Draw()
loop
function Logic()
...
endfunction
function Draw()
inc cycle
if cycle < update_interval then exitfunction
cycle = 0
...
draw stuff etc.
...
sync()
endfunction
@Jesse
with your code, the higher the FPS, the lower the performance variable. That doesn't make sense. You need to calculate PerformancePercent = ( roundedFPS / 60 ), not vice versa.
Sorry, Bad Gateway while posting.