0 registered members (),
853
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
jerking after vec_accelerate? (fps_max issue)
#180162
01/27/08 15:15
01/27/08 15:15
|
Joined: Aug 2005
Posts: 1,012 germany, dresden
ulf
OP
Serious User
|
OP
Serious User
Joined: Aug 2005
Posts: 1,012
germany, dresden
|
Hey there fellow Lite-C'ers! I just used vec_accelerate in a test-project and got ugly jerking. So i made a brand new test project with the following easy code. Code:
///////////////////////////////
#include <acknex.h> #include <default.c>
///////////////////////////////
function testentity() { while(1) { vec_accelerate(my.skill1, my.skill10, vector(mouse_left*3,0,0), 0.5); c_move (me, me.skill1, nullvector ,NULL); wait(1); } }
function main() { level_load("test.WMB"); wait(2);
fps_max = 80;
wait(1); ent_create("cbabe.mdl",nullvector,testentity); }
Nothing more, an empty test.wmb level, compiled it and run. Again i got the same problems. What happens is that when i press the left mouse button to accelerate the cbabe.mdl it gets accelerated correctly until the point it reaches the maximum speed -> then the jerking begins. This looks like some kind of stop and go motion wich is inacceptable. Maybe i'm doing something completely wrong here? But i think above is the correct way to use vec_accelerate according to the manual? Have i overlooked something? Do you get the jerky motion too? Thanks for any help on this!
Last edited by ulf; 01/27/08 17:34.
|
|
|
Re: jerking after vec_accelerate? (fps_max issue)
[Re: ulf]
#180163
01/27/08 17:39
01/27/08 17:39
|
Joined: Aug 2005
Posts: 1,012 germany, dresden
ulf
OP
Serious User
|
OP
Serious User
Joined: Aug 2005
Posts: 1,012
germany, dresden
|
i could nail it down having to do with fps_max. if i dont set fps_max and run in windowed mode everything is okay, the accelerated distance vector in skill1 is okay. i did a debug print on the vector and this is what it looks like: http://www.ackbytes.com/upload/window.jpgyou can see the value beeing in the same range almost every frame wich is how it should work. now i switch to fullscreen with limits the fps_max to your monitor frequenzy divided by an integer. it doesnt matter if i set it manual to like 80 or 120 or something in that range, i always get this odd result: http://www.ackbytes.com/upload/full.jpgyou can see the distance vector value is jumping like crazy! what is causing the stuttering movement. even in window mode if i set fps_max to like 80 i get this stuttering result. any thoughts on this one? thanks!
|
|
|
Re: jerking after vec_accelerate? (fps_max issue)
[Re: D3D]
#180166
01/28/08 09:34
01/28/08 09:34
|
Joined: Aug 2005
Posts: 1,012 germany, dresden
ulf
OP
Serious User
|
OP
Serious User
Joined: Aug 2005
Posts: 1,012
germany, dresden
|
edit: okay now i understand. i just tested time_smooth = 0.666 on my laptop and got stuttering there without setting fps_max.
what are your settings for fps_max and time_smooth ?
Last edited by ulf; 01/28/08 09:43.
|
|
|
Re: jerking after vec_accelerate? (fps_max issue)
[Re: ulf]
#180167
01/28/08 09:45
01/28/08 09:45
|
Joined: Apr 2006
Posts: 1,551 Netherlands
D3D
Serious User
|
Serious User
Joined: Apr 2006
Posts: 1,551
Netherlands
|
Same specs as above with widescreen lcd monitor. AV/FW, SED + Xfire running in background.
Simple level in window mode (800x600) # fps_min,max off # time_smooth off result: stutter and tearing (vsync)
Simple level in window mode (800x600) # fps_min,max on # time_smooth off result: normal gameplay, but with tearing (vsync)
Simple level in window mode (800x600) # fps_min,max off # time_smooth on result: stutter and tearing (vsync)
Simple level in window mode (800x600) # fps_min,max on # time_smooth on result: stutter and tearing (vsync)
Simple level in fullscreen mode (1280x1024/1680x1050) # fps_min,max off # time_smooth off result: stutter
Simple level in fullscreen mode (1280x1024/1680x1050) # fps_min,max on # time_smooth off result: normal gameplay
Simple level in fullscreen mode (1280x1024/1680x1050) # fps_min,max off # time_smooth on result: stutter
Simple level in fullscreen mode (1280x1024/1680x1050) # fps_min,max on # time_smooth on result: normal gameplay
|
|
|
Re: jerking after vec_accelerate? (fps_max issue)
[Re: D3D]
#180168
01/28/08 09:59
01/28/08 09:59
|
Joined: Aug 2005
Posts: 1,012 germany, dresden
ulf
OP
Serious User
|
OP
Serious User
Joined: Aug 2005
Posts: 1,012
germany, dresden
|
okay, thanks thats what i just confirmed too. now the next problem is finding perfect values for fps_max, fps_min, and time_smooth...
i have a system that suffers frequent harddrive access and one that doesn't. right now i think
fps_max = 190; fps_min = 16; time_smooth = 0.666;
work pretty good on both. though you notice litte stuttering on both. the most noticable is the stuttering with entities using vec_accellerate and c_move.
what are your values?
Last edited by ulf; 01/28/08 10:01.
|
|
|
|