Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 677 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Problems with fps_max and frame rate #352260
01/02/11 15:23
01/02/11 15:23
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
I have a problem with my game. When the frame rate is under fps_max some entities start to "vibrate". For example if I have fps_max=60 and a frame rate of 60 all runs perfect and smooth, but when the frame rate fall for example to 40 then some moving entities start to "vibrate", but if now I set fps_max=30 I get a frame rate of 30 and all runs smooth again. Anyone knows how i can fix this?


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: Problems with fps_max and frame rate [Re: painkiller] #352262
01/02/11 15:26
01/02/11 15:26
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Sounds like bad coding..

Do you use time_step to move your entities?

Re: Problems with fps_max and frame rate [Re: Rei_Ayanami] #352279
01/02/11 17:21
01/02/11 17:21
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
yes, the problem happens with the camera_chase from A8's camera.h and not with the other camera types. It also happens in the default AI car from car templates and in my traffic cars which I move along a path:

Code:
////////////////// MOVE DUMMY ALONG THE PATH
		checker=path_getnode(dummies[my.skill65],current_node+1,c_target, NULL);
		if(vec_dist(dummies[my.skill65].x,c_target)>min_dist)
		{
			vec_diff(c_vec, c_target, dummies[my.skill65].x);//turn the car so it facing to the target.x
			vec_to_angle(dummies[my.skill65].pan, c_vec);
			vec_set(move_vec, vector(my.car_speed*time_step*(50./80), 0, 0));
			vec_rotate(move_vec, dummies[my.skill65].pan);
			vec_add(dummies[my.skill65].x, move_vec);
			
		}else
		{
		   current_node+=1;
		}



Last edited by painkiller; 01/02/11 17:22.

3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: Problems with fps_max and frame rate [Re: painkiller] #353013
01/07/11 10:49
01/07/11 10:49
Joined: Dec 2010
Posts: 12
P
Psygnal Offline
Newbie
Psygnal  Offline
Newbie
P

Joined: Dec 2010
Posts: 12
If it makes you feel any better, Painkiller - I've had exactly the same problem, and used exactly the same solution.

I'm quite prepared to believe that I'm coding something badly, but I can't for the life of me work out what.

Rob

Re: Problems with fps_max and frame rate [Re: Psygnal] #353030
01/07/11 12:38
01/07/11 12:38
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
That is not a bad coding!
All you need is to limit FPS_MIN! Make it for example 50 or 55, everything will work properly.
Or you can use FPS_LOCK.

TRACER


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Problems with fps_max and frame rate [Re: 3run] #353035
01/07/11 13:18
01/07/11 13:18
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
If you want that your game runs on different systems with the same speed (same in one system with changing fps) then don`t use FPS_MIN or FPS_LOCK.

Try to play with the time_smooth var...

Last edited by Widi; 01/07/11 13:26.
Re: Problems with fps_max and frame rate [Re: Widi] #353045
01/07/11 14:54
01/07/11 14:54
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
There will be no problem with speed on different PC if he'll use FPS_MIN!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Problems with fps_max and frame rate [Re: 3run] #353047
01/07/11 15:10
01/07/11 15:10
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
Quote:
This variable limits the valid range of the time_step variable to a minimum frame rate. Below that frame rate, time_step stays constant, limiting the maximum per-frame distance of movements.


Consequence: The game will run at different speed on slow pc´s.
If time_step stays constant, the speed of moving objects will be determined by the framerate.
The framerate is different on every pc.
This will occur only on slow pc´s as said. When the framerate goes under fps_min (in you example 55 fps), time_step will be constant.


no science involved
Re: Problems with fps_max and frame rate [Re: fogman] #353064
01/07/11 17:13
01/07/11 17:13
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
As I tested on different PC most of my project, I can say that even if there will be any differences in FPS, you are not gonna notice them. May be if you'll use very old and very slow PC, then I guess frame rate will go really slow... And even so, there are different System Requirements for each game, so not all games gonna work properly on slow PC!



Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Problems with fps_max and frame rate [Re: 3run] #353077
01/07/11 17:54
01/07/11 17:54
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
First of all, even the manual says that stuttering with different fps comes from bad coding!

Using fps lock/min is just stupid for a good game!

Page 1 of 2 1 2

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