A bare bones Rocket League bot written in Clojure for the JVM.
- Provide an example Clojure bot that can be used as a reference in the RLBot community.
- Demonstrate how Clojure can enhance the bot workflow.
- Better understand the minimum requirements for iterating on a bot project.
- Better understand the minimum requirements for shipping a bot project in a tournament context.
This Clojure Bot example:
- Provides as much of the code in Clojure as possible.
- Provides several examples of how to do Java/Clojure inteorp.
- Supports local iteration of the bot through an embedded nREPL server in the bot process itself.
- Supports local iteration of the bot through bug fixes that inhibit development.
This bot deviates from the well known https://github.com/RLBot/RLBotJavaExample bot in several key ways.
- Leverages Maven for its build system instead of Gradle or Leiningen, the latter being one of the more popular options for Clojure projects.
- The bot does not yet support being used in competition, so no zip assembly is provided. Nor is there any additional complexity for port resolution, locating the DLL, and any other challenges that come with that territory. This will likely change in the near future.
The commits have intentionally been structured so that key points in the bot's development cycle can be browsed and reviewed to gather greater insight. Refer to the commit log and read the commit descriptions. There are three key stages.
- Bare-bones, executable Java bot that does nothing.
- Bare-bones, executable Clojure bot that does nothing.
- Basic Clojure bot that can chase the ball.
Referring to the incremental work makes it easier to discover which parts of the code are essential to what particular function or piece of value.
Clojure is a language that gets out of the programmer's way and allows them to focus on the problem.
Clojure is a dynamic Lisp dialect that runs on the JVM. Writing Clojure code means writing data structures. The Clojure compiler knows how to transform those data structures into JVM bytecode.
There are several good resources for getting started with Clojure:
Some background on why Clojure was made and how it works:
The pages to keep handy while writing Clojure: