1
TNet 3 Support / Re: Client side movement prediction
« on: May 10, 2014, 07:55:30 PM »
Client Side Interpolation and Prediction is something I covered extensively in my thread over here:
http://www.tasharen.com/forum/index.php?topic=5788.msg30798#msg30798
Of which you can find my interpolation and network time synchronization scripts.
I also developed client input prediction as well to handle player movements, but I never released it publicly as I felt it were too much of a pain and didn't work as nicely as I wanted it to. Mainly due to the fact that Unity is not capable of rolling back physics states and checking collision without time passing or progressing to the next frame.
But if you want interpolation my example work fairly well. Aren and a few others suggest different methods by only sending update packets when something important happens like a collision and maybe an update packet twice every second or so. Then "lagging" the renderer behind the physics object. Now this will work for a lot of games, but if you have a very physics precise game then my solution will work better. Just remember though that it has it's own pro's and con's and that anything in networking can always be a mighty challenge to overcome.
http://www.tasharen.com/forum/index.php?topic=5788.msg30798#msg30798
Of which you can find my interpolation and network time synchronization scripts.
I also developed client input prediction as well to handle player movements, but I never released it publicly as I felt it were too much of a pain and didn't work as nicely as I wanted it to. Mainly due to the fact that Unity is not capable of rolling back physics states and checking collision without time passing or progressing to the next frame.
But if you want interpolation my example work fairly well. Aren and a few others suggest different methods by only sending update packets when something important happens like a collision and maybe an update packet twice every second or so. Then "lagging" the renderer behind the physics object. Now this will work for a lot of games, but if you have a very physics precise game then my solution will work better. Just remember though that it has it's own pro's and con's and that anything in networking can always be a mighty challenge to overcome.