This repository has an example bot written in Kotlin which is compatible with Java and the JVM, just with a nicer programming language.
It also has everything necessary to run as a host for a Robocode Tank Royale competition. So other bots can be packaged and dropped into the bots
folder and it'll be picked up.
Ensure that you are familiar with the rules and anatomy of a tank. They're important to understanding the limitations of your tank. https://robocode-dev.github.io/tank-royale/articles/anatomy.html
- Game type: Classic
- Arena size: 800x600
- Gun cooling rate: 0.1
- Number of rounds: 10
- Ready timeout (μs): 1,000,000
- Turn timeout (μs): 30,000
Unzip the included compiled sample bots
unzip sample-bots-java-0.19.2.zip -d $YourFolder
Run the host application
java -jar robocode-tankroyale-gui-0.19.2.jar
- Go to
Config->Bot root directories
and add the $YourFolder - Start the server
- Start game and set the mode to "classic", load all the bots you want to run and click start
- Ensure that you set compatibility mode to JDK 11. You'll need to produce a jar file in the final deliverable
- Ensure that your bot includes a .json file with the same name as the jar. Example here.
- Ensure that you have a .sh file with the command that would execute the jar file. See example here
Full instructions for the JVM is available in the official docs: https://robocode-dev.github.io/tank-royale/tutorial/jvm/my-first-bot-for-jvm.html
To build your tank in Kotlin, you could use this repo as a template:
- In folder 'src/main/kotlin/org/example', add logic to 'BTreeBot.kt'.
- Compile:
./gradlew shadowJar
The compiled BTreeBot.jar will be inside the BTreeBot folder.
- Send that BTreeBot folder to the host.
- To test your bot, following the steps in Running as a host. And copy BTreeBot folder in $YourFolder.
We'll run a series of rounds and use the scoring system built into Tank Royale to determine the winner. The general agenda would be:
- Who Neara is and what we do
- What the competition is about and prizes that will be won
- The people who are helping from Neara's side
- Going over this repository and how a game is run
- What is expected of your teams
- How scoring is done
- Team assignment and intro to each other
- Formulate a strategy
- Read suggested documentation
- Build build build
- 1 hour into the team breakout, we'll get everyone's bot shipped and make sure everything's working
- Score not counted, just to get a feel for how people are building their bots
- Final preparations and we run the actual competition
- Judging, scoring and winner announcements
Scoring will be done on several categories out of 10 by the Neara panel weighted accordingly to the following table:
Category | Description | Weight |
---|---|---|
Battle results | Bot placing in Tank Royale. 10/10 for 1st place, 8/10 for second, 6/10 for third. Everyone else is 4/10 | 0.5 |
Bot modularity | The easier it is to modify the behaviour of your bot, the more points you get. Coding best practices and principles apply. Think data structures, algorithms and code cleanliness. | 0.3 |
Code testability | How testable is your bot's code? Prove it with unit tests. | 0.2 |
- JDK 18 for this repo. The bot should be compiled down to JDK 11 for the final jar.
- https://robocode-dev.github.io/tank-royale/articles/anatomy.html
- https://github.com/robocode-dev/tank-royale