1 registered members (AndrewAMD),
718
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
OP
Serious User
|
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: Rei_Ayanami]
#352279
01/02/11 17:21
01/02/11 17:21
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
OP
Serious User
|
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:
////////////////// 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: 3run]
#353035
01/07/11 13:18
01/07/11 13:18
|
Joined: Aug 2007
Posts: 1,922 Schweiz
Widi
Serious User
|
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: 3run]
#353047
01/07/11 15:10
01/07/11 15:10
|
Joined: Apr 2005
Posts: 4,506 Germany
fogman
Expert
|
Expert
Joined: Apr 2005
Posts: 4,506
Germany
|
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
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|