Get Framerate Expression

New releases and general discussions.

Post » Sat Mar 13, 2010 5:14 am

When testing a game fullscreen, it would be incredibly useful to be able to retrieve the framerate as an expression to put in a small text object in the corner. I hear you can do this with events, but it would be easier as an expression.
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Post » Sat Mar 13, 2010 6:38 am

Couldn't you just tick "FPS in caption" in preferences, or just use timedelta?
Edit I see, you want for full screen, so timedelta it is.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sat Mar 13, 2010 11:00 am

Round(1/TimeDelta).
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Sat Mar 13, 2010 11:06 am

Or just count ticks every second.

+ Always
> Add 1 to global('FPS')

+ Every 1000 ms
> Set Text to global('FPS')
> global('FPS') = 0

That'll be the most accurate representation of FPS, because it counts actual frames.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest