Version 10 (modified by jherwitz, 13 years ago) (diff) |
---|
Running the Server
Once you have a have compiled Quagents, or fetched a binary version, you will probably want to run it.
If you used the install.sh script, your executable is in the directory you specified. Otherwise, it resides by default in trunk/ioquake3/build/release-PLATFORM-ARCHITECTURE/ioquake3.ARCHITECTURE. (On URCS machines, this would be trunk/ioquake3/build/release-linux-i386/ioquake3.i386)). Running the executable without arguments should bring up the game menu (after the OpenArena intro video).
The most useful command-line argument to run Quagents with is the "+map MAPNAME" argument. See the list of Built-In Maps for valid mapnames. Giving this command loads the map as soon as Quagents starts with no enemy bots, and so allows you to connect with your client agents without a bunch of Quake 3 bots running around blasting everyone to bits.
If you are on MacOSX you must run Quagents with the following options: "+set sv_pure 0 +set vm_game 0 +set vm_cgame 0 +set vm_ui 0" in addition to anything else. Otherwise you will get an error saying OP_BLOCK_COPY error. You may be able to simply say "+set sv_pure 0", but there's no harm in being verbose.
Once Quagents is running, you can type ` (backtick) to bring up the game console, which allows you to chat as well as issue game console commands. A useful command for Quagents experimentation is "\follow". Typing \follow will make you an observer for the rest of the game (as a sort of free-floating point of view: jump to rise, crouch to fall, normal movement otherwise), and "\follow [ENTITYID]" sticks your camera on the head of entity number [ENTITIYID]. Typically, "\follow 1" will follow the first bot to connect, "\follow 2" will follow the second, etc.
You may have to do "\follow [ENTITYID]" before you are allowed to do the basic "\follow".
To connect and spawn bots, you just have to open a TCP connection to port 6000 on whatever machine the Quagents server is running, and send the ASCII string "ready" across it. Alternatively, you can build on top of the code the Quagents team has already provided. See Getting Started for more information.
See Useful Console Commands for more handy commands to use in Quagents.
Running Demos
The ScenarioStarter? allows command line execution of scenarios.
To use:
1) See Compiling Quagents to create a game executable.
2) See Compiling Quagents to compile the client code (navigate to client/API/ and type "ant").
3) Launch the server by executing ./run-mac.sh or ./run-pure.sh depending on your machine architecture.
4) Launch the client by executing "java -jar Quagents3.jar <SCENARIONAME> <MAP>" in directory client/API/build/jar.
Launcher
NOTE: due to a bug with Runtime.exec(), the launcher does not currently work on mac platforms.
Update: This is confirmed to be a bug with Runtime.exec(). The subprocess managing the server does not handle socket communication correctly. Specifically, when a Quagent tries to spawn using ready() (see ProtocolZero) the server immediately freezes.