Multi-player CGF
Originally designed as a single-player, mission oriented variation of Action Quake2,
CGF now (in CGF 0.81 and later versions) also supports multi-player games.
The following kinds of multi-player games are supported:
- co-op multi-player
(standard missions or missions designed for multi-player, with multiple players in a single team)
- team-on-team multi-player
(missions specifically designed for multi-player, with players distributed over multiple teams)
Multi-player is both supported on so-called 'listen' servers and 'dedicated' servers.
Multi-player CGF on a 'listen' server
server: Multi-player CGF on a 'listen' server is the easiest way to run a multi-player CGF mission.
The player hosting the game launches CGF like he would for a single player
game (pick a mission using the CGF Launcher). He also informs fellow LAN clients of his IP address.
A first mission will start automatically, and he'll be the only player participating. In subsequent
missions, however, all other players who have connected in time to his machine will participate in the mission.
client: For a client to join a multi-player game, he only needs to connect to the server running
the CGF missions. Upon connecting, the client is temporarily an observer, but when the next mission is about
to start, he will be informed of this (see center image above).
Note that, to participate in missions that use the 'optional' weapons, the client needs to have installed
the CGF optional weapons.
Multi-player CGF on a 'dedicated' server
server: Setting up a dedicated server to run CGF missions requires a bit of manual configuration. The server is launched
using the following command line (as an example):
quake2.exe +set game action +set dedicated 1 +set maxclients 32 +exec _cgf.cfg
The _cgf.cfg containing server start instructions can be generated by the CGF Launcher, but requires editing: the
mission command should be preceded by a 'sv' (to make it a server instruction):
set cgf 1
set deathmatch 1
set teamplay 1
set dmflags 2883
gamemap coverme
sv mission coverme_defense1.cgf
//The following files were found in config.lst
//They will be exectuted when CGF has loaded.
exec extras.cfg
Upon launching the dedicated server, the server will postpone launching the mission until the first
client connects. The server then waits for some 20 seconds (allowing other clients to connect as well),
and starts the mission. All clients present in time for the first mission will participate in the
first mission. If they connect to the server at a later
time, they will participate in the next mission.
client: For a client to join a multi-player game, he performs the same actions as for connecting
to a listen server.
Note: technically, you could run CGF as a player-only game over the internet; you'd get a
mission oriented variation of AQ2 1.51 (with additional guns). However, CGF isn't as reliable as
AQ2 1.52 and lacks the ease of configuration. I advice against using CGF this way.
Note: fog doesn't work in multi-player games (I cannot find a means to have the server enforce
fog on the clients).
Default: co-op multi-player using standard CGF missions
When running standard CGF missions (not designed for mult-player, and thus containing
only a single 'player' character in the mission), CGF takes into account additional
players as follows:
- all players present are part of the same team when the mission starts
- the model, skin and load-out (ammo, items and weapons) for the player character
defined are assigned to the additional players as well
- all players are dropped into the level in column formation
In other words, this turns CGF into a co-op multi-player game: instead of a single
player, multiple player can try to achieve the mission objective.
Note: most CGF missions have been written and balanced for a single player. You might
find the missions too easy to accomplish when playing with the help of some of your friends.
In that case, you might want to (using the CGF Launcher) increase the skill of the bots,
issue them kevlar vests, issue them better weapons, or (by editing the mission by hand)
add more bots in the opposing forces' teams.
Specific multi-player missions: team-on-team
From CGF 0.81 onwards, you can accomodate additional players in your CGF missions (without
disturbing single-player mission) behavior. Instead of incorporating a single player in
the mission, you can incorporate multiple players in multiple teams, and provide each with
a unique combination of model, skin, and load-out. For example:
list 1: team definition, accomodating multiple (multi-) players
with their own outfit and load-out
---------------------------
force "Marines"
{
team "Bravo-team"
{
player "Bravo-1" "male/commando"
{
weapon "AK47 Assault Rifle";
};
player "Bravo-2" "male/seal"
{
weapon "AK97 Submachinegun";
};
};
};
On each mission start, players are assigned random roles in the team (so you're not stuck
to a specific start position and gun all the time).
In case there aren't sufficient players to fill out the team, player definitions are removed
upon mission start. In other words, adding multiple player definitions to a team doesn't
affect the mission's fitness for single-player entertainment.
If the team doesn't include as many player definitions as is required to accomodate all
players, the last player character definition is duplicated to suit additional team members.
Instead of allocating multiple players to a single team, you can also spread them over
multiple teams (remember to include either players or bot into a team), or even over multiple
forces:
list 2: team definition, accomodating multiple (multi-) players
with their own outfit and load-out in opposing forces
---------------------------
force "Marines"
{
team "Bravo-team"
{
player "Bravo-1" "male/commando"
{
weapon "M4 Assault Rifle";
};
};
};
force "Terrorists"
{
team "Red-team"
{
player "Red-1" "messiah/slug"
{
weapon "AK47 Assault Rifle";
};
};
};
William