Build the best - destroy the rest!

Wednesday, 2 December 2026

Robocode 1.13.0 released

Version 1.13.0 (02-Dec-2026)

Thanks go to Henrique Valle de Lima for finding and fixing #132, #133, #134, #137, #140, #141 and #142, for adding -resultsCSV in #136, font size controls to the Source Editor in #138 and replays from a selected round in #143, and for suggesting the Control API documentation in #135 ❤️.

Thanks go to Julian Kent for finding and fixing the skipped turn problems in #130 ❤️.

Bugfix

  • #130: A robot that died could lose its score for the round under heavy CPU load, e.g. when running several battles in parallel. Its thread woke up after the rest of the round had passed, and the turns in between were counted as skipped turns, so the robot was disabled.
  • #130: A robot that started too slowly in round 2 or later got no SkippedTurnEvent for the turns it skipped. It now gets them like in the first round, and it is disabled with no score for the round if it skips more than 30 turns.
  • #130: A robot that took too long in a turn, but was done before the next turn, got no SkippedTurnEvent, although its actions for that turn were not used. It now gets the event for that turn.
  • #130: A robot could run twice in the same turn if its thread woke up without being woken by the battle.
  • #132: A silent installation of Robocode that failed ended with exit status 0, so scripts and tools like Chocolatey saw it as a success. It now ends with exit status 1.
  • Installing into a path that is a file now fails right away with a clear message, instead of failing halfway through.
  • #133: Installing Robocode on Linux or macOS into a path with spaces, e.g. Robocode Lab, left robocode.sh and the other scripts without permission to run, so they failed with "Permission denied".
  • #141: A battle recorded as plain XML with -recordXML had an empty ZIP footer after the XML, so XML parsers rejected the file.
  • #142: When saving the battle results from the Results dialog failed, the error was only written to the log, so it looked as if the results were saved. An error dialog now shows the file and the reason.
  • #140: When the results could not be written to the file given with -results, Robocode still ended with exit status 0. It now writes an error and ends with exit status 8. The Results dialog also added an extra .csv to a file name ending with .CSV.
  • #137: A command-line option missing its value at the end of the command line, e.g. -battle, failed with an exception. A non-numeric value for -tps, or an invalid number in a battle file, printed an exception, but Robocode ended with exit status 0. These now give a clear error, naming the property and value for a battle file, and end with exit status 8.
  • #134: robocode.sh always ended with exit status 0, also when Robocode failed, and it read set_java_options.sh from the current directory instead of the Robocode directory. It now ends with the exit status of Robocode and works when started from another directory.
  • The rank in the battle results of the Control API, i.e. BattleResults.getRank() in BattleCompletedEvent, and in battle records was the order of the robots in the battle, not their placement. It is now the placement by score, as in the Results dialog, where robots with the same score share the placement. The rank that robots get in BattleEndedEvent was already right.
  • With the recording format set to CSV, the .robots.csv file of a battle record contained the bullets, and the .bullets.csv file contained the robots.
  • The results from -results showed a percentage as e.g. 36 % with languages that put a no-break space before %, like Danish. It is now written with a normal space.
  • Settings given with -D on the command line, e.g. -Drobocode.options.common.recordingFormat=csv, were ignored the first time Robocode ran after it was installed, as there was no config/robocode.properties file yet.

Changes

  • #136: New command-line option -resultsCSV <file> for saving the results of a battle started with -battle as a CSV file, which is easy to read from scripts and spreadsheets. It has one row per robot or team with the rank, name, score and the other numbers from the Results dialog.
  • #138: The font size of the Source Editor can now be changed quickly with Ctrl+Plus, Ctrl+Minus and Ctrl+0 (Cmd on macOS), or from the View menu, e.g. when showing code on a projector. The change lasts until Robocode is closed, while the font size of the editor theme stays as it is.
  • #143: A battle record can now be replayed from a selected round in the menu Battle -> Replay from Round, or with the new command-line option -replayRound <round> together with -replay, e.g. to show an interesting round without watching the whole battle. The replay continues with the rounds after it.
  • #135: The documentation of the Control API in the robocode.control package now explains how to run many battles with the same RobocodeEngine, which is much faster than starting Robocode for each battle. It also shows how to compile and run the example with Java 8 and newer.
Download Robocode 1.13.0 from here

Friday, 6 November 2026

