Inconsistent FPS

Archives Forums/BlitzMax Bug Reports/Inconsistent FPS

Angus(Posted 2010) [#1]
I'm developing on an eeePC901 running WinXP SP3 with the latest version of BlitzMax.

When I run this code:

SuperStrict

SetGraphicsDriver(GLMax2DDriver())

Graphics(640,480,32,60,GRAPHICS_BACKBUFFER)

Local sms:Int=MilliSecs()
Local fps:Float=0
Local frms:Int=0

Repeat
    
    frms:+1
    fps=Float(frms)/(Float(MilliSecs()-sms)/1000.0)
    GLDrawText("FPS:"+String(fps),10,10)
    Flip(-1)
    glClear(GL_COLOR_BUFFER_BIT)
    
Until KeyDown(KEY_ESCAPE)

EndGraphics
End


I sometimes get 60fps and sometimes about 450fps, which is what I would expect (and indeed get) with Flip(0)

When I say Flip(1) I get similar results. This seems even odder as I'm sure that the eeePC only supports a 60hz refresh rate.

My Graphics Properties Information thing tells me I have a Mobile Intel(R) 945 Express Chipset.

I'm using this machine out of necessity, but the game I'm writing should run nicely on the hardware anyway. Is this chipset a known liability? Or what's going on!?

My game code itself behaved similarly. Though wierdly, and annoyingly, it seems to have settled into doing it wrong.

I know I should write delta time stuff but I really want that arcade smoothness and non-teariness.

I've run it dozens of times to convince myself that I'm not mad.

Last edited 2010

Last edited 2010

Last edited 2010


Angus(Posted 2010) [#2]
Also!

I get the same effect using the Max2DDriver or the GLGraphicsDriver.

I'm using GLGraphicsDriver in my game and need to for some of my effects. I don't need any of the Max2D commands.

Without setting the graphics driver, it goes to 60. I take it it's running DX by default? Would much rather use OpenGL obviously.

Owing to the wierd way I calculate my FPS, it only tends toward the true current framerate. Using either GL driver it either tends down to 60 or up to 450ish. Using the DX driver, it tends up to 60 from 0! Is this relevant?