Clıent sıde predıctıon

Hi everyone. Todays topic is a little technical for those who are suffering because of network:)

You would know if you are following our blog that we are working on the new match system of LanistaWars which will offer realtime coop and PvP gameplay. Maybe it' s too early to talk about the details of gameplay:), however some technical issues are being dealt on the way. One of them is client side prediction.

We were using a cloud based solution before which i talked about in one of my previous post. Now i' m porting our network infrastructure to another approach: server-client. The reason is we want to offer the best gaming experience to our users while publishing the game all around the world.

Anyway, let' s talk about one of the biggest handicap of server-client network structures: client side prediction.

Why it' s needed?

Because there is a latency between clients and server which cannot be prevented. Even your servers are on the same machine with client, there will still be a latency about 10-20 ms which means client will be informed 50 ms later after giving the proper input. First the input must be sent to server then server will calculate the result and notify client about the last state of the world.

What is client side prediction?

Client side prediction means client will try to predict the outcome while sending inputs to the server. This way player will see the response of his/her inputs instantly. Server, however, will also calculate the outcome and sync client to prevent it behaving differently than sever.

There are some other solutions for the problems experienced on fast-pace games about latency. Some examples for those fast-paced games can be Counter Strike, Quake, Half life, etc. On those games the position of an opponent can be very important at that time because bullets move really fast:) On moba-like games, which are generally using RTS infrastructure, there aren' t any actions like shooting with sniper. This is why client side prediction can be enough for LW.

I didn' t want to write very technically and just tried to tell the reason why you can need client side prediction. Some other concepts used on fast-paced games are Interpolation and Extrapolation, Lag compensation, etc. If you want to understand deeper technically, below you can find the usefull sources i used while i was investigating those topics about network latency:)

http://web.cs.wpi.edu/~claypool/courses/4513-B03/papers/games/bernier.pdf

http://udn.epicgames.com/Three/NetworkingOverview.html#Client-Server model

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

http://en.wikipedia.org/wiki/Lag_(online_gaming)

Cheers.

Emre

No Comments Yet.

Leave a comment