b2dGetFPS

Category: 2D Overlay

Syntax:

b2dGetFPS:Int()


Parameters

None.



Returns

Int



Summary

Returns the current frame rate, in frames per second.

Takes no parameters.

Returns the number of frames presented during the last completed second — handy for an on-screen performance readout.

The value is updated once a second rather than smoothed every frame, so a figure printed on screen holds still long enough to read instead of flickering. It counts calls to b2dFlip, so a program that does not present frames reports 0.

View detailed documentation online



Example
b2dDrawText("FPS: " & ToString(b2dGetFPS()), 10, 10, False, font)

BambooBasic © 2026 Michael Denathorn