RoboWar3D

RoboWar3D is a Windows application that integrates sequential game simulator and 3D game world visualizer.

 

RoboWar3D configuration

RoboWar3D reads configuration files at start time. The files set the parameters of the game world, visualization, etc. The main files are: config.txt, game.txt, config3D.txt.

config.txt

Sets the parameters of the game world (Environment). This is the list of pairs <Parameter name> <Parameter value>. The names of the parameters are as in the Environment class.

Parameters bases_count, field_width and field_height of the Environment are set by another file: game.txt.

 

game.txt

File can contain the following commands:

  • sbot <team name> <script name> – adds a team to the game with the given name and the given script for robots’ AI. A team name is a character string without blank characters, no more than 8 characters. A script name is a character string without blank characters. The Scripts folder has to contain the corresponding script file with the name <script name>.as.
  • bot <team name> <bot name> – adds a team of hardcoded robots with the given name of the team and the given name of the hardcoded robot. The following hardcoded robots exist: bot, smart, tbot, tbotv1, badbot, databot, dmbot, doombot, ras, svpro, yubot.
  • map <map name> – sets the game field for the game.

With the map name of the form rndXxYxB  the map will have the size of X*Y with the number of bases equal to B; the bases will be scattered randomly in the field, each team will be given one random base in the beginning of the game and all other bases will be set neutral. Y and B parameters can be skipped, that will mean X=Y, B=(X+Y)/8 + 1. Here are the map name examples: rnd50x50x10, rnd80x80, rnd100.

If the name of the map does not follow the form rndXxYxB , then the name is considered a path to a file with map specification. Map specification file has the following format: <Number of bases> <Description of bases> <Number of robots> <Description of robots>. Descrition of bases is a sequence of triplets x y team, one for a base, where (x, y) are coordinates of the base. Team = -1 for neutral base. Description of initial robots is done in the same way.

Several teams with the same script or hardcoded AI can be introduced in the game.txt file. It can be up to 10 teams total. It should be one map name only in the game.txt file.
 

config.txt

The file contains parameters of the 3D visualizer as a sequence of pairs <parameter name> <parameter value>. Possible parameters:

Parameter Meaning
show_minimap Mini-map view mode. 0 – not shown, 1 – transparent, 2 – solid background
show_score Team info table view mode. 0 – not shown, 1 – transparent, 2 – solid background
show_info Auxiliary info view mode. 0 – not shown, 1 – shown
frames_per_anim The more is the number the smoother is the animation
refresh_delay Visualization delay. The more is the number the slower is the visualization
show_particles Particle effects (smoke, fire) view mode. 0 – not shown, 1 – shown
enable_music Switch on (1) or switch off (0) sound effects

 

This values can be changed in runtime with hot keys.

scheck.exe utility

The utility checks robot scripts.

Usage: scheck.exe <script name>, provided the Scripts folder contains the file <script name>.as. Utility informs on the syntax errors in the scripts if any.

Several scripts can be checked in one run: scheck.exe <script name 1> <script name 2> ... <script name n>.