In order to avoid having to port a lot of code to multiplayer later on, I’m making the game fully client/server from the start. I’m using UDP so packets can be ignored and handled out of order and all that, and when playing singleplayer, the game will be running a local server instead of having all the code be duplicated.
I ran a few tests this week, and at 500 ms latency with 20% packet loss, it seems to be able to handle 1000 packets per second (quite a lot more than it will ever use) indefinitely, which is nice.
Of course, I’m ending up reimplementing a lot of TCP, with packet resending and ordering for most things, so I’m not totally sure all this work is actually worth it, heh.