Notes on Battlezone 2 v1.3 Public Beta 4a MP DLL Source code.

   Disclaimer: this source code release is UNSUPPORTED by Activision,
Pandemic Studios, or anyone else. While it is a complete archive of an
functional multiplayer DLL source code and MS Visual Studio .NET 2005
project, it comes with no warranty, no official support, or anything
else. Use of other compilers may not be supported.

   Note: this source code is NOT required in any way to run BZ2 1.3pb4a
or any other build.  It is only provided to give aspiring DLL authors
a template to work from. If you only want to write a singleplayer DLL,
the BZ2 DLL scriptor (a separate fan-made project) may well be easier
to work with. However, for multiplayer, C++ is a requirement.

   Included in this archive is a complete set of source code needed to
build Battlezone 2's Deathmatch, Instant Action, MPInstant, StratCTF,
and Strategy DLLs for version 1.3 public beta 4a. Probably the easiest
way to build the DLLs is to open up the Missions/Missions.sln file
with VS.NET 2005, and hit build. If you want to access the individual
DLL projects directly, inside the Missions/Deathmatch01 folder, there
is a Deathmatch01.vcproj project file for MS Visual Studio .NET (aka
MSVC). Opening this project in that environment will let you build up
a DLL to the Debug/Missions folder off the root of this
archive. Similarly, the Missions/Instant, Missions/StratCTF,
Missions/Strategy02 and Missions/MPInstant folders contain source code
for the other DLLs.

   If you do not have VS.NET, there is a free download from
http://www.microsoft.com/express/2005/download/default.aspx -- there's
also http://msdn.microsoft.com/vstudio/express/ , but you should get
2005 instead. You may also need the platform sdk from
http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en
.  If you want to develop your own games, you may want to also
download the DirectX SDK from http://msdn.microsoft.com/directx/sdk/
For more info about how to download & install these, please see some
good reference sites like
http://www.codeproject.com/useritems/FreeVS2005Win32.asp (The platform
SDK has some convoluted steps to install, unfortunately)

   Once you have everything unpacked and ready, and the Missions.sln
is opened, for each project (Deathmatch01, ...) right click on it in
the solution explorer, and select properties. Set the Configuration
Properties -> General -> Output Directory to the directory you've got
1.3pb4a or later unpacked to. I'd also recommend for each project,
doing a right click, and selecting rename, in order to ensure that any
DLLs you create do not have the same name as an existing official DLL;
different DLLs across various machines in a MP game will cause Bad
Assets.

   Comments on multiplayer programming: because BZ2 runs in a lockstep
fashion, every DLL running on all of the machines must behave
identically in terms of anything that affects gamestate. Thus, do not
do anything based on the local player, but if you're doing something,
loop over all players, e.g. a loop like

for(int CheckTeam=0;CheckTeam<MAX_TEAMS;CheckTeam++)
{
    Handle h=GetPlayerHandle(CheckTeam);
	if(h)
    { // Player Exists...
		// .. Do stuff here....
	}
}

   Only visual-only things like objectifying targets (see the
ExecuteRace() function) can be done not identically across platforms.
