Like Brian said, I found much easier to write this as part of our network
layer. We have full control over the kind of situations to generate. In
theory, DirectPlay includes a network simulator thing with these kinds of
features, but we never got it to work reliably.
We would do the following types of things:
- Simulate packet loss by discarding non-guaranteed packets, and delaying
delivery of guaranteed packets (and all packets that follow).
- Simulate network congestion by queuing and delaying packets based on
amount of traffic.
- Simulate high pings or lagspikes by delaying everything by a set amount
of time.
- Simulate network disconnection by dropping all packets.
With this, a good packet sniffer to ensure that the physical traffic
reflects your expectations, and some testing in real conditions, you should
be good to go. With a higher level API like DirectPlay you need the packet
sniffer a lot more because DP does some packet management behind your back,
but the overall concept still works.
Javier Arevalo
Pyro Studios
Ivan-Assen Ivanov wrote:
> We're hunting down some nasty and rare problems in our netcode
> which only happen over slow, congested connections.
> Buying a bunch of modems and dialing an ISP over our
> telephone exchange is an option, but seems like a major PITA.
>
> Have you heard about some kind of software that throttles down
> your LAN connection speed, drops packets etc.?
|