Robocode 1.12.0 released

Version 1.12.0 (06-Nov-2026)

Security

  • GHSA-m9g2-p2p8-8xmm: A robot could access files outside its own directories.
    • The checks of the files that robots access are now more strict. Robots can only access the files that were checked.
    • getDataFile() now keeps the file inside the robot's own data directory, also when the file name is formed so that it only becomes a path outside the directory after Robocode has processed it. Reported by CyanM0un.

Bugfix

  • #117: With hidden enemy names, each event had a new String for the name of a robot, but robots may compare names with == or !=, as these work for real names. RougeDC is one robot that did worse because of this. Fixed by Chase-san.
  • With hidden enemy names, a robot could see the real name of the robot that fired a bullet in HitByBulletEvent and BulletHitBulletEvent, if the robot that fired was on a team.
  • Files that a robot left open were not closed when the battle ended. They are now closed, with a warning in the console naming the robot and the file. On Windows, an open file cannot be deleted.
  • With Java 24 and newer, a robot that wrote a file stayed in memory after the battle, as its thread was kept in a list that only the SecurityManager removed threads from. Long runs, e.g. of the RoboRumble client, ran out of memory and hung.
  • If a robot caught a StackOverflowError and then asked for the stack trace, and this was the first stack trace in Java, it could fail for every robot in all later battles with a NoClassDefFoundError. Robocode now takes a stack trace when it starts. Reported by Chase-san.
  • A robot built for a newer version of Java stayed invalid after changing to that version of Java, until the robot database was rebuilt by hand. The robot database is now rebuilt when the version of Java changes.
  • With Java 24 and newer, a program using the Robocode API could not read from System.in. Robots cannot read from it with any version of Java, and are stopped if they try.
  • #123: Fix robot code running outside the robot's thread
    • The finalize() method of a robot class ran on Java's finalizer thread, where robot code is not checked like on the robot's own threads. Java no longer calls finalize() of robot classes, so robots cannot rely on it.
    • With Java 8 to 11, the cleanup after a robot could run its static initializers. Their output went to the main console instead of the robot's console, and building the robot database took longer.
    • Thanks go to Julian Kent for fixing this.
  • #124: Fix existing robots being rejected since version 1.11.2, because they used something robots are not allowed to use, even in code that never runs. Robots do not need to be changed for this.
    • Robots can use Logger, Level, AWTKeyStroke, MessageDigest, SecureRandom, and ImageIO.write() to a stream again, and new Scanner(File) and new ZipFile(File) on their own files.
    • Robots using time zones, e.g. via ZipOutputStream, are no longer punished with Java versions having the SecurityManager, as Robocode now loads the time zone rules itself.
    • Robots can use Thread.stop() on their own threads, also via a subclass of Thread. It interrupts the thread with Java 20 and newer, as Java can no longer stop threads.
    • Robots with FileOutputStream or FileWriter in their code can be loaded again, and are stopped if they really try to use them, as before. Robots must use RobocodeFileOutputStream or RobocodeFileWriter.
    • Thanks go to Chase-san for finding and reporting this ❤️.

Changes

  • #117: New HIDENAMES setting for the RoboRumble client, by Chase-san. With HIDENAMES=YES in a rumble's configuration, robots only see their enemies by anonymous names like #1, and uploads say hidenames=YES.
  • #118: New CLEARDATA setting for the RoboRumble client, by Chase-san. With CLEARDATA=YES, the data robots saved is deleted before each battle, so they only keep it between the rounds of one battle, and uploads say cleardata=YES. Data in a robot's jar is not lost. If the data cannot be deleted, even after a garbage collection in case a robot left a file open for reading, the client logs which file it was, waits a minute, and skips the battle.
  • Both settings default to NOT and must match the rumble on the server. The official LiteRumble rumbles need NOT.
Download Robocode 1.12.0 from here

Saturday, 31 October 2026

Robocode 1.11.2 released

Version 1.11.2 (31-Oct-2026)

