https://github.com/robocode-dev/tank-royale
Git repository for Robocode Tank Royale
https://github.com/robocode-dev/tank-royale
ai battle battle- battle-a battle-royale-game bot bot-framework coding-game competition csharp education java learning machine-learning open-source programming-game python robocode tank tank-game
Last synced: 3 days ago
JSON representation
Git repository for Robocode Tank Royale
- Host: GitHub
- URL: https://github.com/robocode-dev/tank-royale
- Owner: robocode-dev
- License: apache-2.0
- Created: 2022-02-09T20:50:08.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2026-02-08T22:56:44.000Z (about 2 months ago)
- Last Synced: 2026-02-09T04:24:19.172Z (about 2 months ago)
- Topics: ai, battle, battle-, battle-a, battle-royale-game, bot, bot-framework, coding-game, competition, csharp, education, java, learning, machine-learning, open-source, programming-game, python, robocode, tank, tank-game
- Language: Kotlin
- Homepage: https://robocode.dev
- Size: 43.1 MB
- Stars: 237
- Watchers: 7
- Forks: 48
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Robocode Tank Royale

**Build the best – destroy the rest!**
## 🤖 About
Robocode is a [programming game](https://en.wikipedia.org/wiki/Programming_game) where the goal is to code a bot in the
form of a virtual tank that competes against other bots in a virtual battle arena.
The player writes a program that controls the bot’s movement, scanning, firing, and reactions to events during a battle.
All logic lives inside this program – you never control the bot directly.
The name **Robocode** is short for “Robot code” and comes from the original version
[here](https://robocode.sourceforge.io/).
**Robocode Tank Royale** is the next evolution, where bots can play over the Internet via WebSocket.
This project aims to help you learn programming, improve AI skills in a fast‑running real‑time game,
and have fun while competing.
## ⚔️ Example of a battle

## 🖥️ Tank Royale Viewer
Want to **visualize battles in style**? Check out the
**[Tank Royale Viewer](https://github.com/jandurovec/tank-royale-viewer)**—a beautiful web-based viewer for
watching Robocode Tank Royale matches in real-time! Created by [Jan Durovec](https://github.com/jandurovec), this tool
is perfect for displaying live battles on big monitors during competitions, analyzing recorded battles, and showcasing
championship matches.
## 📚 Documentation
Main page:
[Robocode Tank Royale Docs](https://robocode-dev.github.io/tank-royale/)
### The Book of Robocode
[**The Book of Robocode**](https://book.robocode.dev/) 📖 is a comprehensive guide covering Robocode as well as
Robocode Tank Royale—from basics to advanced strategies like wave surfing, guess-factor targeting, and
movement techniques. It builds on two decades of community knowledge and foundational research from RoboWiki
contributors.
### 🚀 Try it out
If you are new to Robocode or just need a refresher, start with the
[Getting Started guide](https://robocode-dev.github.io/tank-royale/tutorial/getting-started).
For hands‑on coding, continue to the
[My First Bot tutorial](https://robocode-dev.github.io/tank-royale/tutorial/my-first-bot.html).
The [Installation guide](https://robocode-dev.github.io/tank-royale/articles/installation.html) covers how to install the GUI,
and includes sample bots for quick demos.
## 💻 Supported platforms
Robocode runs on Java 11 or newer and supports Windows, macOS, and Linux out of the box.
Bot APIs are available for:
- **Python**
- **Java (JVM)**
- **.NET**
Bots can be written in any language that can access a WebSocket API and follows the
[protocol](https://github.com/robocode-dev/tank-royale/tree/master/schema/schemas#readme).
The following Bot APIs provide full client implementations:
| Language | API |
|----------------|---------------------------------------------------------------------------------------|
| **Python** | [Python Bot API](https://robocode-dev.github.io/tank-royale/api/python/) |
| **Java (JVM)** | [Java/JVM Bot API](https://robocode-dev.github.io/tank-royale/api/apis.html#java-jvm) |
| **.NET** | [.NET Bot API](https://robocode-dev.github.io/tank-royale/api/apis.html#net) |
Additional languages supported by the Java/JVM API:
- Java
- Groovy
- Kotlin
- Scala
- Jython
- Clojure
Supported .NET languages:
- C#
- F#
- Visual Basic
- IronPython
## ⚙️ Battle Runner API
The **Battle Runner API** lets you run battles programmatically from any JVM application — no GUI required.
Use it for automated testing, benchmarking, or building tournament systems.
```kotlin
BattleRunner.create { embeddedServer() }.use { runner ->
val results = runner.runBattle(
setup = BattleSetup.classic { numberOfRounds = 10 },
bots = listOf(BotEntry.of("/path/to/MyBot"), BotEntry.of("/path/to/EnemyBot"))
)
println("Winner: ${results.results.first().name}")
}
```
Available on Maven Central as `dev.robocode.tankroyale:robocode-tankroyale-runner`.
See the [Battle Runner API docs](https://robocode-dev.github.io/tank-royale/api/battle-runner) or the
[module README](runner/README.md) for full documentation.
## 🚧 Work in progress
- **Bot API for TypeScript** (Node.js and browser support)
- JavaScript
- TypeScript
- **Robocode API bridge for Tank Royale** – see the [robocode-api-bridge](https://github.com/robocode-dev/robocode-api-bridge) project.
## Thanks to the contributors
Huge thanks to every [contributor](https://github.com/robocode-dev/tank-royale/graphs/contributors) — you make this
project shine! 🙌
## 👨💻 Maintainer
[@flemming-n-larsen](https://github.com/flemming-n-larsen)
[](https://buymeacoffee.com/flemming.n.larsen)
## 📄 License
[Apache License 2.0](LICENSE)
## ©️ Copyright
Copyright © 2022 [Flemming N. Larsen](https://github.com/flemming-n-larsen)