                                                  <<File version 3.1>>
Contents
========

Introduction
GPL and Winvroc Ideosyncracies
The general idea
Setup guide
FAQ
Additional information
Author


Introduction
============

This is the bandwidth patch readme for servers.

This patch allows you to:
1. Increase the maximim number of cars that GPL will show over modem connections.
2. Specify the number of cars shown behind (applicable to servers only).

Supported GPL versions are 1201 and 1202 (Cpu fix)

I suggest you read the instructions for clients too, so you understand 
what they have to do.


GPL and Winvroc Ideosyncracies
==============================

GPL will not show more than 5 cars over modem connections, even though a well performing 56K client connection can handle 19 cars. The more cars patch changes this artificial maximum from 5 to 19 cars. That is all the more cars patch does, core.ini parameters are not changed by applying the patch.

When a server is started via Winvroc with a fixed bandwidth ("Typical", "Fast" or "Very Fast"), Winvroc forces GPL to use the modem settings, invoking GPL's artificial limit of 5 cars. Therefor to make effective use of the "Fast" and "Very Fast" settings, the more cars patch must be applied on the server and all clients. With the "Typical" bandwidth setting the artificial limit is also there, but it matches the desired bandwidth.
Selecting the "Use core.ini settings" bandwidth setting in Winvroc will not force the use of the modem settings, but it still won't hurt to apply the more cars patch.

Together, GPL's artificial bandwidth limit on modem connections and Winvroc forcing the use of the modem settings make for a bit complex situation.


The general idea
================

The ideal setup in view of the above ideosyncrasies is:

Apply the more cars patch so you can use the Winvroc "Fast" setting next to "Typical", and use core.ini to create one more choice for the bandwidth. This way, three different bandwidth settings can be selected when starting a race from Winvroc, without making any modification on the server itself. If you have limited server bandwidth, you can set the core.ini bandwidth to showing 6 cars for one more car behind (4+2). Or if you have ample server bandwidth and good client connections, you can set the core.ini bandwidth above Fast, for example showing 10 cars (6+4, 7+3 or 8+2) or more.

In order for this to work, the way that the number of cars behind is calculated has been made more flexible in version 3.0 of the bandwidth patch. When applying the cars behind patch, you choose one of method 0-4 to determine the number of cars behind as a fraction of the total cars shown: 

Winvroc/core.ini         Typical   Core.ini   Fast       Core.ini   Core.ini
Send size                84        100        132        164        196
Total cars               5         6          8          10         12

Calculation method       Cars shown (in front+behind)
0. Original GPL (25%)    4+1       5+1        6+2        8+2        9+3
1. Fixed (at say 2)      3+2       4+2        6+2        8+2        10+2
2. Maximum 2             4+1       4+2        6+2        8+2        10+2
3. Maximum 3             4+1       4+2        5+3        7+3        9+3
4. Maximum 4             4+1       4+2        5+3        6+4        8+4


More cars behind are good for:
1. Starts.
2. Recovering from spin, incident, or off track excursion without 
   running into other cars that seem to materialize from nothing. "Behind" 
   is relative to the track, not to the direction in which the driver 
   is looking! So when a driver is facing the wrong way, he will normally 
   see only one car in front of him!
3. Lapping situations, especially in mixed leagues.

Example:

------ Setup time -------    --------------- Race time ------------------
core.ini     cars behind     use vroc                     to
send size    patch method    bandwidth setting            show
---------    ------------    -------------------------    ---------------
100          2               Typical / Core.ini / Fast    4+1 / 4+2 / 6+2
             3               Typical / Core.ini / Fast    4+1 / 4+2 / 5+3
---------    ------------    -------------------------    ---------------
164          3               Typical / Fast / Core.ini    4+1 / 5+3 / 7+3
             4               Typical / Fast / Core.ini    4+1 / 5+3 / 6+4


Being able to choose between these from Winvroc is very beneficial for dedicated servers running several leagues that require or want to use different settings without having to open the server at the file level.


Setup guide
===========

Setting things up:
1. Backup gpl.exe and core.ini in a save place
2. Extract bwpatch.exe to your GPL directory
3. Run bwpatch.exe and follow instructions to apply the more cars 
   patch.
4. In core.ini set:
      [ Communications ] 
      net_mdm_client_send_every = 3
      net_mdm_client_send_size = 84
      net_mdm_server_send_every = 3
      net_mdm_server_send_size = 100    ; show 6 cars (4/2)
      net_use_mdm_bandwidth_for_tcp_ip = 1 
   The 100 (show 6 cars) is an example. Set to your liking. Add 16 
   for every extra car. 
