Authoritative match_loop response rate

Happy weekend everybody, it’s me again.

Lets say I have an authoritative match with 10 ticks (low tick-rate) per second. I noticed that if you press movement (WASD) keys really quick, then on server (match_loop basically) there could be the case, when your action will not be processed. Clear why, because if your press/unpress takes 10ms, then you can fall into the server gap (which is 100ms) between ticks.

But I wonder, how e.g. World of Warcraft dealt with this since there, if you pressed the key, it executed almost instantly (+ping ofc). Is it possible to have high response rate from server without increasing tick rate, or I’m missing some basic/fundamental aspects?

Use match_signal. Signals are executed as soon as you call nk.match_signal

You would not just transfer key-presses to the server as this is far to much data. In large (MMO) games like WOW there would be a movement-state per character. So something like (positionX, positionY, movementX, movementY) (could also be represented as 2 2D or 3D Vector).

So even if another client misses a packet of a “newer” position of a character, the client can calculate the movement speed of that player and estimate a position where the other character “should” be by that time.

I do not yet fully understand match_signals internally, but since they processed right away and could interfere with the matchState, i find it a little bit scary to use. I myself only use it to “externally” get or modify the matchState which i rarely do (just for moderation purposes)

1 Like

just stumbled across this awesome video. he also explains movement prediction in a very simple way. highly recommended to every beginner to watch!

1 Like

thank you @dela , was interesting to watch. I forgot to reply, so this is what I understood few weeks ago: you don’t need to use match_signal for movement in my particular case. Let’s say you have 1 match_loop per second and you pressed WASD ten times and sent all data with SendMatchStateAsync (C#, Unity), then Nakama stacks all ten messages together for current tick (if they fit into tick of course). Every message has it’s own timestamp (or receive_time_ms) and you can accurately calcualte position in match_loop using it’s param messages.