Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am developing an online multiplayer game. It works well when I test it on the local area network, but before I release it I would like to test how the user-experience works out for someone who has not such a good connection to the server. How can I simulate a bad internet connection with high latency, low bandwidth, jitter and occasional packet loss when in a local environment?

share|improve this question
37  
Send it to me for testing! Connections in my country are horrible by default. –  Stephan Aug 30 '13 at 10:52
5  
A commendable goal. I do wish published studios would do the same. Epic Games, I'm looking at you. –  Gusdor Aug 30 '13 at 12:17
5  
Find a friend nearby who uses Comcast... –  WernerCD Aug 30 '13 at 12:55
11  
Simulating a bad internet connection contains the current answers and more. –  Byte56 Aug 30 '13 at 14:29
2  
I immediately thought of this other recent SE question: superuser.com/questions/637594/… –  Patrick M Aug 30 '13 at 14:58

5 Answers 5

I think Dummynet is what you are looking for. Dummynet is a network emulation tool which can simulate bandwidth limitations, delays, packet losses, and many more. You can easily choose which traffic you want to intercept and configure the limitations, e.g. to limit all incoming TCP traffic to 2Mbit/s you do

ipfw add pipe 2 in proto tcp
ipfw pipe 2 config bw 2Mbit/s

You see the traffic selection is done by the known ipfw firewall and the pipes provide the limitation features.

It is available for FreeBSD, Linux and Windows.

share|improve this answer

Network Link Conditioner

If you're on a Mac, you can use Network Link Conditioner.

Network Link Conditioner Preference Pane

You can simulate various cases of bad internet connections, including Edge and 3G.

In addition, you can create your own profiles with your own settings:

Network Link Conditioner Custom Profiles

It is a free download in Xcode (go to Xcode → Open Developer Tool → More Developer Tools… and download the Hardware IO Tools for Xcode).

share|improve this answer

If you are on linux you can use netem to simulate all of the possible problems with network like high latency, low bandwidth, packet losses and many others.

There is an option for windows called NetLimiter but I haven't used it so can't vouch for it.

Just found a Mac App called SlowlyApp.

share|improve this answer
1  
-1 As with the other answers. This is just links. Please update the answer to include descriptions of what the applications do and how they do it. –  Byte56 Aug 30 '13 at 14:17
7  
@Byte56: What these apps do is simulate a slow and/or unreliable network connection, just like the question asks for. I'm pretty sure how they do it is outside the scope of this site. I'd say this is a perfectly good answer to the question as asked; if there's a problem, it's in the question, not in the answers. –  Ilmari Karonen Aug 30 '13 at 16:00
1  
Technically, the question asks "How can I simulate a bad internet connection". It doesn't ask for applications to do it. But yes, I think this question is outside the scope of this site. –  Byte56 Aug 30 '13 at 22:52

How can I simulate a bad internet connection with high latency, low bandwidth, jitter and occasional packet loss when in a local environment?

If you're on Windows, you can try SoftPerfect Connection Emulator. It's basically a driver that injects itself between your application and the network layer (similar to Wireshark/WinPCAP) for the selected NIC and can simulate limited bandwidth, latency, packet loss, and other things. The UI is simple and straightforward.

It's a commercial product, but the trial lets you do 30-second bursts of "interference" that should be good enough for you to judge whether this tool does what you want.

Another cross-platform option is DummyNet, which behaves in a similar manner (via ipfw) but is a bit less easy-to-use.

I would like to test how the user-experience works out for someone who has not such a good connection to the server.

I think this part of the question could be restated as "how do I deal with network latency in my application?" One commonly-used and effective technique is Dead Reckoning. The linked article explains it better than I can, but the basic idea is that your clients kind of "simulate" where each entity should be and what it should be doing by an algorithm. Whenever an entity deviates from this algorithm (i.e. player input, server-side event, etc), it sends out an update to each client.

share|improve this answer

I haven't used it in a while, but I've used Charles for testing this. It is an application with various network diagnostics tools, including simulating the problems you mentioned: "a bad internet connection with high latency, low bandwidth, jitter and occasional packet loss"

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.