Jump to content
  • Advertisement
Tufan

Authoritative server

Recommended Posts

It's been almost 6 moths since i start trying to make simple 2d games, i am trying to understand how client-side prediction, server reconciliation etc. work, i've read many articles but i still don't understand how authoritative server works. I am about to lose my mind.

I'd be very, very grateful if you know some simple examples (language doesn't matter), or articles that explain it well.

I just want to be able to make a simple game like agar.io (ಥ﹏ಥ)

Edited by Tufan

Share this post


Link to post
Share on other sites
Advertisement

What is it you don't understand, more precisely?

Do you understand how a regular game, with time stepped simulation, works?

This link is pretty good as a general overview: 

 

Share this post


Link to post
Share on other sites
20 hours ago, hplus0603 said:

What is it you don't understand, more precisely?

I don't understand server reconciliation and entity interpolation, 

Share this post


Link to post
Share on other sites

authoritative server -> the server controls all the entity positions and game rules - the clients just display the results of that, and get to make requests to the server when they want to change things (like asking to move, or firing a weapon, or whatever)

entity interpolation -> clients receive information from the server at (relatively) large time intervals. By interpolating the positions during those intervals, movement can be made to appear smooth even though there isn't a message from the server every frame. Different strategies can be used to ensure movement stays smooth even if a position update is late arriving, and to reduce the lag inherent in interpolating a position over a period of time.

server reconciliation -> if a client is allowed to predict its own position changes (in order to be more responsive to input), by applying the expected results of input to the local entity, sometimes the server responses will contradict that local position because the server knows something the client doesn't.. Reconciliation is the process of fixing that on the client, typically by replaying local predicted input based on the corrected values from the server.

As a relatively new developer, you should get the basic communication working, and forget about interpolation and server reconciliation.

Share this post


Link to post
Share on other sites
2 hours ago, Tufan said:

I actually read them but i am so stupid that i can't figure out how to make it work on my game.

Don't call yourself stupid, thats the domain of other, pettier people. You'll get there, just keep trying to wrap your head around it and you'll grok it eventually.

 

 

ps. did you play around with the demo section of gabriel gambettas articles?

http://www.gabrielgambetta.com/client-side-prediction-live-demo.html

 

Edited by thatguyiam
linked more directly to a section of interest

Share this post


Link to post
Share on other sites

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!