Skip to content

Managing Packets over UDP

September 15, 2016

So I’ve worked through a few key roadblocks pertaining to creating a client server experience over udp. First, I worried that if integral packets like game room setup info were dropped then code that depended on it would break. I also worried about how I should structure larger messages.

I will be sending the position and velocity of all the players in the game. Do I send each players p and v as individual messages? Turns out you don’t have to split up messages like that, messages are broken up into appropriate packages on the fly.

To clear up my original fear, packets are continually sent until they are received, and client code is usually set up to wait for the arrival of integral information before continuing by using a request-response pattern.



From → Networking

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: