The Bad Network Simulator


This not really a “simulator” in the usual sense but a quite tight layer between your network code and the sockets API. Its main function is to intercept the recvfrom() call in order to buffer data, delay, reorder and skip packages to simulate a "bad" network. By also intercepting socket(), it keeps track of whether you are using a TCP or UDP connection.

You should plug this in into the game (so it affects your already working network solution), and using the calls BADsetUDPerrorrate(), BADsetUDPdelay() and BADsetTCPdelay(), you should experiment with different delays and (for UDP) packet losses in order to see how bad problems your solution can manage.

This page is maintained by Ingemar Ragnemalm