Page 1 of 1

Network gameplay tearing

PostPosted: 25 Dec 2018, 23:56
by eltomito
Yo! I'm posting a lot today. I noticed that when I'm playing online with around 200ms round trip time (I hope it's what that number means), the game play gets erratic at times. My kart sometimes suddenly turns ninety degrees and jumps to a different position. It feels as if (pure speculation) my keyboard controls were routed thru the server. Is that how it works?

I'm asking because I *think* the local kart kontrols and position could be fully determined by the local instance of stk, unless I collide with other players.

Where do these sudden rips in my space-time continuum come from?

Re: Network gameplay tearing

PostPosted: 26 Dec 2018, 01:57
by benau
first, i think you need to update apk 1 more time, because 20181225 seems to have 2 versions....

depends on the server you choose, (if you have artist debug mode on you can enable the network debbuging menu, and there is info about packet loss) usually if you have packet loss to server then your control event to server will be late

because the current design of stk network is that it's the server who playing the game

Re: Network gameplay tearing

PostPosted: 26 Dec 2018, 20:15
by QwertyChouskie
To expand on this further, the server is the ultimate source of truth in an online game. Due to STK being open-source and easily modable, the server can't rely on the client at all, otherwise cheating becomes a huge problem. In fact, the client in online mode is somewhat dumb, only using local states to help keep the visuals smooth. As a consequence of this design, if your internet connection has a lot of packet loss, a high ping, and/or a highly variable ping (e.g. packet 1 takes 213ms to arrive, packet 2 takes 286ms, packet 3 takes 195ms), you will experience some weirdness. On the plus side, cheating is basically impossible so long as the server owner is trustworthy.

Re: Network gameplay tearing

PostPosted: 26 Dec 2018, 20:17
by eltomito
Okay, then I guess there's no way to help it. Anyway, it works really well as it is when the round trip time is short.