🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Authoritative server

Started by
6 comments, last by thatguyiam 6 years, 3 months ago

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 (ಥ﹏ಥ)

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: 

 

enum Bool { True, False, FileNotFound };
20 hours ago, hplus0603 said:

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

I don't understand server reconciliation and entity interpolation, 

Perhaps the following might help.

 

http://www.gabrielgambetta.com/client-side-prediction-server-reconciliation.html

https://gafferongames.com/

https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking#Basic_networking

On 23.03.2018 at 7:46 PM, thatguyiam said:

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

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.

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

 

This topic is closed to new replies.

Advertisement