Classic Robocode robots ​
Robots written for Classic Robocode can fight in Tank Royale through the Robocode API bridge. The bridge turns a compiled Classic robot jar into a Tank Royale bot, and the robot then runs through a reproduction of the Classic robot API, so it does not need to be changed or recompiled.
What you need ​
- A full JDK 11 or newer. The bridge's bots start as Java source, which needs the compiler that only a JDK has; a Java runtime (JRE) alone is not enough. Tank Royale uses the Java in
JAVA_HOMEwhen it is set, otherwisejavaon the path. - Classic robot jars: a folder of them, such as a LiteRumble collection, or a Classic Robocode installation.
Import your robots ​
- Choose Classic > Import Robots....
- Press Install Bridge... the first time. Tank Royale asks GitHub for the bridge's releases, shows the size of the newest and asks before it downloads it. It checks the file's size, SHA-256 and version before it keeps it, and it keeps the newest bridge that supports this version of Tank Royale. Check for Update... on the screen, or Classic > Check for Bridge Update..., fetches a newer bridge later in the same way and then imports your robots again, so they all use the new bridge; what they have learned is kept.
- Choose the folder of robot jars or the Classic Robocode installation, and press Import.
The table shows each robot jar's result: imported, already imported, or failed with the reason. Tank Royale adds its folder of imported robots to the bot root directories, so the robots appear among the bots when you start a battle. Importing the same folder again updates the robots and keeps what they have learned.
A team jar becomes a team entry with its members. Select the team entry in the battle dialog to let the members play as a team.
When something goes wrong ​
The screen explains the bridge's errors in plain words. The most common is a Java without a compiler: install a JDK, set JAVA_HOME to it and restart Tank Royale.
If a robot fails to import or behaves differently than in Classic Robocode, select it and press Report a Problem... on the screen; for a problem with no particular robot, choose Classic > Feedback > Report a Problem.... Classic > Feedback > Suggest a New Feature... opens the bridge's form for ideas. Your browser opens the bridge's problem form with the bridge, Tank Royale and Java versions, the operating system and the robot jar's name filled in. No folder names from your computer are filled in, and you can read and change everything before you submit it.
Classic > Bridge Guide opens the bridge's own guide, which explains how to use it without Tank Royale's screen and lists what does not yet behave exactly as in Classic Robocode.