Gamestudio Links
Zorro Links
Newest Posts
blogherenowcenter
by 3s05bmmc. 06/05/24 06:08
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 853 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19057 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
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 Offline OP
Serious User
ulf  Offline 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 Offline OP
Serious User
ulf  Offline 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.jpg

you 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.jpg

you 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: ulf] #180164
01/27/08 20:01
01/27/08 20:01
Joined: Aug 2005
Posts: 1,012
germany, dresden
ulf Offline OP
Serious User
ulf  Offline OP
Serious User

Joined: Aug 2005
Posts: 1,012
germany, dresden
heelx suggested to watch time_step, so i found out that it had frequent jumps to almost the double value (0.2-0.4) wich was not the case on my laptop.

the cause may be some background processes with harddrive activity or the like.

so i played around a bit with time_smooth and for my case time_smooth = 0.666 works the best.
if i set it very high things get messed up in window mode, if its too low, its jerky in fullscreen.

so the holy grail, is 0.666 and not touching the fps_ statements. i would also suggest to set it in every 3dgs program. as you can expect that at least 1 out of 10 customers/players do have these time_step jumps for several unpredictable reasons.

what are your experiences? please share the knowledge.

Re: jerking after vec_accelerate? (fps_max issue) [Re: ulf] #180165
01/28/08 08:39
01/28/08 08:39
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
If i'd use time_smooth without fps_min/max or the other way around. I can simulate stutter on simple level in fullscreen mode. And with simple level I mean 3x 512x512 texture. Three blocks representing ground and buildings. Plus 3 lowpoly models with shadow and antialias on. Even while using the default A7 walkthrough template. If I didn't know better I would think GameStudio engine was bad, but it just require some tweaking to get it right.

Q6600 @3GHz
2 GB PC8500 @1066Mhz
Geforce 8800 GTX DDR3 768MB


smile
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 Offline OP
Serious User
ulf  Offline 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 Offline
Serious User
D3D  Offline
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


smile
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 Offline OP
Serious User
ulf  Offline 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.

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