Technical FAQ
This page contains frequently asked questions about running the robocraft software, writing a player, or clarifications about the contest specifications.
Frequently Asked Questions:
Gameplay
- How do I spawn my first Bomber?
- Can Sentries and Falcons really not attack diagonally?
- Some robots can't attack themselves. What if I want them to self-destruct?
Software
- What version of Java should I use to compile my players?
- How do I get my own players to be recognized by the software?
Gameplay
How do I spawn my first Bomber?
Once you have two Falcons, you can use transferEnergon
to give one of them enough energon to spawn a Bomber.
Can Sentries and Falcons really not attack diagonally?
Correct. Diagonally adjacent squares have a Euclidean distance of
sqrt(2)
, which is outside the attack range of these
robots (which is 1). This means that when facing diagonally these
robots can only attack themselves. Note, however, that the dependence of
attack ranges on the direction a robot is facing is simply a way of
requiring robots to turn towards the direction in which they wish to
attack.
Some robots can't attack themselves. What if I want them to self-destruct?
Your robot explodes instantly if its VM terminates. There are three ways to accomplish this:
- Return normally from
RobotPlayer.run()
(using program logic) - Throw an uncaught exception
- Call
System.exit()
Software
What version of Java should I use to compile my players?
The supported version of the JDK is 1.4.2. Java compilers that target the 1.5 runtime libraries may produce class files that refer to classes not supported by the RoboVM.
How do I get my own players to be recognized by the software?
The robocraft jar file and your player classes must all be in your classpath at runtime. Otherwise there is nothing special that needs to be done; just make sure you are following Java's rules about locating class files.