|
|||||||||||||||||
|
Getting the most out of online racing with F1 Challenge '99-'02Written by Daniel "DanTheMan" ErikssonHosting racesHosting races is not difficult, but hosting races with no or very little lag requires unbelievable luck or a large portion of black magic. Since I'm a bit short on luck I'll dispense some black magic secrets instead.Basic networkingFirst of all you must make sure others can connect to you. If you are connected directly to the internet without any firewalls or NAT routers you should be able to host races without any changes or modifications. However, most people have at least a personal firewall installed to keep the bad guys out. Unfortunately that firewall will also keep your fellow racers away from your game room.Firewall settingsA computer hosting an F1 Challenge race needs to have (at least) three ports open for incoming connections. These ports are:
The above ports are the base ports used by the game. If one or more of them are already used by another program (not very likely, but possible), the game will try the next higher port. It will continue doing so until it has searched through 100 ports for an unused port (a port not already bound by another program). When hosting a race all other applications should be turned off on the server to maximize its performance. It is therefore highly unlikely any of the base ports are already occupied, but it doesn’t hurt to open a few extra ports when you are messing with the firewall settings. On my own firewall I have opened the base port plus two more, giving me the following table:
NAT routersIf your computer sits behind a NAT router you will not be able to host races unless you can convince whoever controls the NAT router to open and forward certain ports to your computer. The ports are the same that needs to be opened in a firewall (see above).NAT is short for Network Address Translation, and it is usually used to allow many computers on a local network to share one IP address on an Internet connection. The easiest way to find out if you are behind a NAT router is to check the IP address of your computer. The easiest way to do this is to start the command prompt and type the command “ipconfig”.
If your IP address begins with “192.168.” or “10.” then
you are without a doubt behind a NAT router. However, even if your IP address
starts with some other number you could be behind a NAT router. A quick way
to verify this is to use the ShieldsUP! service from Gibson Research. It is
a network scanner that checks to see if your computer is properly protected
against Internet intruders. This is useful to run even if you already know
if your computer is behind a NAT router or not. Point your browser at http://grc.com/default.htm and scroll down until you find the “ShieldsUP!” link (under the “Hot
Spots” heading). Follow that link and click on the “Test My Shields
!” button. At the top of the page you will see the IP number that other
computers on the Internet think you are using. If this number is different
from the number you got from the command prompt above then you are behind a
NAT router. Advanced networkingMaking sure your host is reachable even behind a firewall or a NAT router is only the beginning. There are many other aspects of the physical networking to consider. This section might be useful if you are considering upgrading your Internet connection, or if you want some facts about why some servers seems to work better than others despite slower connections.Connection typesThere are many different ways to connect to the Internet (telephone modems, ISDN, cable modems, different types of DSL connections, radio links, satellite connections, Ethernet, ...). Each has its own performance characteristics, and in most cases it is up to the Internet provider to decide how fast a connection is. Because the speed varies from provider to provider, and even from area to area using the same provider, it is difficult to make any general recommendations on what type of connection will be best.Bandwidth, latency and traffic interchangesThe upstream bandwidth of your connection determines the number of players you can host, and the latency of your connection determines how much lag there will be. Additional lag is created by drivers with very high latency connections and drivers connected to networks to which your Internet provider has slow/bad connections. Bad lag is also created if the number of players is too high for the available bandwidth of your connection.The best measure of the latency of your connection would be the round trip delay to the nearest major traffic interchange. A traffic interchange is a place where many different Internet providers and backbone operators have equipment to route traffic between their networks and the rest of the world. Unless most of your players use the same Internet provider as you, the traffic interchange is where the bulk of your bandwidth will be coming from and going to. If your Internet provider is connected to a big traffic interchange, and has good agreements with other local providers and major backbone operators, chances are good that most users will experience very low latency to your server. However, if your Internet provider has an overloaded network, or if it does not have good traffic interchange with others then users will experience high latency and lots of packet loss (resulting in even more lag). Unfortunately the only way to find out how good an Internet provider is when it comes to traffic interchange is to try it out (or ask an unbiased user). Hosting full grid races (22 cars) requires about 1.5Mbit of bandwidth both
upstream and downstream if you want smooth movements of the cars. Having more
than 1.5Mbit is of course nice, but in most cases you will not be able to take
advantage of the additional bandwidth unless all your drivers have VERY good
connections (512/512 DSL or better). For serious racing it is more important
with low latency and good connections to all the drivers, than it is with high
bandwidth. If you have a choice between a very low latency 2Mbit connection
and a 10 or 100Mbit connection with 20ms more latency and higher rate of packet
loss, then the 2Mbit connection would be the best choice for online gaming. Measuring your network connectionWhen you measure your network connection’s performance it is important that you do it right. Measuring using the wrong tool, or measuring against a server on the other side of the globe will skew your results and might lead you to tune your PLR file so that you get worse performance than you really should have.Measuring basicsWhat you really want to measure is the performance of your upstream bandwidth to the nearest major traffic interchange on the Internet. This will depend on where you are located and what Internet provider you are using. Time of day might also affect the measurement results, so try to run the test around the same time that you usually race online.Unfortunately I cannot provide any information on how to find suitable measuring servers for any other country than Sweden. In Sweden the largest traffic interchange is located in Stockholm, and there is even dedicated test servers located at or very close to the interchange. This makes it trivial to get good measurements. [add blurb about TPTest and Swedish providers] In other countries a good strategy would be to test many different speed measurement
services (that is not operated by your own Internet provider). When you run
tests against test-servers in your own country you will hopefully get pretty
similar results regardless of the server used. Use Google or some other search
engine to locate speed tests. A large collection of online speed tests can
be found here: http://home.cfl.rr.com/eaa/Bandwidth.htm Upstream vs. downstreamMost Internet connections are either symmetrical with the same speed upstream as downstream, or asymmetrical with higher downstream speed than upstream speed. I don’t think there are many providers (if any at all) that offer higher upstream than downstream speed.The speed that your Internet provider puts in advertisements and flyers is
in most cases the downstream speed (because it is the higher number, and the
number that is most important to the majority of Internet users). However,
when hosting online game servers it is very important to have good upstream
speed. You should therefore ask your provider for information about your upstream
speed. Real-world valuesBandwidth costs money for the Internet providers, so they often limit the amount of data that they allow out on the rest of the Internet. This means that even though you have been promised 512kbit/s, that promise might only be valid for traffic inside the network of your Internet provider. When accessing servers outside your own network you will be competing with many others for a fixed amount of bandwidth. Because of this it is often very useful to measure your bandwidth against servers outside your own network. This will give you a more realistic value for how much upstream bandwidth you have at your disposal when we tune the PLR file (below).Also, when running speed measurements, make sure you run a few of them to
different testing servers outside your own network. Some of the testing servers
are overloaded; others might be located on badly connected networks. If you
only measure your bandwidth against one server you run the risk of getting
a much lower value than you really should have, and if you use that value later
on in the PLR file you will be limiting the potential of your server. It is
quite safe to test your speed against as many servers as you want, and then
assume that the number you are looking for is the highest one achieved during
all the tests. Tuning your serverSome of the suggestions below are based on facts, others are based on experience, and some are based on educated guesses about how the netcode in F1 Challenge works.Server FPSOne thing that is often overlooked when trying to optimize a server for maximum number of cars and minimum lag is the FPS of the server. Because of how the netcode is designed, if the server drops down below ~30 FPS it will generate lag regardless of how much bandwidth is available. And since FPS drops significantly as more cars are displayed, the bigger the grids are the more likely the server will be to generate non-network related lag. And to make matters worse, the moment when most cars are at the same place and driving as close as possible is when going into the first turn after the start. It is no coincident that most servers have trouble providing a lag-free experience during the first minute or so of a race because that is when the most bandwidth is used AND it is when the FPS of the server is at an all time low.The only way to “fix” this is to turn down your graphical details on the server so that it never drops below 30FPS even during the start. However, many server operators will notice that even when they turn down the graphical details a LOT, the FPS drop is still significant during the start. A possible solution to this is to limit the number of visible cars on the server. By reducing the number of visible cars from 18 (default) to 8, I went from 36 FPS from the back of the grid to 44 FPS. No other settings changed, and from a racing perspective you will be quite busy keeping track of the 8 cars that are closest to you. Most people will never even notice that there are 10 cars that they cannot see. The setting in the PLR file looks like this: More PLR tuningThere are many settings in the PLR file that should be considered when hosting a server. When I refer to my server below, you should know that the server is connected to the Internet using Ethernet to a router that limits the bandwidth to approximately 1900kbit/s. The router is then connected to an OC-3 (155Mbit) fiber that is connected to a major backbone. It has VERY low latency to the D-GIX traffic interchange in Stockholm, and I have seen round-trip delays as low as 90ms to California (almost half-way around the globe). The proposed settings below might not be suitable for your server.Net Connection Type This should always be set to whatever connection type you really have. If you have DSL, then select the “Cable/DSL” option. This setting defines default values for the Net Data Rate, Net Data Rate Max, and Throttle Upstream Override values described below. Net Data Rate Net Data Rate Max Throttling Throttle Upstream Override Collision Threshold Half Rate Force Physics Tuning your clientTuning the client involves the same settings as used by the server. The only difference is that the Net Data Rate Max value has no effect on the client.[add more text here] |
||||||||||||||||
Visitors: 44826 Page views: 71149
![]() |
|||||||||||||||||