Bzflag
3D multi-player tank battle game
Install / Use
/learn @BZFlag-Dev/BzflagREADME
BZFlag 2.4.31
https://BZFlag.org/
Copyright (c) 1993-2025 Tim Riker
BZFlag is an Open Source OpenGL multiplayer multiplatform Battle Zone capture the Flag game. At its heart, the game is a 3D first person tank simulation where opposing teams battle for dominance. The game was originally written for SGI computers running Irix, but now runs and is actively maintained on Windows, Linux, Mac OS X, and other platforms.
BZFlag may be redistributed under either the LGPL or MPL licenses.
This is the BZFlag README file. This file includes introductory build instructions, user community interaction references, information for getting involved in BZFlag development, a manifest of the source code layout, basic usage expectations, contact information, and more.
Table of Contents
Introduction
Table of Contents
Obtaining BZFlag
Compiling and Installation
Short Version
Long Version
Communication
Internet Relay Chat
Forums
Bug Reports and Support
Providing Contributions
Source Tree Organization
Public Internet Servers and the "list server"
Notes on "CHEAT" servers and network abuse
Project History and Contributions
Contact
Obtaining BZFlag
Main BZFlag Website: http://BZFlag.org BZFlag Github Site: https://github.com/BZFlag-Dev/bzflag
The main BZFlag website provides access to most all of the resources available for the game. The binary and source distributions of BZFlag are, however, provided on the GitHub project site. Compiled versions are distributed as installable packages, disk images, and more, with details varying depending on the platform. Source code distributions are provided and archived in various formats as well. See the project site for the download links.
BZFlag is also available directly from GitHub. To obtain BZFlag from git, a bit more familiarity with software development is expected. If you're familiar enough, anonymous GIT access is provided from the repository:
https://github.com/BZFlag-Dev/bzflag.git
Compiling and Installation
To compile a playable BZFlag, the following steps should get you up and running quickly if everything external to BZFlag is properly installed:
./autogen.sh ./configure make ./src/bzflag/bzflag
If configure detected everything it needed to build the BZFlag client, after make the client will be sitting in src/bzflag as 'bzflag'. The game can be run from there, though you will probably want to "sudo make install" or otherwise become a privileged user and install the game properly for your system.
If you're building on a platform that has a README.* file, you should consult that file as they usually contain additional instructions or details specific for building on that platform. There are often hints for common problems specific to those platforms as well.
The Longer Version:
To build sources directly from a git clone you need to create a configure script. You can skip this step if you grab a distribution of BZFlag that already has a ./configure script in it, such as from a source distribution tarball. To generate the configure script, you need to run the provided autogen.sh script:
./autogen.sh
The script will report whether sufficient versions of the GNU Build System tools (i.e. autoconf, automake, and libtool) that were detected and if successful, a configure script will be generated. If the script fails, submit a report to the developers containing the output of "sh autogen.sh -v". This will run autogen.sh in verbose mode. One of the most common failures is having insufficient versions or mismatched combinations of the GNU Build System tools, so make sure your tools are recent.
If the previous step was successful you now have a script for configuring BZFlag. This command:
./configure --help
will list the variety of configuration options. The script adapts well to various system configurations, so it may be enough to simply run it as:
./configure
You may want to create a 'work' directory and configure from there to have all the build products and binary executables get placed in a directory separate from the sources. To do this, simply create a directory then run configure and make from there instead.
After configure completes, it will report whether all the requisite packages were found that it needs in order to build the client and the server. The client is reliant upon the following external dependencies that should be installed before running configure:
OpenGL 1.0+ libSDL 1.2+
If you're on an operating system that uses a packaging system (e.g. apt, portage, ports, etc), be sure to install the development kit versions of each of those (e.g. xlibmesa-gl-dev package) so that headers are made available. You may also want to manually install other dependencies that BZFlag automatically provides if you do not have them pre-installed:
c-ares libCURL libregex (usually provided as part of libc) zlib
The README.Linux file includes a detailed list of of the packages needed to compile and run BZFlag on some popular Linux distributions.
The final summary at the end of running configure will report whether the client will be built or not. Once configure has been run, you may compile by simply running 'make'. If you have GNU Make and are on a multiprocessor system, you can build in parallel with the -j option:
make -j4
If compilation was successful, the client will be in src/bzflag and the server will be in src/bzfs as 'bzflag' and 'bzfs' respectively. You can run the client or the server directly from those locations with or without installing:
src/bzflag/bzflag
BZFlag looks for data files in a path defined during compile, in ./data/ , or in the previously specified data path only. As part of the tarball/git clone, the base data library is located in <installed-locale>/bzflag/data. This means that to test in a working directory you need to tell bzflag where to find these files if there is not a 'data' directory in your current directory. This can be done with a symbolic link:
ln -s ./path/to/bzflag/data
After testing you can install BZFlag by running 'make install' with sufficient system installation privileges. Use 'sudo', 'su', or similar methods to elevate your privileges when installing BZFlag system-wide:
sudo make install
You should now have BZFlag in the system directory ready to run.
If you do not have admin privileges on your platform, you can install files in a directory that you own; for this to work, you have to append to the configure command the prefix option:
./configure --prefix=YourHomeDirectoryHere
You will then be able to perform a "make install" without needing to elevate your privileges, and all bzflag executable files will be installed in the subdir bin of the specified path.
For additional information on installing, see INSTALL file.
Again, some platforms may be different. See the README file appropriate to your system for more information.
You can also build an installable package using:
make package
The package will be placed in ./dist; the exact form of the package depends on the platform.
There are three cleanup targets: clean, distclean, and maintainer-clean.
`make clean' removes intermediate files but leaves bzflag and other programs and any man pages.
`make distclean' removes everything clean does and also programs and man pages. This should get things back to a tarball state.
`make maintainer-clean' removes everything distclean does and also packages, directories created during the build, and the platform configuration; this should get the source tree back to its state in the Git repository.
To build BZFlag for an unsupported platform, see PORTING.
The ./configure script has a number of build options that you may find interesting.
Communication
The BZFlag project has several resources set up for communicating both with other developers and with the community. There is an IRC channel and forums.
Internet Relay Chat
Most of the BZFlag development activity and discussions occur over IRC. Join the #bzflag IRC channel on the Libera.Chat network (irc.libera.chat, TLS port 6697) to get involved.
See https://web.libera.chat/ for a web based interface for first-time users. Individuals that intend to stay in the channel are expected to get a non-web-based IRC client. See http://irchelp.org or search the web for IRC clients for your operating system.
Forums
There are extensive and active forums used by players, server operators, administrators, and others available here:
https://forums.bzflag.org
Registering an account on the forums presently also registers your callsign for use inside of BZFlag. Some servers require registration in order to play. See the Getting Started page on our site for more about registration.
Bug Reports and Support
For reporting bugs and unexpected behavior, please go to BZFlag bug tracking system at:
https://github.com/BZFlag-Dev/bzflag/issues
If you require assistance with some issue, please visit the BZFlag IRC channel at #bzflag at irc.libera.chat
Alternatively, discussion forums are also available for resolving issues.
Providing Contributions
Pull Requests should be entered submitted via the GitHub pull system:
https://github.com/BZFlag-Dev/bzflag/pulls
Contributions are gladly accepted for modifications that do not affect the core gameplay. Interacting with the other developers in the IRC channel is recommended for any changes which will affect gameplay.
Source Tree Organization
After unpacking a source distribution, you should have at least the following files in the new 'bzflag' directory:
README - this file README.* - platform specific details AUTHORS - project contributors COPYING - the license for BZFlag ChangeLog - source code cha
