|
1 registered members (Grant),
999
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
FPS
#158756
10/05/07 06:54
10/05/07 06:54
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
OP
Serious User
|
OP
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
Hi! I'm looking for a variable in which the current FPS is saved, but I couldn't find any. Can somebody please tell me the name of this variable? Thanks!
Dark_Samurai
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: FPS
[Re: Dark_samurai]
#158757
10/05/07 07:31
10/05/07 07:31
|
Joined: Apr 2005
Posts: 2,332 Germany, BaWü
aztec

Expert
|

Expert
Joined: Apr 2005
Posts: 2,332
Germany, BaWü
|
As far as I know this doesnt exist but I got an easy script wich calculates the current fps Code:
var frames = 0; var exact_frames = 0;
function get_frames() { while(1) { frames +=1; wait(1); } }
function get_frames2() { while(1) { exact_frames = frames; frames =0; wait(-1); } }
Just call the functions in the main and create a panel with digits that show hte exact_frames. Regards Aztec 
Visit: schwenkschuster-design.de
|
|
|
Re: FPS
[Re: aztec]
#158758
10/05/07 09:42
10/05/07 09:42
|
Joined: Jan 2007
Posts: 1,619 Germany
Scorpion
Serious User
|
Serious User
Joined: Jan 2007
Posts: 1,619
Germany
|
i am not sure if i remember right, but i think there was something like this to get the fps: Code:
while(1) { framesPerSec *= 0.9 + 0.1*time_step; wait(1); }
edit: ok, his method is 100 times better X/
Last edited by 5c0rp10n; 10/05/07 09:47.
|
|
|
Re: FPS
[Re: Scorpion]
#158759
10/05/07 12:45
10/05/07 12:45
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
OP
Serious User
|
OP
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
Thanks for your quick replaies! @aztec: Thanks for the code, it works perfectly! @5c0rp10n: Also thanks for the code, but it doesn't work. Because when declairing framespersec, framespersec = 0 and when you multiply something with it, it will stay 0. So should I use 1 as startvalue?
Dark_Samurai
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: FPS
[Re: Dark_samurai]
#158760
10/05/07 12:57
10/05/07 12:57
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
you can make it easier: Code:
Font arial1_font="Arial",1,20;
panel fps_pan { layer = 5; flags = overlay,refresh,visible; digits=0,0,6,arial1_font,16,TIME_FAC; }
|
|
|
Re: FPS
[Re: ]
#158761
10/05/07 13:41
10/05/07 13:41
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
OP
Serious User
|
OP
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
Thanks, works also great!
Dark_Samurai
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
|