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
0 registered members (), 938 guests, and 4 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
small question about player movement #104417
12/30/06 10:33
12/30/06 10:33
Joined: Sep 2002
Posts: 1,065
Germany, Jena, Thüringen
3D_Train_Driver Offline OP
Serious User
3D_Train_Driver  Offline OP
Serious User

Joined: Sep 2002
Posts: 1,065
Germany, Jena, Thüringen
Hi there.
How can I prevent that the client always moves further than the expected target and then suddenly jumps back to the target?
I`m shure this has to do with lag and stuff.

Both players the server and the client player move correctly on the server but not on the client.

thx for any reply

Re: small question about player movement [Re: 3D_Train_Driver] #104418
12/30/06 11:03
12/30/06 11:03
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
use ent_sendnow() when the movement suddenly stops. It is also helpfull to prevent any unexpected stops by design: make players slow down before they stop.

The above probably won't give you perfectly smooth movement. If you want better movement, you will probably have to design your own routines and protocols. You could send over arrays with updated positions, rotations and timestamps. You could write your own prediction algorithms, etc. This can get very complex very fast, though.

Re: small question about player movement [Re: Excessus] #104419
12/30/06 11:17
12/30/06 11:17
Joined: Sep 2002
Posts: 1,065
Germany, Jena, Thüringen
3D_Train_Driver Offline OP
Serious User
3D_Train_Driver  Offline OP
Serious User

Joined: Sep 2002
Posts: 1,065
Germany, Jena, Thüringen
well. thanks a lot.
I´m going to try this out.

Re: small question about player movement [Re: 3D_Train_Driver] #104420
12/31/06 12:04
12/31/06 12:04
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
3dgs dead reckoning (or however this is written)
is pretty "basic"

You can turn it off, making the entities beeing placed to the last position
that was transmitted. This way the entities dont overshoot, but dont get smoothed anymore
and have a very choppy movement.

I once wrote a smoothing algorythm, where not the "real" entity is visible, but
a dummy entity moving in relation to the real entity.
This way the dummy does not overshoot, and drags a bit behind.

This is getting really complicated, but looks better in the end.

In Lan games, with high updatecycles you can use the implemented methods
wich looks good enough.
In Internet games with about 3-4 updates per second, it is a more complicated topic.
There are no perfect sollutions.
You can come around the overshooting by having a smooth (accellerating / decellerating)
movement for players. This way the directionchanges are not as abrupt, making the
overshooting less visible.

Professional systems like the UnrealEngine
have very complicated prediction calculations, not only regarding the positions
of entites, but also the velocity. It is always the tradeoff between smooth movement,
and correct position on the client side.(as the position is on the server)

You can make really smooth movement of players, but at the cost of not reflecting the
correct position as it is on the server.
The more you try to have the correct position as on the server, the more choppy
the players will move on the client, simply because the client lags behind in
its information (the transmission over the internet can take up to .5 seconds)
In Lan the information is visible almost imidiatly to the client.


Moderated by  HeelX, Spirit 

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