Get your first robot running in 5 minutes
Java 17 LTS or higher is required.
java -versionOpen Terminal and run:
Verify with: java -version
Open Terminal and run:
Verify with: java -version
robocode-1.10.0-setup.jarjava -jar robocode-1.10.0-setup.jarC:\robocode)Open Terminal and navigate to the download directory, then run:
Follow the wizard and choose an installation directory (e.g., ~/robocode)
Follow the wizard and choose an installation directory (e.g., ~/robocode)
C:\robocode)robocode.batOpen Terminal and run:
The Robocode GUI will open
Open Terminal and run:
The Robocode GUI will open
MyFirstRobotmypkgpackage mypkg;
import robocode.*;
public class MyFirstRobot extends Robot {
public void run() {
while (true) {
ahead(100);
turnRight(90);
}
}
public void onScannedRobot(ScannedRobotEvent e) {
fire(1);
}
}
mypkg then find and double-click MyFirstRobotsample, find and double-click Tracker (a sample robot) to add it as your opponentmypkg from packages then find MyFirstRobot in Robots and click next.jar file.java file directly without packaging, but packaging is recommended for better compatibility