[quake2] playing quake2

Thomas J Fogal tfogal at pascal.unh.edu
Wed Mar 30 14:20:34 EST 2005

 <424AC4D0.40803 at monkeynoodle.org>Jack Coates writes:
> qudos qudos wrote:
> ...
> > P.S. I'm working in quake 2 bots for linux, as i said in another
> > thread i'm not a coder but i'm learning.
> > 
> > I have working not fully 100%
> > 
> > ACEBot (some ctf issues)
> > JABot http://jal.quakedev.com/ (the code need fixes yet)
> > 3ZB2 (crashes ctf with something related about 'BOX_ON_PLANE_SIDE' :[ )
> > DeathMatch bots inside the main quake2 game, works as a mod.
> > Eraser and Eraser Ultra working, bots are joining but when i press the
> > mouse button for joing into the game the crashes.
> > ......
> hi -- tried out JABot last night on my linux server. It launched okay 
> and I got a JABot splashscreen when joining, but sv addbot name (or any 
> other command) exited without doing anything. What can I do to help 
> troubleshoot?

the first step is gdb. find a good tutorial online, but basically:

$ cd /path/to/icc-quake2/debug$ARCH/
$ gdb ./quake2             # or gdb ./sdlquake2, depending on your
                           # preference
(gdb) run +game jabot

and play like normal.

note the debug$ARCH (e.g. debugi386) directory; debugging the release
binaries will give you much less useful information. also, try to make
sure JABot is compiled w/ debugging symbols (-g option to gcc)

Note a couple things i've noticed while debugging quake2 (probably
applicable to a lot of games):

1) you definitely want to run things windowed. this makes it much
easier to get back to the gdb prompt when things segfault.

2) note what you have to do to cause the crash (hopefully its not on
startup...). when you run it under gdb, hit CTRL-G before doing that
magic action, so that you can move the mouse outside the quake2 window.

If you forget #2 you will not be able to move the mouse out of the q2
window when it crashes, which can make debugging a pain in some window

Like I said before, find a mini tutorial on gdb, but usually
'backtrace' (abbreviated: bt) is a good 'first command' to try at the


More information about the quake2 mailing list