Debugging Tools

Topics

  1. In-Game Debugging
  2. FlexDebug Modules
  3. Toggling Debug Mode
  4. Pausing/Unpausing The Bots
  5. Free-Camera
  6. Chase-Camera

In-Game Debugging

In-game debugging presents debug information in both visual and textual forms. Visual debugging displays consist of blue "beams" along the outer boundaries of the left-distance and right-distance vision sweeps as well as a red beam indicating the direction in which the bot is facing. These debug beams are only displayed if the respective distance-check (left, right, or center) is being actively polled. The range specified in the most recent sensor query determines the length of each beam. There is also some very limited textual debugging information provided in-game. For example, text is displayed to the screen indicating whether or not a behavior DLL loaded properly. The internal architecture for receiving "bot messages" also echos messages to the screen when they are received, although at this time the user has no control over bot messages.


FlexDebug Modules

FlexDebug modules allow the user to extend FlexBot by building custom debugger tools. For more information on FlexDebug, see the FlexDebug section of this documentation. Additional information is available online at http://flexbot.cs.northwestern.edu/FlexDebug/

BotWatch Debugger

A BotWatch Debugger module is included with the FlexBot release. The BotWatch tool is a Win32 application that runs as a separate program from Half-Life. For this reason, it will likely work best to run Half-Life in windowed mode while using BotWatch. The BotWatch program, when running, sits in the system tray and "listens" for bots to be added in the Half-Life game. When a bot is added, a menu item is added to the menu for the system tray icon indicating the new bot's player number. If you would like to see debug information for a particular bot, you need only to right-click on the BotWatch icon and select the bot whose information you would like to observe. A window pops up (actually a separate application) that will begin receiving debug info from Half-Life for that bot.

Note that the Half-Life game is paused while the BotWatch window is the active window. Selecting a sensor and clicking the "Display" button will move the signal to one of the display areas in the bottom portion of the application. You can position the BotWatch window so that it is visible around the windowed Half-Life game and return to the game. The BotWatch window now shows the value of the displayed signals updated every think cycle. Note that in the current release, the BotWatch window may not receive any signals for up to 20 seconds of active game-time after the bot's debugging window has been opened.


Toggling Debug Mode

Debugging can be toggled for individual bots or for all bots at once. These options can be found in the bot menu system or as console commands. When debug mode is off, all forms of debugging are disabled except for in-game textual debugging. Visual debug beams will not be shown and the BotWatch data will no longer be updated.


Pausing/Unpausing The Bots

Pausing the bots can be done for individual bots or for all bots at once. When a bot is paused, it stops making any calls to its behavior DLL and simply goes limp (no movement or actions). Sensors are not polled and therefore BotWatch data is not updated.


Free-Camera

The Free-Camera debugging mode in the FlexBot is a way to observe a game as a passive spectator rather than as an active participant. When in Free-Camera mode, you can fly freely throughout the map environment by using the standard game-control keys and mouse. This is very similar to the Free-Cam mode in the popular Mod Counter-Strike.


Chase-Camera

The Chase-Camera debugging mode is another way to observe a game as a passive spectator rather than as an active participant. When in Chase-Camera mode, your camera is continuously following the desired player in the game. You may adjust the camera's perspective to rotate around the target in three-dimensional space by using the mouse. Clicking the left and right mouse buttons will cycle the Chase-Camera's target. Left mouse button moves to the next player and right mouse button switches to the previous player. This is very similar to the Free-Chase-Cam mode in Counter-Strike. See the "Technical Notes" section of this documentation for a brief discussion of a performance problem with the FlexBot Chase-Camera.