Jump to content
  • Advertisement
Sign in to follow this  
Heg

Server Reconciliation Problem

This topic is 2508 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,

I´m currently developing a Bomberman Clone to grasp all important game development topics. I think it´s a great game to practice, because not too much is going on and you can implement all advanced features, such as networking and artifical intelligence.
At the moment the game is playable with 4 players on one PC or over a network, but it only runs smoothly over a LAN...

I implemented the so called 'naive Client/Server approach' and as a result I suffer hard lagging remote players over the internet ;) I have read a number of topics and tutorials regarding that matter, but I still don´t understand one little thing... In this tutorial http://www.gabrielgambetta.com/?p=63 the first step to the solution is client prediciton. I do understand the concept, but I fail to adapt it.

In my game the movement is handled as follows: The players have a certain speed (pixels per second). When a player moves to the right, the speed is multiplied by the current delta time (the time passed since the last main loop call) and the new position calculated. This ensures that the players are moving with the same speed on all machines. My problem is now, how can I check if the client has predicted a move correctly? When I send a 'moving right' command to the server and calculate the new position, I can´t just check if the new position is the same the server gets, because the result is based on how long a main loop call took.

Is it practical to incorparate this with server ticks, so you actually now how long the server processed the request? I am sure I´m just missing something here and need a hint in the right direction.

Thanks for your help

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.

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!