Professional Documents
Culture Documents
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1 Invocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Engine Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 World Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.2 Display Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.3 Player Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Programming Basics . . . . . . . . . . . . . . . . . . . . . . . 5
2.1 Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Bot Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.1 Rifle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.2 Mine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.3 Grenade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.4 Health to Energy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.5 Self Destruct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 Requests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4.1 Clean and Preclean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4.2 Selfplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.5 Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.5.1 Rifle Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.5.2 Mine Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.5.3 Grenade Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.5.4 Destruct Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3 Creating a Bot . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2 Handling Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3 Moving and Shooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 Targeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4 Bot Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.1 Well Behaved Bots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Useful Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2.1 drawface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2.2 drawghost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2.3 drawhand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2.4 drawenterprise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
ii
5 Human Interface. . . . . . . . . . . . . . . . . . . . . . . . . . 21
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Preface 1
Preface
Matbots, not originally under any name, began as a small project to pass the time. It was
a throw away program meant to try out an automated chasing algorithm. A circle traveled
chaotically around a plot while an asterisk limited only by speed, chased this poor circle.
The circle did not care, of course, what the asterisk was doing. It was thinking of nothing
in particular. According to Jerry Seinfeld, this circle was just a typical man: “We’re not
thinking anything. We’re just walking around, looking around. [...] just kinda check stuff
out.”
It was later suggested by an onlooker that this circle should be concerned about the
asterisk. Who wants an asterisk following them around all day? Later on the circle gets
home and an asterisk follows it in the front door. Asterisks are rude. The circle needed
some defense.
To make this work, the circle was given its own personal function! It was granted
autonomy by way of its own address space and scope. Also, as seen all throughout history,
the circle was given a gun to protect this new freedom from the invading asterisk.
But what fun is that if the asterisk doesn’t get a gun as well?
Eventually the asterisk became a circle and more “bots”, with new and unique behavior,
began to join the game. Over time they gained new abilities, such as dropping mines and
high fiving each other. Some bots were better than other bots, which lead to escalation of
skills (and CPU time!). Counter-bots were written to counter these bots. Counter-counter
bots were written to counter these counter-bots ... ad infinitum.
By having these bots written in Matlab, all of Matlab’s tools are at the programmer’s
disposal. A bot could also be written in other languages and interfaced with the Matbots
engine (this is how the human interface works).
Writing a matbot is an exercise in programming as well as mathematics, as the game
area is not discrete. Matbot positions are floating point values. Writing a good targeting
algorithm involves calculus (determining a bot’s future position) and statistics (evaluating
past game data). Writing a successful bot has become more complicated than we (the
Matbot authors) had ever imagined, but it is a lot of fun to stretch our minds around the
puzzles of programming one.
Enjoy programming Matbots!
Chapter 1: Setup 2
1 Setup
1.1 Invocation
To set up a game, edit the file called ‘player_list.txt’. This file should contain a bot
name and a bot team name on each line separated by space. For example,
sniper red_team
sniper red_team
sniper red_team
goose blue_team
goose blue_team
goose blue_team
The above ‘player_list.txt’ file would set up a game of three sniper bots on team
"red team" against three goose bots on team "blue team". Any combination of bots and
teams is allowed.
The game options and settings are stored in ‘engine_settings.m’. This file is executed
by the engine to obtain all in-game values. Bots may also use this to obtain the same
information for use in its programming. See Section 1.2 [Engine Settings], page 2.
To start a game, simply execute the file ‘engine.m’,
>> engine
group_teams_radius determines the radius of the circle in which an entire team starts
when group_teams is enabled. If this is set to 0, all team members will be exactly on top
of each other.
energy_regen and health_regen control the energy and health regeneration rates. Set-
ting these values to zero disables the respective regeneration ability.
move_cost is the energy cost of moving a bot. The actual movement cost is a percentage
of this value based on throttle. 50% throttle will use half of this energy and 100% throttle
will use the entire move_cost amount.
deltaH_max is the maximum amount of angular distance a bot can turn at once. Setting
this to a low value will greatly reduce the movement capabilities of the bots. Setting this
value high will make watching games a boring activity (really!).
1.3 Directories
The Matbots directory should contain three subdirectories and three files: ‘engine.m’,
‘engine_settings.m’, and ‘player_list.txt’. These files were explain previously.
The ‘doc’ subdirectory contains documentation, which should include this document you
are reading now.
The ‘bots’ directory contains all of the bots. Bots can really be thrown anywhere, but
this is where bots should really go. This is where people will look for them.
The ‘func’ directory contains useful functions that some bots use. One such function
is eplot found in ‘eplot.m’. The engine itself uses this function. See Section 4.2 [Useful
Functions], page 17.
The ‘human’ directory contains “bots” that are controlled by human beings (at least in
part) rather than by a program. In it are the needed files to obtain the human input. See
Chapter 5 [Human Interface], page 21.
Chapter 2: Programming Basics 5
2 Programming Basics
2.3 Actions
To perform no action at all, simply return ’none’, or empty (’’), for action.
2.3.1 Rifle
’rifle’ fires a bullet along the bot’s next heading (current heading + deltaH). The speed
of the bullet is: rifle_speed, radius of the bullet damage is rifle_radius, damage caused
by a hit is rifle_damage, and the energy required to fire a bullet is rifle_cost.
Currently, the engine models a rifle shot by a straight line of tangent circles. This leaves
significant gaps along the path that a bot may find itself in. This behavior may change in
the future and it is encouraged to treat bullets as rectangular envelopes along the path of
the bullet.
Bullets disappear after leaving the bounds of the world. They will also disappear after
striking a target. If two targets are on top of each other (or both within rifle_radius)
both targets will be damaged. This allows a single rifle shot to damage more than one bot
at a time.
2.3.2 Mine
’mine’ drops a mine at the bot’s current location. The mine explodes and disappears when
a player comes within its detection radius, mine_radius. The blast radius (the distance
where bots receive damage) is equal to the detection radius. The damage caused by a mine
is mine_damage. The energy required to drop a mine is mine_cost.
A mine sits passively on the ground until another bot who can be damaged by the mine
comes too close. If no bot ever approaches the mine, the mine will sit there forever (or until
the game ends). If two bots wander in range at the same time, they will both be hurt.
2.3.3 Grenade
’grenadeD’ will toss a grenade in the direction of the heading to a distance of D, where D is a
floating point value. A negative value for distance will result in a grenade tossed backwards.
The maximum distance a grenade can be tossed is determined by grenade_throw_max.
Grenade toss heading and distance values are both padded with uniform random values
to give them slight inaccuracy. The random padding amount is determined by grenade_
dfuzz (distance) and grenade_rfuzz (heading).
A grenade explodes upon reaching its toss distance. This explosion releases grenade_
bits rifle shots evenly in all directions from the explosion. The explosion itself does no
damage. Note that when team damage is enabled with team_damage, the rifle shots from
the grenade explosion can hurt the player that tossed the grenade.
This code will log a grenade 1.6 units in front of the bot,
% Toss a grenade 1.6 meters
action = [’grenade’ num2str(1.6)];
A grenade costs grenade_cost and travels at a speed of grenade_speed.
action string would be ’HtoE10’. The conversion rate between health and energy is stored
in health_energy_ratio. You might code it as,
% Convert 10 health to energy
action = [’HtoE’ num2str(10)];
Attempting to convert health into more energy than you can add is safe, i.e. a bot will
not lose health when energy is maxed out. A bot can, however, kill itself by transferring all
health to energy.
This process also works in reverse to convert energy to health. Do this by appending a
negative number. For example, ’HtoE-8’ will convert energy into 8 health.
2.4 Requests
Currently there are three requests that the engine makes. There may be more in the future,
which means that a bot should always return values and be prepared for unknown requests.
Basically this means a bot should ignore unknown requests by returning empty or zero
values when they come up.
2.4.2 Selfplot
The ’selfplot’ request is a query to the bot about drawing preference. That is, if the bot
responds with a yes, the bot indicates that it would like to handle its own drawing routines
with eplot (see Section 4.3 [Bot Plotting], page 18).
To reply with a yes, the action field must be equal to ’selfplot’, the same as the
request. The simplest way to respond in the positive is,
if strcmp(req, ’selfplot’)
deltaH = 0;
throttle = 0;
Chapter 2: Programming Basics 9
action = req;
return;
end
The bot’s drawing should generally remain inside of a 0.25 by 0.25 area, or within radius
of 0.125. For visibility purposes, the heading line may extend beyond this limit, just as the
heading_length probably does. But do not let these boundaries interrupt creative juices,
of course!
If the bot’s drawing shape is not going to be radial (like the default circle shape), it
would be wise for the bot to rotate its drawing to match its new heading. This can be done
with a rotation transformation,
rotation_matrix = [ cos(heading) -sin(heading) ; ...
sin(heading) cos(heading) ];
If the bot’s drawing vectors are stored in x and y,
rotated_vectors = rotation_matrix * [ x ; y ];
And then we just plot this,
eplot (rotated_vectors(1,:), rotated_vectors(2,:), ...
’Color’, player{9});
This example will draw a bot as a box with a heading line,
engine_settings;
px = player{1};
py = player{2};
% new heading
nh = player{8} + deltaH;
% Box
eplot(p(1,:) + px, p(2,:) + py, ’Color’, player{9});
% Heading
eplot( ...
[px, px + cos(nh) * heading_length], ...
[py, py + sin(nh) * heading_length], ...
’Color’, player{9});
The box will rotate to face the same direction as the bot.
2.5 Objects
Currently, all bots can see all objects in the game field, which includes the bullets from
’rifle’ shots. This means a bot can dodge bullets if it is clever enough.
Chapter 2: Programming Basics 10
All object state vectors (see Section 2.1 [Data Structures], page 5) begin with the name
of the object.
6. Player
7. Color
8. Distance to target
The grenade is located at (x-position, y-position) and traveling in the direction heading
at grenade_speed. When distance to target is 0, the grenade explodes. The resulting rifle
shots will belong to team team and player player.
3 Creating a Bot
This chapter will go through a step-by-step process of creating a simple seek and destroy
bot that has memory. Even if you think you are ready to get started, you should take a look
at this chapter to see how to avoid making some mistakes. It is also a guide on creating
well behaved bots.
3.1 Initialization
First, you should drop in the function boilerplate (with your bot’s name) at the top of the
file,
function [deltaH throttle action] ...
= bot_name (state, player, objects, req)
Replace bot_name with the name of your bot (and the m-file).
Every non-trivial bot should call engine_settings at the beginning of the bot’s code.
This will provide access to all of the game settings. This will allow you to write a bot that
doesn’t contain magic numbers or is tuned to any particular configuration.
Another good idea is to set all of the outputs in the case that they are not set later
before the function returns.
deltaH = 0;
throttle = 0;
action = ’’;
3.4 Memory
Memory involves saving variables that a bot may need later into a ‘.mat’ file. This mat file
should be unique for the bot, or at least the bot’s team. If it isn’t, the bot may interfere
with enemy bots attempting to use the same file.
Here is an example of memory being used to reduce the fire rate of the bot in the previous
section,
datafile = [’example-bot-’ num2str(player{6}) ’.mat’];
throttle = 0.5;
% Do we shoot now?
if rifle_timer > 20
% reset timer
rifle_timer = 0;
action = ’rifle’;
else
action = ’’;
% increase timer
rifle_timer = rifle_timer + 1;
end
% do nothing more
deltaH = 0;
throttle = 0;
action = ’’;
return;
end
The second issue is resolved by using the actual values for the energy regeneration rate,
energy_regen and the rifle energy cost, rifle_cost. We also want to take into account
that we are moving (at cost move_cost) and the energy regeneration rate is lower. First,
the bot needs to obtain these values,
engine_settings;
Now use the values,
if rifle_timer >= rifle_cost / (energy_regen - throttle * move_cost)
...
end
The bot will now fire at the same rate that its energy regenerates, helping ensure that
it will never run out of energy. With certain settings, there may be issues with divide by
Chapter 3: Creating a Bot 15
zero and negative numbers. This is left as an exercise to the reader (because we don’t feel
like writing it out!).
A full listing of this bot’s code is in Appendix A [Simple Example], page 22.
3.5 Targeting
Continuing the use of the above code, we will add targeting to the code. There is no official
targeting interface. A bot just picks an enemy bot and sticks with it.
This example will pick an enemy bot at random, remember that bot as a target, and
pursue the bot until it is dead. The full code for this bot is available in the appendix.
Appendix B [Targeting Bot], page 23.
We want to store our target in memory (the .mat file) so we know who we have targeted
later. We will adjust the save command at the end of the code,
save (datafile, ’rifle_timer’, ’target’);
We also want to initialize the target, so we will put this below the initialization of
rifle_timer,
else
rifle_timer = 0;
target = -1;
end
We set it to -1 because no bot will ever have this number. It will force the bot to choose
a target right away.
Let us now check to see if our current target is alive.
target_index = -1;
for i = 1:length(state)
if state{i}{6} == target
target_index = i;
break;
end
end
If our target is dead, target_index was never set. In this case, let’s choose a new target
at random. To do this, we will need to create a list of enemy bots,
enemy_list = [];
enemy_index = [];
for i = 1:length(state)
if ~strcmp(state{i}{5}, player{5});
enemy_list = [enemy_list state(i)];
enemy_index = [enemy_index i];
end
end
If there are no enemies, we do nothing.
if isempty(enemy_list)
deltaH = 0;
throttle = 0;
Chapter 3: Creating a Bot 16
action = ’’;
return;
end
enemy_list is now a non-empty list of enemies for us to choose from. Choose one at
random,
sel_index = ceil (rand * length(enemy_list));
target = enemy_list{sel_index}{6};
target_index = enemy_index(sel_index);
Now we have a target and know it’s index into the state vector. Let’s turn our bot to
face this enemy at his current position. In this example, we will not attempt to predict
enemy movement and shoot there. This is left up to you, the bot programmer, to solve.
There are many different ways to solve this problem, some better than others.
Calculate the heading required to face the other bot,
target_heading = atan2(state{target_index}{2} - player{2}, ...
state{target_index}{1} - player{1});
Now we set deltaH to this difference, causing the bot to turn in the correct direction,
deltaH = target_heading - player{8};
This completes our search and destroy bot. For the full code, see Appendix B [Targeting
Bot], page 23.
Chapter 4: Bot Behavior 17
4 Bot Behavior
4.2.1 drawface
This function draws a face,
function drawface (xpos, ypos, heading, radius, color)
The face is drawn at (xpos, ypos) leering in direction heading. Its size is radius and
color is color. Generally, you will want to pass player{9} in as the color.
4.2.2 drawghost
Draws a ghost from the famous game Pacman,
function drawghost (xpos, ypos, heading, radius, color)
The Pacman ghost is drawn at (xpos, ypos) drifting in direction heading. Its size is
radius and color is color. Generally, you will want to pass player{9} in as the color.
Chapter 4: Bot Behavior 18
4.2.3 drawhand
Draws a hand proudly displaying its favorite finger,
function drawhand (xpos, ypos, heading, radius, color)
An offensive drawing is plotted at (xpos, ypos) pointing in direction heading. Its size
is radius and color is color. Generally, you will want to pass player{9} in as the color.
4.2.4 drawenterprise
Draws the starship Enterprise (from Star Trek),
function drawenterprise (xpos, ypos, heading, radius, color)
The Enterprise is drawn at (xpos, ypos) engaging in direction heading. Its size is radius
and color is color. Generally, you will want to pass player{9} in as the color.
5 Human Interface
A human interface exists to allow you to control a bot during the gameplay. In situations
where the game has slowed way down, control may become very difficult.
Currently, only joystick input is available. Until other interfaces are figured out, this will
be the only human input. You will need to have Simulink, but no special Simulink packages.
An s-function has been written in C to interface the with joystick. This s-function is placed
inside Simulink where values can be pulled from the joystick inputs.
Adjustments to the “human*.m” bots may be needed to fit your joystick. The values
are obtained in the call,
sim(’getjoy’);
The joystick input is still experimental and has not been tested very much. Getting it
to work may take some effort. Or, it may just work for you.
The axis values are stored in the array joyaxis, buttons in joybutton and the hat
in joyhat. Axis values are between -1 and 1. Buttons are either 0 (unpressed) and 1
(pressed). The hat values are between 0 and 8 inclusive, indicating the 9 possible hat
positions. Experiment to find out what values match what joystick inputs.
“human” is a simple interface for a single stick joystick. Forward and backward control
throttle. Left and right control heading changes.
“human tank” is made for two stick gamepads. Controls work like tank treads. Forward
is both sticks forward. Backward is both sticks backward. Turning is full back on one and
full forward on the other. Combinations in between these lead to circular movement.
“human hdcmd” (heading command) is what many people will find as the most comfort-
able, but it requires three axes. This will work fine on a normal joystick with a “throttle”
axis. The joystick directly commands the heading and the third axis controls the throttle.
This input type allows for maximum control of the bot.
Appendix A: Simple Example 22
engine_settings;
% do nothing more
deltaH = 0;
throttle = 0;
action = ’’;
return;
end
% Do we shoot now?
if rifle_timer >= rifle_cost / (energy_regen - throttle * move_cost)
% reset timer
rifle_timer = 0;
action = ’rifle’;
else
action = ’’;
% increase timer
rifle_timer = rifle_timer + 1;
end
engine_settings;
% do nothing more
deltaH = 0;
throttle = 0;
action = ’’;
return;
end
target_index = -1;
for i = 1:length(state)
if state{i}{6} == target
target_index = i;
break;
end
end
if target_index == -1
enemy_list = [];
enemy_index = [];
for i = 1:length(state)
if ~strcmp(state{i}{5}, player{5});
enemy_list = [enemy_list state(i)];
enemy_index = [enemy_index i];
end
end
if isempty(enemy_list)
deltaH = 0;
throttle = 0;
Appendix B: Targeting Bot 24
action = ’’;
return;
end
% Constant throttle
throttle = 0.5;
% Do we shoot now?
if rifle_timer >= rifle_cost / (energy_regen - throttle * move_cost)
% reset timer
rifle_timer = 0;
action = ’rifle’;
else
action = ’’;
% increase timer
rifle_timer = rifle_timer + 1;
end
Index
A I
action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 initialization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
B M
boilerplate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 magic number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
mine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
mines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
C movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4, 13
circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
clean. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 O
objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6, 9
order of execution . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
D
deltaH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4, 6
destruct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 P
display settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 player list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
player mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
player number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
E player position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
energy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 5 player settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
energy to health transfer . . . . . . . . . . . . . . . . . . . . . . 7 player list.txt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
engine settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2, 18 preclean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
engine.m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
engine settings.m . . . . . . . . . . . . . . . . . . . . . . . . . . 2, 12
eplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 18
R
execution order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 radial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 18
record game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
F requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6, 8, 12
face . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 rifle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 10
fill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
friendly fire. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 rotation transformation . . . . . . . . . . . . . . . . . . . . . . . 9
func . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
function handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2, 5 S
function name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
script game. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
self destruct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 11
G selfplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
grenade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 10 settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
grouping teams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 shooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
state vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 6, 9
suicide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
H
heading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 6 T
headshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 target dummies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
health . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3, 5 targeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
health to energy transfer . . . . . . . . . . . . . . . . . . . . . . 7 text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
hiding player information . . . . . . . . . . . . . . . . . . . . . . 2 throttle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6, 13
human . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Index 26
U world . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
unique filename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 world settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
W Z
well behaved . . . . . . . . . . . . . . . . . . . . . . . 6, 13, 14, 17 zombie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19