frames per second

Blitz3D Forums/Blitz3D Beginners Area/frames per second

Banshee(Posted 2004) [#1]
Hello guys,

In order to completely clutter this forum with my questions I wonder if anyone could help me with my latest stumbling block ? :)

My game runs at a capped 60fps but I have done the mathematics to work on the timer and i'd like to remove the cap and have it run at a few hundred fps so that the maths are more accurate.

Is Blitz locked to the refresh rate of my screen or can I break this cap ?

I have created the screen with:
Graphics3D 1024,768
SetBuffer BackBuffer()

I am using these commands to render the world:
RenderWorld
;2D stuff
Flip

Thank you in advance for any assistance given :)


CyberHeater(Posted 2004) [#2]
Flip [vwait]
Parameters
vwait = set to FALSE to disable frame syncing, defaults to TRUE which waits for vertical blank to finish


so if you set flip to false you will not be tied to the screen refresh rate.


Banshee(Posted 2004) [#3]
Aha, it's got parameters ! :) Cheers.


eBusiness(Posted 2004) [#4]
This will however mean that when the screen updates it will get a scrabling of two frames. Also you will probably need to lock the math rate to something but the processor, like:

timer=Millisecs()
While Not KeyHit(1)
  timer=timer+4
  ;do math
  If timer>Millisecs() Then
    RenderWorld()
    Flip True
  End If
Wend


This will set the math to do 250 iteration per second, and the graphics will run as fast as your screencard can make them run, but not faster that the update rate.