|
1 | 1 | # Clojure Bot
|
2 | 2 |
|
3 |
| -A bare bones Rocket League bot written in Clojure for the JVM. |
| 3 | +A bare bones Rocket League bot written in Clojure for the JVM. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +## Some goals |
| 8 | + |
| 9 | +- Provide an example Clojure bot that can be used as a reference in the RLBot community. |
| 10 | +- Demonstrate how Clojure can enhance the bot workflow. |
| 11 | +- Better understand the minimum requirements for iterating on a bot project. |
| 12 | +- Better understand the minimum requirements for shipping a bot project in a tournament context. |
| 13 | + |
| 14 | +## What's included vs not supported |
| 15 | + |
| 16 | +This Clojure Bot example: |
| 17 | +- Provides as much of the code in Clojure as possible. |
| 18 | +- Provides several examples of how to do Java/Clojure inteorp. |
| 19 | +- Supports local iteration of the bot through an embedded nREPL server in the bot process itself. |
| 20 | +- Supports local iteration of the bot through bug fixes that inhibit development. |
| 21 | + |
| 22 | +This bot deviates from the well known https://github.com/RLBot/RLBotJavaExample bot in several key ways. |
| 23 | +- Leverages Maven for its build system instead of Gradle or [Leiningen](https://leiningen.org/), the latter |
| 24 | +being one of the more popular options for Clojure projects. |
| 25 | +- The bot does not yet support being used in competition, so no zip assembly is provided. Nor is there |
| 26 | +any additional complexity for port resolution, locating the DLL, and any other challenges that come |
| 27 | +with that territory. This will likely change in the near future. |
| 28 | + |
| 29 | +### Useful commits |
| 30 | + |
| 31 | +The commits have intentionally been structured so that key points in the bot's development |
| 32 | +cycle can be browsed and reviewed to gather greater insight. Refer to the commit log and read |
| 33 | +the commit descriptions. There are three key stages. |
| 34 | +1. Bare-bones, executable Java bot that does nothing. |
| 35 | +1. Bare-bones, executable Clojure bot that does nothing. |
| 36 | +1. Basic Clojure bot that can chase the ball. |
| 37 | + |
| 38 | +Referring to the incremental work makes it easier to discover which parts of the code are |
| 39 | +essential to what particular function or piece of value. |
| 40 | + |
| 41 | +## Clojure |
| 42 | + |
| 43 | +Clojure is a language that gets out of the programmer's way and allows them to focus on the problem. |
| 44 | + |
| 45 | +### What is it? |
| 46 | + |
| 47 | +Clojure is a dynamic Lisp dialect that runs on the JVM. Writing Clojure code means writing data |
| 48 | +structures. The Clojure compiler knows how to transform those data structures into JVM bytecode. |
| 49 | + |
| 50 | +### Resources |
| 51 | + |
| 52 | +There are several good resources for getting started with Clojure: |
| 53 | +- https://www.braveclojure.com/introduction |
| 54 | +- https://clojure.org/guides/getting_started |
| 55 | + |
| 56 | +Some background on why Clojure was made and how it works: |
| 57 | +- https://clojure.org/about/rationale |
| 58 | +- https://clojure.org/reference/reader |
| 59 | + |
| 60 | +### References |
| 61 | + |
| 62 | +The pages to keep handy while writing Clojure: |
| 63 | +- https://clojuredocs.org/quickref |
| 64 | +- https://medium.com/@greg_63957/conj-cons-concat-oh-my-1398a2981eab |
0 commit comments