If you work with anything network related, you've probably experienced the kind of effort that is involved with testing and verifying your designs and implementations working correctly under the various scenarios that can happen over a network. Issues like random disconnects, reconnects, time-outs, traffic congestion, low latency vs high latency, testing network prediction algorithms, testing custom designed protocols, etc. There are some commercial solutions out there that provide products to assist with this kind of testing, but if you don't have cash to throw around, there is a very good free alternative called Linux
Linux has a command line tool called Traffic Control, or simply "tc". It is very powerful as it allows you to simulate:
- Variable latency
- Packet loss
- Packet duplication
- Packet corruption
- Packet reordering
- Bandwidth throttling
Any of these properties can be used together or individually against any type of packet coming in or going out of your network. You can construct filters that block all inbound traffic on port 80, or optionally delay all or specific packets outbound from your game server by 50 - 100 ms in your LAN to simulate real gameplay over the Internet. It's really powerful.
Since it is a command line tool, it takes a bit of time to understand the concept, the grammar, and setting up rules. So I decided to start an open source project that allows you to configure TC via a web site. Configuration is defined in a JSON object, so it's possible to write your own front-end client or even automated test scripts. Now this isn't the first of its kind. I did find some other open source solutions out there doing something similar, but I haven't found one that allows a good level of customizability and with room for growth, so I wrote my own.
If you develop online apps or games and you're looking for something free to help with your development and testing, check it out. If you use to write stubs to simulate these tests, great, now you can get rid of that crap And if you're an online developer and you don't test your network code... Extend your arm, then use your other hand to slap your wrist
The project is called PHP TC (yep, that's original folks . It's up for grabs on Sourceforge.
Nice to see someone showing people a free solution rather than one more pseudo-advertisement.
Please, please, please give it to the developers of Call of Duty!
They might fix their network code then :>
This is pretty useful, nice work! By the way, out of curiosity, why did you choose to host the project on Sourceforge instead of Github?
I haven't played CoD, but I take it it's pretty bad The last game I remember that had bad network code was I think the first Unreal Tournament (or maybe the first Unreal). I remember if you had low frame rate, others would see you phase in and out of the level. It was funny, but of course these are the kind of things we want to evolve away from
dk, I chose Sourceforge merely out of familiarity. Almost all of the open source projects I've dealt with are hosted on Sourceforge or sometimes on their own hosted websites. It offers packaged releases + git support, which is sufficient for my needs.