Scripts / [SOLVED] Frames per second in the script

Author
Message
stv238
7
Years of Service
User Offline
Joined: 23rd Mar 2017
Location:
Posted: 15th Apr 2020 13:45
Hello, how can I get the current number of frames per second as a value for the script, and whether it can be done at all?

The author of this post has marked a post as an answer.

Go to answer
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 15th Apr 2020 14:33
This post has been marked by the post author as the answer.
Ah, good point. I've been meaning to do this- so good excuse to write up this
pretty easy script now!

It's running about 2 frames above what the TAB panel shows...?

local ggtime = {}
local ggframes = {}
local ggfps = {}
local checktime = {}
function fps_ingame_init(e)
ggtime[e] = 0
ggframes[e] = 0
ggfps[e] = 0
checktime[e] = 1
end
function fps_ingame_main(e)
if checktime[e] == 1 then
checktime[e] = 0
ggtime[e] = GetTimer(e)
ggframes[e] = 0
end
ggframes[e] = ggframes[e]+1
if GetTimer(e) > ggtime[e] + 1000 then
ggfps[e] = ggframes[e]
checktime[e] = 1
end
TextColor(22,22,3,"GubbyBlips GG FPS: "..ggfps[e],255,ggfps[e],ggfps[e])
end


PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 15th Apr 2020 15:50
The tab panel is actually quite a bit different to the real FPS because the panel itself is a huge FPS drain, the most accurate FPS counter in GG is in the F11 options, press F11 twice and the FPS will display in the top left corner of the game.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.

Login to post a reply

Server time is: 2024-03-28 14:10:55
Your offset time is: 2024-03-28 14:10:55