doc/manual.rdoc in UG_RRobots-1.3 vs doc/manual.rdoc in UG_RRobots-2.0
- old
+ new
@@ -55,72 +55,38 @@
- *fire*(_power_) fires a bullet in the direction of your gun, power is 0.1 - 3, this power will heat your gun
- *turn*(_degrees_) turns the robot (and the gun and the radar), max 10 degrees per tick
- *turn_gun*(_degrees_) turns the gun (and the radar), max 30 degrees per tick
- *turn_radar*(_degrees_) turns the radar, max 60 degrees per tick
- *dead* true if you are dead
-- *say*(_msg_) shows msg above the robot on screen
-- *broadcast*(_msg_) broadcasts msg to all bots (they recieve 'broadcasts' events with the msg and rough direction)
+- *say*(_msg_) shows msg above the robot on screen
+- *broadcast*(_msg_) broadcasts msg to all bots (they recieve 'broadcasts' events with the msg and rough direction)
+- *team_broadcast*(_msg_) team_broadcasts msg to all bots in your team (they recieve 'team_broadcasts' events with the msg and rough direction)
+- *drop_mine* Drop a mine next to the robot, every robots could drop 3 mines by default
These methods are intentionally of very basic nature, you are free to
unleash the whole power of ruby to create higher level functions.
(e.g. move_to, fire_at and so on)
Some words of explanation: The gun is mounted on the body, if you turn
the body the gun will follow. In a simmilar way the radar is mounted on
the gun. The radar scans everything it sweeps over in a single tick (100
degrees if you turn your body, gun and radar in the same direction) but
-will report only the distance of scanned robots, not the angle. If you
+will report only the distance of scanned robots, scanned toolboxes or scanned mines, not the angle. If you
want more precission you have to turn your radar slower.
UG RRobots Fork introduce toolboxes, toolboxes could spawn during a match and if a robot run over it, the toolbox heal it of a default value of 20 energy point.
-Toolboxes could be scan separatly of the robots (events keys scanned_toolboxes)
+Toolboxes could be scan separatly of the robots (events keys toolbox_scanned)
The toolbox mode is optionnal
+Mines could be scan separatly (events keys mine_scanned)
+Mines could be dropped by robots, scan by others robots and kill with Bullets with à default energy > 2
+
RRobots is implemented in pure ruby using a tk ui and should run on all
platforms that have ruby and tk. (until now it's tested on windows, OS X
and several linux distributions)
-=== To start a match call:
+== Usage
-<pre>
-ruby rrobots.rb [resolution] [#match] [-nogui] [-speed=<N>] [-with-toolboxes] [-timeout=<N>] <FirstRobotClassName[.rb]> <SecondRobotClassName[.rb]> <...>
-
- [resolution] (optional) should be of the form 640x480 or 800*600.
- default is 800x800
- [match] (optional) to replay a match, put the match# here, including
- the #sign.
- [-nogui] (optional) run the match without the gui, for highest possible
- speed.(ignores speed value if present)
- [-speed=<N>] (optional, defaults to 1) updates GUI after every N ticks.
- The higher the N, the faster the match will play.
- [-timeout=<N>] (optional, default 50000) number of ticks a match will
- last at most.
- [-ignore-config] (optional) to ignore the config file YAML present in the path.
- [-write-config] (optional) to write the config in YAML in a file in the path.
- [-with-toolboxes] (optional) to accept the spawning of healing toolboxes (randomly).
-</pre>
-
-the names of the rb files have to match the class names of the robots (up to 8 robots)
-
-e.g.
- 'ruby rrobots.rb SittingDuck NervousDuck'
-or
- 'ruby rrobots.rb 600x600 #1234567890 SittingDuck NervousDuck'
-
-=== If you want to run a tournament call:
-
-<pre>
-ruby tournament.rb [-timeout=<N>] [-matches=<N>] [-with-toolboxes] (-dir=<Directory> | <RobotClassName[.rb]>+)
-
- [-timeout=<N>] (optional, default 10000) number of ticks a match
- will last at most.
- [-matches=<N>] (optional, default 2) how many times each robot
- fights every other robot.
- -dir=<Directory> All .rb files from that directory will be
- matched against each other.
- [-ignore-config] (optional) to ignore the config file YAML present in the path.
- [-with-toolboxes] (optional) to accept the spawning of healing toolboxes (randomly).
-</pre>
-
+:include:usage.rdoc
the names of the rb files have to match the class names of the robots.
Each robot is matched against each other 1on1. The results are available
as yaml or html files.
\ No newline at end of file