What is the best way to send data between machines? Do you use TCP sockets, UDP sockets or a mixture of both? In this article we explore this fundamental choice and decide on the best option for fast-paced action games.
This article shows how to send and receive UDP packets using BSD sockets, giving you source code that works across MacOS X, Windows and Unix.
Learn how to create your own virtual connection between two machines on top of UDP. How to detect connection, filter out packets from other machines and detect disconnection via timeout.
Learn how to implement your own reliability system on top of UDP using sequence numbers and acks. Also presented is a simple congestion avoidance algorithm.
Explains the techniques used by professional game developers to debug multiplayer games.
A brief overview of the history of PC multiplayer games. Discover how RTS games were able to synchronize thousands of units over a 28k modem, and how first person shooters hide lag with client side prediction and latency compensation.
Is it possible to get exactly the same floating point result (down to the bit-level) each time a program is run? How about across debug and release builds? Across different compilers? Different CPU architectures?
If you enjoyed this article series please donate. Donations encourage me to write more articles!