5. Run bwpatch.exe and follow instructions to apply the cars behind patch.
   There are 4 methods to choose from:
      1. Fixed number of cars behind taken from core.ini net_lan_client_send_size
      2. Maximum 2 cars behind (suitable for low bandwidth servers)
      3. Maximum 3 cars behind (suitable for low or high bandwidth servers)
      4. Maximum 4 cars behind (suitable for high bandwidh servers) 
6. If you have selected cars behind patch method 1, in core.ini set:
      [ Communications ] 
      net_lan_client_send_size = 86     ; 84 + #cars shown behind
   The 86 is an example. It will make GPL show 2 cars behind.

Hosting a race:
1. In Winvroc, when hosting the race, go to the GPL Bandwidth 
   Settings on the Server page of the Host screen to choose the bandwidth. 
      "Typical" will show 5 cars
      "Fast" will show 8 
      "Use core.ini settings" will show whatever you set in core.ini.
   You can also host directly, this will have the same effect as 
   "Use core.ini settings". Clients will also have to set core.ini.


Hosting without the more cars patch (not recommended):
1. In core.ini set:
      [ Communications ] 
      net_lan_client_send_every = 3
      net_lan_client_send_size = 84
      net_lan_server_send_every = 3
      net_lan_server_send_size = 164    ; show 10 cars
      net_use_mdm_bandwidth_for_tcp_ip = 0
   Note the different parameter names (net_lan_ vs. net_mdm_).
2. In Winvroc when hosting the race, go to the GPL Bandwidth 
   Settings on the Server page of the Host screen, and choose: 
      Use core.ini settings
   You can also host directly.
   Since you have not patched GPL, the other bandwidth choices
   of Winvroc will always give you 5 cars.
3. The cars behind patch works as described in 5. and 6. above.
   If you use method 1 (Fixed number of cars behind) and use 
   your server to join races too you will get bandwidth mismatch 
   errors because of your larger net_lan_client_send_size.


FAQ
===

1. Clients can't select 'Use core.ini settings' for the GPL Bandwidth Settings in WinVroc's join screen under the Advanced tab

   The server was started in Winvroc using Winvroc's pre-defined bandwidth 
   settings. If this was not meant to be, the server should be restarted 
   specifying 'Use core.ini settings' for the bandwidth. Otherwise tell the
   clients to join anyway.

2. Clients can join but still see only 5 other cars

   The server was started using the conventional settings. 

3. Excessive warping or disconnects

   If it concerns one client, his connection (or isp) cannot handle the 
   increased bandwidth. Otherwise the server cannot handle the combined 
   increased bandwidth of all clients on the server connection.

   If you want to keep the number of cars shown, decrease the demand 
   for bandwidth by changing all send_every parameters from 3 to 4. This
   must be done on the server and all clients. If a client fails to 
   change, the Q-reading on the client will be incorrect.
   Latency will be slightly increased by this change, +0.040 on average,
   and GPL's prediction of where cars are will be slightly more unprecise.

4. You run a non-dedicated server and one or more clients cannot see your car.

   This is an error in GPL. It fails to show the server car to clients who 
   have set a larger server_send_size than the server itself. GPL allows 
   these clients to connect, and they will see all other clients ok, only 
   the server car is not shown to them, and vice versa. To prevent this, 
   make sure all clients use the same server_send_size as the server. The 
   best way to force this is to start the server using Winvroc and choose 
   Typical or Fast for the bandwidth. Winvroc will force the clients to 
   use the same bandwidth. Clients that connect directly will still have 
   to set the server_send_size in core.ini equal to the server setting.
   If you have the server_send_size at 84, this can be done by the client 
   temporarily removing the more cars patch. GPL will then limit its
   server_send_size to 84.


Background information
======================

1. There is no need to remove the morecars patch or change back core.ini for 
"standard" races. Just select Typical (3/84 3/84) for the bandwidth in Winvroc. 
When hosting directly revert to the original core.ini values. 

2. To make sure you copy / edit the right files, set the Windows 
Explorer to always show file extensions:
-  Start Windows Explorer
-  Select View - Folder Options from the menu
-  Select the tab View
-  Under 'Hidden files', select 'Show all files'
-  De-select 'Hide file extensions for known file types'
-  You may also want to uncheck 'Remember each folder's view settings'
-  Click on the button 'Like Current Folder' to use these settings
   for all folders

3. The server upload capacity needs to be sufficient, see 
http://www.xs4all.nl/~westrab/gplol2.htm#band.


Author
======

Bart Westra
http://www.xs4all.nl/~westrab
5 Januar 2003