Skip to content

Commit 9c37597

Browse files
committed
Example bot with easy installation.
1 parent 31846ac commit 9c37597

14 files changed

Lines changed: 503 additions & 0 deletions

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,13 @@ ENV/
9999

100100
# mypy
101101
.mypy_cache/
102+
103+
# Intellij
104+
*.iml
105+
/.idea
106+
107+
# Build output
108+
/build
109+
110+
# Gradle files
111+
/.gradle

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
# RLBotPythonExample
22
Example of a python bot using the RLBot framework
3+
4+
## Instructions
5+
6+
1. Make sure you've installed Python 3.6 or newer
7+
2. Open Rocket League
8+
2. Double click on run.bat
9+
10+
## Changing the bot
11+
12+
- Bot behavior is controlled by `python_example/python_example.py`
13+
- Bot appearance is controlled by `python_example/appearance.cfg`

build.gradle

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apply plugin: 'java'
2+
3+
repositories {
4+
jcenter()
5+
maven { url 'https://jitpack.io' }
6+
}
7+
8+
dependencies {
9+
compile 'com.github.RLBot:RLBot:v4-SNAPSHOT:python@zip' // Fetch the python zip
10+
}
11+
12+
def findFile(suffix) {
13+
configurations.compile.filter { it.name.endsWith(suffix) }
14+
}
15+
16+
task assemblePython(type: Copy) {
17+
from zipTree(findFile('python.zip').singleFile)
18+
into 'build/framework'
19+
}
20+
21+
task pipInstallRequirements(type: Exec) {
22+
commandLine "pip", "install", "-r", "requirements.txt"
23+
}
24+
25+
task tournamentZip(type: Zip) {
26+
from fileTree(dir: 'python_example', exclude: '**/__pycache__')
27+
}
28+
29+
processResources.dependsOn assemblePython
30+
assemblePython.dependsOn pipInstallRequirements
31+

gradle/wrapper/gradle-wrapper.jar

53 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Sun Apr 15 10:02:16 PDT 2018
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip

gradlew

Lines changed: 172 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python_example/__init__.py

Whitespace-only changes.

python_example/appearance.cfg

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[Bot Loadout]
2+
# Name that will be displayed in game
3+
name = PythonExampleBot
4+
team_color_id = 27
5+
custom_color_id = 75
6+
car_id = 23
7+
decal_id = 307
8+
wheels_id = 1656
9+
boost_id = 0
10+
antenna_id = 287
11+
hat_id = 0
12+
paint_finish_id = 1978
13+
custom_finish_id = 1978
14+
engine_audio_id = 0
15+
trails_id = 0
16+
goal_explosion_id = 1971
17+
18+
[Bot Loadout Orange]
19+
# Name that will be displayed in game
20+
name = PythonExampleBot
21+
team_color_id = 1
22+
custom_color_id = 1
23+
car_id = 23
24+
decal_id = 0
25+
wheels_id = 818
26+
boost_id = 0
27+
antenna_id = 287
28+
hat_id = 0
29+
paint_finish_id = 266
30+
custom_finish_id = 266
31+
engine_audio_id = 0
32+
trails_id = 0
33+
goal_explosion_id = 1971

python_example/python_example.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[Locations]
2+
# Path to loadout config. Can use relative path from here.
3+
looks_config = ./appearance.cfg
4+
5+
# Path to python file. Can use relative path from here.
6+
python_file = ./python_example.py

0 commit comments

Comments
 (0)