Controlling CaveUT From a TCP Socket


GameBots is another freeware Unreal Tournament modification intended for scientific research. Once installed, it allows the researcher to open a standard TCP connection to Unreal Tournament server which causes a human figure, a "bot", to appear in the virtual world. This bot can be controlled through commands sent to GameBots over the TCP connection from some sending program. The sending program can be written in any language capable of opening TCP sockets. One could even use Telnet, though this is recommended only for debugging purposes.

Spectator mode in UT can "watch" a bot created by GameBots. Therefore, you can install GameBots on your UT server along with CaveUT and effectively control the display over the TCP connection just by moving the bot! You can also create more bots (which can look like anything) and can be controlled over their own TCP connections.

This allows you to write your own software to present a wide range of visual experiences and interactive designs.

For example, UT/GameBots/CaveUT and LabView have recently been used to instrument an experiment in the BNAVE, with help from Dr. Patrick Sparto and Leigh Mahoney. Lab View is a software package used by many experimental scientists to perform data acquisition and instrument control for lab experiments. It can be used to control actuators, read sensors, and execute programs written in its built-in scripting language.

At the appropriate times during the experiment, the experimenter ran a Lab View script that sent commands to the operator PC's UT installation. The diagram to the right summarizes the setup.

The only drawback is that the TCP connection is slow compared to the graphics rendering, so there's a small time lag from when the command is issued to the bot performing its action. This is fine for general commands like "follow this person" or "go find the flag," but using it for animation can be a bit clumsy.

The UT2004 version of GameBots is still under development, but it is serviceable.

Last updated January 16, 2004.
URL: http://www.planetjeff.net/ut/CUT4Control.html
This page is copyright © 2004 by Jeffrey Jacobson.
See this web site's copyright notice for information
on duplicating or distributing this page or its contents.