Block Arena

Home --> Computer Games --> Block Arena
Client Commands Description of the client commands
Client Environment The client environment variables
Server Commands Description of the server commands
Server Environment The server environment variables
File Format Block Arena map file format

Download Block Arena 0.9 (Windows Binary)

Block Arena is a first person shooter game where the levels are "block worlds". The project is a continuation of the ill-fated Infinifrag 2 project that Zach Barth and myself were working on (so some of the code is quite old)! The idea is that a block map is easy to build by hand (or procedurally generate), which greatly simplifies level design. The maps themselves are intended to be like those in unreal tournament or quake. The block building mechanic is more for the purpose of level design, but this may change when the engine becomes more sophistocated.

Disclaimer: I am not really interested in making a game. Rather, I am just interested in some of the technical aspects of a first person shoot game. Because of this, many parts of the program I have put almost no time into (the weapons, the heads up display, the game mechanics, etc). The project is essentially an engine that I am writing for learning purposes. I have spent much more time working on issues such as efficient rendering (comming up with the Quad Algorithm), lighting (creating shadow maps), collision detection, player movement, displaying Quake 2 MD2 models, an environment (for variables that the user can change), a command system, etc.

How To Play

To start the server, CD into the main directory and run the following command: "./BlockArena.exe -s GameParams/server_params.txt". As a default, the server uses port 3456. To customize the server (including setting the server password, which is highly recommended), edit the text file GameParams/server_params.txt. In order to create and destroy blocks, the variable debug.level_editor_mode should be set to true.

To start the server, CD into the main directory and run the following command: "./BlockArena.exe -c GameParams/client_params.txt". Client parameters are set in the text file GameParams/client_params.txt. Make sure to set the variable SERVER_IP to the IP address of the server. The most important variable in the file client_params.txt is DISABLE_COMPILED_MAPS. If this is set to true (and the server variable debug.level_editor_mode is set to true), then blocks can be built. If DISABLE_COMPILED_MAPS is set to false, then blocks cannot be built but shadow maps are used for lighting. Currently, blocks should only be built when a single user is using the program because of network issues.


I have not created any of the sounds: they are primarily from I have not created the cross hair texture, the particle texture, or the font texture. I have only included one Quake 2 character model (which I found by digging around online) in order to save space. The code, on the other hand, has all been written from scratch. I have created the ammo box textures as well as many of the block textures, though I have not spent very long on them ^_^.

Special thanks to Zach Barth for many stimulating conversations during the development of Infinifrag 2. I am also very grateful for Jon Brandvein for numerous comments about the software architecture.


In order to customize the client and server, within the client press the "grave" key to bring down the terminal. In the terminal, various commands can be entered. Some of the very important commands are help, get, set, cd, pwd and ls. The command help describes what specific commands do. The commands get and set can be used to get and set environment variables. The commands cd, pwd, and ls can be used to navigate through the environment (the environment variables are stored as if in a file system). Compound commands can be entered as LISP style "S expressions".

To connect to the server, type "server" into the terminal. Once connected to the server, you must enter the password of the server. For example, if the password of the server is foobar, then enter the command "password foobar". To go back to client mode, type "client" into the terminal.

Feature List

* The server is started by running the following command from the top directory of BlockArena: "./BlockArena.exe -s GameParams/server_params.txt". If you want, you can specify a different server parameters file.

* Within the server parameters file (by default, "GameParams/server_params.txt") you can set important environment variables for the server. For example, "metagame.port" stores which UDP port the server will try to bind to. Also, "" stores the password that is needed to access the server from the clients.

* The client is started by running the following command from the top directory of BlockArena: "./BlockArena.exe -c GameParams/client_params.txt". If you want, you can specify a different client parameters file.

* Within the client parameters file (by default, "GameParams/client_params.txt") you can set important environment variables for the client. For example, "server.ip" and "server.port" need to be set correctly in order to access the server. Also, the screen width and height should be set to appropriate values (that of the desktop, for example).

* The standard output of the server is redirected to Output/ServerOutput.txt. The standard output of the client is redirected to Output/ClientOutput.txt. Neither the client nor the server should output anything to stderr.

* The engine of Block Arena uses an internal environment for variables as well as a simple LISP-style command system. The user can access the command system from within the client by using the terminal. The terminal can be toggled by hitting the '~' key. That terminal can also be used for accessing the server as well.

* When the server starts up, by default the script "GameParams/Scripts/s_startup.txt" is processed. Each line should be a command for the terminal. Whenever a new game starts, by default the script "GameParams/Scripts/s_begin_game.txt" is run. Similar scripts exist for the client. It is recommended that you modify these scripts to customize your setup.

* After starting up the server first and then running the client to connect to the server, you should spawn into a map. You should be able to move around.

* Keyboard keys can be bound to different actions. To change what pressing the 'w' key down does, for example, modify the environment variable "bind.i.KEY_W.down". Alternatively, one can use the "bind" command.

* You can change the appearance of the crosshair by changing the environment variables that start with "view.crosshair".

* To enable debug mode, set "engine.debug" to true. This will dislay the quads the are rendered in randomly chosen colors.

* Within the client, you can toggle the terminal by hitting the '~' key. Within that terminal, you can switch back and forth between entering commands to your client and entering commands to the server (assuming you have permission to access the server). Use the command "ls" to list environment variables. You can use tab completion. Green means it is a "name directory". You can use the command "set" to set an environment variable, and "get" to get its value. You can use the command "let" to create environment variables, but they must begin with "home.". The command "ls" can also be used to display the value of environment variables by using the "v" option. You can use the command "help" to list all of the commands. By typing "help COMMAND", you will get information about the command COMMAND. You can read all of this help information in an anto-generated html file. In fact, you can generate this yourself by running the command "gendoc". This can be done in both the client and the server.