quake/articles/1997/art-1456
Path: mantis!not-for-mail
From: -= mike =-
Newsgroups: rec.games.computer.quake.announce
Subject: the client-side quake bot FAQ
Date: 4 Jun 1997 10:49:08 +0100
Organization: The University of Calgary
Lines: 282
Sender: moderate@jobstream.co.uk
Approved: quake@mantis.co.uk
Message-ID:
_______________________________________________________________
the Client-Side Quake Bot FAQ
_______________________________________________________________
Contents
_______________________________________________________________
* 0 FAQ information
+ 0.1 Copyright
+ 0.2 Availability
+ 0.3 Disclaimer
* 1 General Questions
+ 1.1 What is a client-side bot?
+ 1.2 Why not use quake-C?
+ 1.3 What is a proxy-bot?
+ 1.4 What is a Quake Bot
* 2 Various Bots
+ 2.1 What is Stooge-Bot?
+ 2.2 What is QuakeBot C/S?
+ 2.3 What is mikeBot?
+ 2.4 What is mystery bot?
+ 2.5 What is JavaBot?
+ 2.6 What is Terminator?
+ 2.7 What is Loef Bot?
* 3 Client-Side Bot Abilities
+ 3.1 What can client-side bots see?
+ 3.2 Bots are cheating, right?
+ 3.3 How do bots navigate?
+ 3.4 How do bots aim?
* 4 Resources
+ 4.1 How does the client-sever architecure work?
+ 4.2 Can I get a "quick start" into the AI?
_______________________________________________________________
FAQ Information
_______________________________________________________________
0.1 Copyright
All the content contained in this FAQ was created by Mike Warren
(mbwarren@acs.ucalgary.ca) and is copyright =A9 1997. All rights
reserved. Permission is granted to copy and redistribute this FAQ
in any form provided it is not altered in any way and provided no
money is received for said redistribution.
0.2 Availability
The FAQ is available at:
* http://www.ucalgary.ca/~mbwarren/mikeBot/faq.html
* http://www.ucaglary.ca/~mbwarren/mikeBot/faq.txt
* Posted montly to rec.games.computer.quake.editing
* By sending mail with subject "SEND-BOT-FAQ" to
mbwarren@acs.ucalgary.ca
0.3 Disclaimer
This FAQ is intended to be accurate and up-to-date. However, the
author cannot be held responsible for any untoward events stemming
from information contained in this document.
_______________________________________________________________
General Questions
_______________________________________________________________
1.1 What is a client-side bot?
A client-side bot is a completely independent program written in a
"real" language like C or C++ (opposed to quake-C) which connects
to quake servers like a "real" quake client. Servers cannot
distinguish* between an actual quake client and the fake quake
clients which are client-side bots.
1.2 Why not use quake-C?
Quake-C, the interpreted language used by the Quake engine, is
fairly robust, and bots have been written using it. However,
client-side bots offer a few advantages: they can access files, hog
all the CPU power on a machine and not bog down the server, and
have far less ability to "cheat". See 3.1 What can client-side bots
see?
1.3 What is a proxy-bot?
A proxy is a program which sits between the client and server and
passes messages between the two. A proxy-bot (like Stooge Bot) does
basically the same thing, with one important difference: it edits
the packets, in Stooge's case it changes the client-to-server
movement packets and aims for the player. Proxy-bots are usually
frowned upon as "cheating".
1.4 What is a Quake Bot?
A Quake Bot is a program written to simulate a human player in id
software's game Quake. They can either be client-side or
server-side. Server-side bots are written in the interpreted
language quake-C used by Quake and are sometimes referred to as
QuakeC Bots.
_______________________________________________________________
Various Bots
_______________________________________________________________
2.1 What is Stooge-Bot?
Stooge Bot, at http://www-graphics.stanford.edu/~quake, is a
client-side "helper" bot. What is does, and what most people think
of when you say "bot", is aim for a human driver. Quite possibly
the best such bot, it is frowned on by most people, but is easily
recognizable by the "SBot" prefix put in front of its name. Servers
can ban it by center-printing "no bots please" and players can kick
Stooge by saying "humans only please". Executables for windows 95,
SGI Irix and Linux are available at the well-designed Stoogebot
Project pages, as is a .DEMo recording proxy and some .DEMos of
Stooge in action.
2.2 What is QuakeBot C/S?
Programmed by Jim Rorie and John Simmerman, QuakeBot C/S is a
client-side bot written in C++ for Windows 95, with some support
for unix (I compiled it on SunOS with g++, but it consistenly seg
faulted right away...) The source code is availiable, making it an
excellent base for people who want to immediatly start programming
AI. The AI which comes with the bot is fairly limited but is
currently being improved. It is availiable from
http://www.coe.uncc.edu/~jfrorie/quakebot.htm.
2.3 What is mikeBot?
mikeBot is programmed by Mike Warren, this FAQ maintainer, and is
perhaps one of the most advanced client-side bots available. It is
programmed in C++ for unix, but includes Windows 95 support;
MSVC++, g++, CC, and cc on AIX all compile it. It has been run on
SunOS, Solaris, AIX 4, Windows 95 and Linux. mikeBot includes
partial source, with skeleton AI, allowing fast development of your
own bot. Also, observer mode with unlimited* observers, .DEMo
recording, BSP loading and line-of-sight functionality are all
included in the source. Visit the mikeBot Project at
http://www.ucalgary.ca/~mbwarren/mikeBot/. You can download .DEMos,
source and read descriptions of algorithms and furture plans for
mikeBot, which include using a Genetic Algorithm for target
selection and adaptive skill levels which will make mikeBot less
likely to hit less-skilled players and more likely to hit better
players. There is not yet a binary available.
2.4 What is mystery bot?
This mysterious bot by Ripper is based on QuakeBot C/S code,
although there is mention that he is switching to Terminator source
on his site at http://mystery.telefragged.com. Mystery bot has
advanced line-of-sight algorithms and is the only bot I know of
which uses the grappling hook intelligently. It also understands
CTF rules and entities and normal quake powerups. There is both a
linux and windows 95 executable available.
2.5 What is JavaBot
The only client-side bot written in Java, JavaBot doesn't shoot
walls (line-of-sight), uses predictive firecontrol and tracks all
entities. Ben Schwartzlander is currently working on BSP-based
navigation. JavaBot can also record .DEMos, some of which are
downloadable from his site at
http://www.cis.ohio-state.edu/~swartzla, which further explains
JavaBot's capabilities. No source or .exe are available, but Ben
plans on releasing both when they are presentable.
2.6 What is Terminator
Terminator is both an autonomous bot and a "helper" like Stooge. It
was made well before Stooge, however, so can lay claim to being the
first proxy-bot and one of the first quake bots period. It is
written in ANSI C and the source code is available. There is
Windows 95, SunOS, AIX and Linux support. Terminator can be found
at http://www.ens.fr/~cridlig/bot/index.html, which also explains
parts of the Quake World protocol and has links to the author's QW
proxy, CamlBot.
2.7 What is Loef Bot
Loef Bot is a proxy-bot much like Stooge, heavily based on the
Terminator source. Source code is available at
http://www.mindspring.com/~jamesloe. Regrettably, Loef Bot does not
include the "no bots" safeties that Stooge does. Executable for
windows 95.
_______________________________________________________________
Client-Side Bot Abilities
_______________________________________________________________
3.1 What can client-side bots see?
Client-side bots can see a little more than human quake players.
Because of lag considerations, the server sends entity updates for
every potentially visible entity; for every entity in the bot's
current leaf's PVS*, the bot gets an entity update. Also, of
course, the bot can see in 360 degrees around it. One (partial)
solution for this would be to fileter out entity updates which you
can't see (by performing a line-of-sight calculation on it). Or, a
proxy packet filter could do this...(none exist, but I may make
one). It is important to note that client-side bots can see far
less than server-side bots, which can potentially see every entity
in the entire level.
3.2 Bots are cheating, right?
Wrong!. Yes, Proxy bots, like Stooge and Loef are cheating because
the bot is doing the aiming for a human player, but there are many
fully autonomous bots which are complete Quake players. It is no
more cheating to have a bot playing than it is to play against a
really good (human) Quake player. Autonomous means the bot does
everything itself, from navigation and fireing to weapon selection.
3.3 How do bots navigate?
Currently, there are no bots which navigate based on the BSP tree;
most bots just run straigt at whatever they want. Some first see if
there is a line-of-sight to the entity. Client-side bot navigation
is still very rudimentry.
3.4 How do bots aim?
Client-side bots can aim very well. By calculating where a player
will be when the projectile they are firing will hit them, bots can
"lead" their targets with deadly accuracy. Also, bots like Stooge
and mikeBot compensate for lag when aiming. For exact algorithms,
check out the Stooge Bot or the mikeBot Project. Both URLs are
available in the Various Bots section of the FAQ.
_______________________________________________________________
Resources
_______________________________________________________________
4.1 How does the client-server architecture work?
When you play quake, all the entity movement calculations are
performed at the server end. The client tells the server where the
players wants to move and displays the level and entities the
server tells it to. There are more detailed explanations here:
http://www.upd.edu.ph/~oliber/quake/qnp.html
Description of control packets and the connection handshake
procedure.
http://www.coe.uncc.edu/~jfrorie/QuakeSpecs.htm
This excellent handbook by QuakeBot C/S author Jim Rorie
explains everything from connecting to runtime packets. Very
useful.
http://www.physik.uni-leipzig.de/~girlich/games/doc/dem-1.0.3.html
A description of the .DEM file format, which also happens to be
the same as the server-to-client protocol. An invaluable
resource.
4.2 Can I get a "quick start" into the AI?
Yes. Both QuakeBot C/S and the mikeBot Project have C++ source
available which is designed for you to add AI routines and have a
working client-side quake bot. Terminator has C source available,
and although not intented as a base for new client-bot development
as QuakeBot C/S and mikeBot are, you can easily strip the AI
routines and add your own. All URLs are in the Various Bots
section.
_______________________________________________________________
Footnotes
[1] * Bots which move indepently of where they are firing (most
client-side bots, whether autonomous or not) can be detected with
some quake-C patches. However, the server cannot tell through the
protocol whether a client is a bot or not.
[2] * Depending on CPU power and bandwitdh. Up to 10 or so should
be no problem.
[3] * Potentially Visible Set. See the Quake Specifications for
more.
_______________________________________________________________
This FAQ is copyright =A9 1997
Mike Warren. All rights reserved.
mbwarren@acs.ucalgary.ca