Robocode/Console Usage

From Robowiki
< Robocode
Revision as of 00:14, 27 November 2007 by FlemmingLarsen (talk | contribs)
Jump to navigation Jump to search

This page describes how to run Robocode from a console.

Batch files

Robocode is normally started by the robocode.bat (on Windows) or robocode.sh (on Linux and Mac OS) batch files. The batch files is used for setting required parameters for the Java VM in order to start and run Robocode properly.

Robocode is started from a console by writing:

java -Xmx512M -Dsun.io.useCanonCaches=false -cp libs/robocode.jar;libs/codesize.jar robocode.Robocode

Here you must stand in the 'robocode' directory where Robocode is installed.

Console Usage

Usage: robocode [-cwd path] [-battle filename [-results filename] [-tps tps]
                [-minimize] [-nodisplay] [-nosound]]

where options include:
    -cwd <path>             Change the current working directory
    -battle <battle file>   Run the battle specified in a battle file
    -results <file>         Save results to the specified text file
    -tps <tps>              Set the TPS (Turns Per Second) to use
    -minimize               Run minimized when Robocode starts
    -nodisplay              Run with the display / GUI disabled
    -nosound                Run with sound disabled

properties include:
    -DWORKINGDIRECTORY=<path>    Set the current working directory
    -DNOSECURITY="true"|"false"  Enable or disable Robocode's security manager
    -Ddebug="true"|"false"       Enable or disable System.err messages