Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
FPS #158756
10/05/07 06:54
10/05/07 06:54
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline OP
Serious User
Dark_samurai  Offline 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 Offline

Expert
aztec  Offline

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 Offline
Serious User
Scorpion  Offline
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 Offline OP
Serious User
Dark_samurai  Offline 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

A
Anonymous
Unregistered
Anonymous
Unregistered
A



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 Offline OP
Serious User
Dark_samurai  Offline 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
Re: FPS [Re: Scorpion] #158762
10/05/07 14:57
10/05/07 14:57
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Quote:

Code:
while(1)
{
framesPerSec *= 0.9 + 0.1*time_step;
wait(1);
}






It has to be framesPerSec = (framesPerSec * 0.9) + (1.6 / time_step);


Always learn from history, to be sure you make the same mistakes again...

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1