Jump to content
  • Advertisement
Sign in to follow this  
Ploppy_

Network synchronization for FPS style game

This topic is 633 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

Hello,

First of all I'm not English, so please, forgive me.

 

I'm pretty new to multiplayer games. I've read tons of documents about it but I still have questions.

The latest topic was on this forum, and had many answers for me (https://www.gamedev.net/topic/683580-server-client-ticks-lag-compensation-game-state-etc/).

 

My current project is designed this way:

  • When a player connects, he receives the current tick from the server.
  • Server then receives commands from this new player and ask him to adjust his current tick so that the server receive his commands 'just in time'.
  • In my current project, the server asks a client to sync again as soon as the tick received from the client's command is different than serverTick + 1.

 

This seems to work pretty well.

 

But what can I do when user's commands are too late ? If I simply discard them, I'll probably run into problems.

Someone on the Discord chat told me to simply execute the outdated commands when they arrive.

 

In order to interpolate the positions of my entities I have a renderTick variable. How do I calculate this renderTick variable ? Should I simply adjust it as the time goes on similarly to the client tick ?

 

I've read in many places that the only solution for an authoritative server to know if a player shot another player is to recreate the game from the player's perspective to see if he actually shot the other player. So... Should the server know about the renderTick of the clients ?

 

Thank you very much.

Edited by Ploppy_

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!