Hello,
I’m currently programming the movement engine on my multiplayer game. The game is played through a server which validates everything and sends updates to other clients.
Now I’m at the point where it has to validate player movement and send updates to all clients seeing that player.
Now my question is how I should process movement packets from client. What I thought of: Having one extra thread which does movement validation. This thread has a queue which stores incoming movement packets based on the order in which they arrive. Then, in every iteration, it takes the next movement packet from the queue and validates it.
Also of note: the game has tile based movement. Meaning one movement advances the player one tile further.
Is this an OK approach or is there a better one?