Help with recieving lots of data sent

12 views
Skip to first unread message

Bob Smith

unread,
Apr 19, 2018, 1:25:10 PM4/19/18
to PodSixNet
Greetings,

I have created a multiplayer program in which two players race against one another to see who can grab the most points. This involves each of the clients sending their locations to the server and then to one another multiple times per second to constantly update the location of the other player. The problem I've ran into so far with this is that occasionally the local client will see the other player freeze for a second, and then teleport to their actual place after a little while. It seems like the clients are not receiving any data in the frozen time frame, and then eventually it receives something and puts the other player in the correct position. Any ideas what is causing some of the data to not be received by the other client? I am not very knowledgeable with networking outside of PodSixNet so any help would be appreciated. Thanks!

Chris McCormick

unread,
Apr 20, 2018, 4:10:15 AM4/20/18
to pods...@googlegroups.com, Bob Smith
Hello,

On 20/04/18 01:25, Bob Smith wrote:
> This involves each of
> the clients sending their locations to the server and then to one
> another multiple times per second to constantly update the location of
> the other player. The problem I've ran into so far with this is that
> occasionally the local client will see the other player freeze for a
> second, and then teleport to their actual place after a little while.

The symptom you describe sounds like lag or jitter of some sort, which
is an old problem in multiplayer networked video games.

I think it is common for fast-paced games to use some sort of
interpolation to smooth over packet delays. Here is some reading
material concerning this technique:

http://www.gamedonia.com/blog/lag-compensation-techniques-for-multiplayer-games-in-realtime

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

Hope this helps.

Cheers,

Chris.

--
http://mccormick.cx/

Bob Smith

unread,
Apr 20, 2018, 4:01:27 PM4/20/18
to PodSixNet
Thanks for the help, I'll look into making some sort of interpolation/extrapolation program.
Reply all
Reply to author
Forward
0 new messages