Security

  • GHSA-h2ch-39mm-r68h: The robot sandbox was not enforced on Java 24 and newer, where the SecurityManager has been removed. A malicious robot could execute commands, access the network, and read and write files on the host. Reported by Hongwei Li, Junmin Zhu, Zhun Wang, Jiacheng Zhong, Han Dai, Suyue Guo, Songyang Peng, and Ziyue Pan.
    • Robot classes are now verified when they are loaded, on all Java versions. Robots using something that is not allowed (e.g. sockets, processes, reflection, or writing files outside their data directory) are rejected with a message explaining why.
    • RobocodeFileOutputStream now checks that the file is inside the robot's data directory.
    • Robots can only delete files and create directories in their own data directory.
    • Robots can only read files and get information about files (e.g. File.exists() and File.list()) in their own root package directory and data directory, like with the SecurityManager.
    • Robots can only deserialize their own classes, Robocode classes, and common Java classes like strings, collections, and geometry.
    • Robots can use reflection on their own classes, but can only use the members of other classes via reflection that they are allowed to use directly, and cannot make these accessible with setAccessible().
    • Robots can no longer read files outside their class path via getResourceAsStream().
    • Robots are punished if they create more than 5 threads, which is now checked every turn, and cannot use virtual threads, as these are not counted.
    • Robots can no longer access the libraries used by Robocode.

Bugfix

  • Robots in a jar file inside another jar file, e.g. in a team jar, could not be loaded with Java 9 and newer.
  • Battles were not deterministic with Java 9 and newer, e.g. when using the RANDOMSEED system property, if robots used Math.random(). Calls to Math.random() in robots now use the random number generator of Robocode.
  • A robot that skipped too many turns was not stopped properly since version 1.10.1. Robocode waited several seconds for the robot thread to stop itself, reported "Unable to stop thread" and punished the robot as unstoppable, and the robot then failed with "You cannot take action in this thread!".

Changes

  • Tests can be run on another Java version than the Java 8 toolchain, e.g. ./gradlew test -PtestJavaVersion=25. The CI build now runs all tests with both Java 8 and Java 25.
Download Robocode 1.11.2 from here

Monday, 13 July 2026

Robocode 1.11.1 released

Version 1.11.1 (13-Jul-2026)

Bugfix

  • #94: Avoid misleading priority warnings for system events. System events retain their fixed priority instead of being clamped to the 0–99 range used by robot-defined events.

Changes

  • Updated LiteRumble links and RoboRumble configuration URLs to https://rumble.robowiki.net/.
  • Updated to use Eclipse JDT 3.46.0.
Download Robocode 1.11.1 from here

Saturday, 6 June 2026

Robocode 1.11.0 released

Version 1.11.0 (06-Jun-2026)

Changes

  • Installer overhaul: Refactored the monolithic AutoExtract installer (844 lines) into 5 focused classes (Installer, InstallerDialog, Extractor, ShortcutManager, OsUtil).
  • Reduced confirmation dialogs from 5 user prompts down to 1 — a single "Install to" dialog with Proceed/Cancel.
  • Removed license agreement dialog, start-menu shortcut prompt, and Windows file associations prompt.
  • Removed Windows .battle/.br file association registration (rarely used, required admin privileges).
  • Removed legacy code: Win 9x/ME command.com path, obsolete .robotcache migration, fragile self-cleanup hacks.
  • Windows shortcuts are now always created without prompting.
  • Improved code quality: try-with-resources, StringBuilder, proper error handling, fixed spinner animation bug.

Bugfix

  • #89: Prevent a single fire command from spawning duplicate bullets with the same ID
    • A single setFire() call could spawn multiple bullets sharing the same bullet ID, which could cause issues with bullet tracking and battle accuracy.
    • Thanks go to Pavel Savara for fixing this ❤️. Sharp-eyed fix!
Download Robocode 1.11.0 from here

Wednesday, 4 March 2026

Battle Runner released for Robocode Tank Royale 0.37.0

I have just made a new release of Robocode Tank Royale 0.37.0, which contains the new Battle Runner 🎉 https://robocode.dev/api/battle-runner

The Battle Runner API lets you run Robocode Tank Royale battles programmatically from any JVM application — no GUI required. Use it for automated testing, benchmarking, tournament systems, or any scenario where you need headless battle execution.

Monday, 16 February 2026

Tank Royale Viewer

🖥️ Visualize Robocode battles in style!

Check out the Tank Royale Viewer by Jan Durovec – an amazing web-based viewer for watching Robocode Tank Royale matches in real-time! 🚀

Perfect for tournaments, analyzing strategies, and displaying battles on big screens! ⚡

👉 https://github.com/jandurovec/tank-royale-viewer