getFrameRate


(glitchCORD~) #1

hi,
is there a way of getting the framerate, you can display it up on the screen but id like certain things to happen when the framerate goes below say 30. i cant find it in the api but then i cant find setLogicticrate, it must be stored somewhere inside blender???/

thanks


(z3r0 d) #2

what kind of things?

how would you know that the low framerate isn’t caused by time consuming physics or logic instead of graphics.


(glitchCORD~) #3

my program freezes up every now and then, i dont know why it does it [think maybe too many vertices being set at once]but i like it, when it does this the frame rate drops from 100+ to below 20 and not much happens, when it does this i want to take a screenshot and send it to the printer- ive got code to do this.

is there a way of getting at the framerate info zero_d?


(z3r0 d) #4

there hasn’t been a way since blender switched to a fixed logic and physics timestep


(glitchCORD~) #5

is there a way to roughly calculate the framerate from some other functions in the GE, it’s really annoying that its there on the screen but we cant access it, :x
when the ge is running it says swap: 0.01 (90 frames per second), is this refering to a swap file/the size of a swap file? if so using python can you access the size of this file and determine the fps from this?

otherwise could you tell me which version you can access it in and how to go about it in that version,

cheers
:slight_smile:


(z3r0 d) #6

“swap” is the number of seconds that have passed since the previous frame

so 1/swap is the framerate [that’s why they’re displayed on the same line]


(glitchCORD~) #7

ok, so it looks like i cant go down that route, could you tell me which version i can get access to the framerate info i.e a version before blender fixed logic and physics timestep.
thanks


(Ben) #8

-Here are two examples I did, time before.
Hope these helps:
http://xoomer.virgilio.it/glabro1/FPS.zip
http://xoomer.virgilio.it/glabro1/FPS1.zip

there is a fps script which calculates the framerate
the game is running.

Ben


(glitchCORD~) #9

hi ben,
this looks great but im forbidden to access the files, could you upload them to somewhere else upload2.net works well for me. thanks a lot you may have just saved me a lot of hassle thankyou thankyou thankyou :smiley: :smiley: :smiley: can you tell me which version of blender these run in, cant wait to get at the files

cheers
will :smiley: very happy btw