Sign in to follow this  

Movement Synchronisation for RPG's

This topic is 2664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi :), i'm rather new to network programming, and i'd like to ask some questions about synchronisation of server and clients
by the way, i'm using raknet library for network stuff to keep things easier

what i've done so far:
wrote a client & server application as a testing environment
- client:
Visualisation: Ogre3D
Physics: Physx
Networks: RakNet
- server:
Networks: RakNet

My server simply takes the data from all clients and stores them, to be able to update new clients. the clients are sending their absolute position and velocity, the server then broadcasts this information to all clients, except the client who sent the packet.
I know that this system is very unsecure, since client can send every position he likes, and doesn't compensate any lags. i've simulated a ping of 200ms and it looked awful xD

..and now i'm looking for a new client-server protocol to improve my positioning between server&clients
my thoughts:
thoughts
every frame the objects will be updated on the clients, by adding a velocity*time to the position, same happens on the server

Question1: The Y-Axis
Up to now my server does no physical calculations, that means he's unable to calculate the height of an object. i'm thinking of integrating a physical simulation in the server?
how would you solve that??

Question2: Ticks
Till now, my server processes the packet loop every 30ms, and checks for packets. how often should i send movement updates to the clients? and other data, e.g. like health
how is that solved in other mmorpgs?

Share this post


Link to post
Share on other sites
There is no "best" solution. It all depends on trade-offs.

Most RPGs are not time sensitive, so movement will be forwarded to other clients as it's received, which means that other players will look "behind" on your screen, and vice versa.

The Forum FAQ has some links, including Entity Position Interpolation Code.

Share this post


Link to post
Share on other sites

This topic is 2664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this