Frame Per Second


FPS: Frame Per Second - (21.09.01)

FPS = Frame Per Second.
well... = how much frames are drawn to the screen in one second. this is a way to measure our frame rate. frame = each time you complete your final drawing to the screen before changing it. in RPGs, this will be drawing the map tiles, hero and npcs (non playable characters).

20 FPS means you drawn 20 frames (20 times the map to the screen) in one second.

how do you count FPS in QB ?
here's how: you probably have a DrawMap sub which draws the map + hero + npcs. so each time you use this sub, you count it and then every second, you check how much frames (DrawMap calls) did you count:

'main loop

'draw the screen

frames = frames + 1
'count that frame

if t$ <> time$ then
'check if t$ <> time$, did time change ? if so do the next things:

t$ = time$
'get the current time into t$

fps = frames
'we got our FPS

frames = 0
'so we can count it again in the next second

end if


thats about it for this FPS quicky

Tal Bereznitskey