Skip to content

Commit 616ca86

Browse files
authored
Merge pull request #1 from RLBot/nuget
Updating to pull in RLBotDotNet and FlatBuffers via NuGet.
2 parents bcf1cea + 529dce3 commit 616ca86

File tree

10 files changed

+38
-52
lines changed

10 files changed

+38
-52
lines changed

README.md

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,53 +7,41 @@ Example of a Rocket League bot implemented in C#
77
1. Make sure you've installed [Python 3.6 64 bit](https://www.python.org/ftp/python/3.6.5/python-3.6.5-amd64.exe). During installation:
88
- Select "Add Python to PATH"
99
- Make sure pip is included in the installation
10-
2. Make sure you've installed the [.NET Framework 4.6.1](https://www.microsoft.com/en-us/download/details.aspx?id=49981) (or newer)
11-
3. Open Rocket League
12-
4. Double click on the bot executable (`RLBotCSharpExample/RLBotCSharpExample/bin/x64/Release/RLBotCSharpExample.exe`) and leave it running.
13-
5. Double click on run-gui.bat
14-
6. Click the 'Run' button
10+
2. Install Visual Studio 2015 or newer. It should come with .NET Framework 4.6.1 or newer.
11+
3. Open RLBotCSharpExample\RLBotCSharpExample.sln in Visual Studio.
12+
4. In Visual Studio, click the "Start" button, which should compile and run the bot. Leave it running.
13+
5. Open Rocket League
14+
6. Double click on run-gui.bat
15+
7. Click the 'Run' button
1516

1617
### Notes
1718

1819
- Bot behavior is controlled by `RLBotCSharpExample/RLBotCSharpExample/ExampleBot.cs`
1920
- Bot appearance is controlled by `CSharpPythonAgent/appearance.cfg`
20-
- The bot executable's folder MUST contain `FlatBuffers.dll` and `RLBotDotNet.dll`.
21-
- The bot executable's folder MUST contain a folder called `dll` containing `RLBot_Core_Interface.dll`.
22-
- The port given in `port.cfg` MUST match the port given to BotManager in the C# project.
2321

24-
## Compilation instructions
22+
### Tournament submissions
2523

26-
The bot executable should work out of the box, however you'll want to recompile after making your own changes.
24+
When submitting to a tournament, you will need to include several files.
2725

28-
You won't need to recompile anything other than the bot but if you want the latest and greatest, you can also recompile `FlatBuffers.dll`, `RLBotDotNet.dll`, and `RLBot_Core_Interface.dll`. If you choose to recompile the DLLs, make sure that the bot project references the new DLLs you recompiled.
26+
Some can be found under RLBotCSharpExample/RLBotCSharpExample/bin after you compile in Visual Studio:
27+
- RLBotCSharpExample.exe
28+
- FlatBuffers.dll
29+
- RLBotDotNet.dll
30+
- port.cfg
2931

30-
### Bot compilation
32+
You should also include the entire CSharpPythonAgent folder. This folder also contains a port.cfg file. *Make sure their contents are identical!*
3133

32-
1. Open `RLBotCSharpExample/RLBotCSharpExample.sln` in Visual Studio 2015 or newer.
33-
2. Click Build in the menu, then click Build Solution (or press Ctrl+Shift+B).
34-
3. The compiled executable should appear in a folder in `RLBotCSharpExample/RLBotCSharpExample/bin`.
34+
### Upgrades
3535

36-
The example bot references both RLBotDotNet.dll and FlatBuffers.dll.
36+
This project uses a package manager called NuGet to keep track of the RLBot framework.
37+
The framework will get updates periodically, and you'll probably want them, especially if you want to make sure
38+
your bot will work right in the next tournament! To upgrade:
3739

38-
### FlatBuffers DLL compilation
40+
1. Open the project in Visual Studio.
41+
2. Right click on the RLBotCSharpExample C# project, and choose "Manage NuGet Packages..."
42+
3. Click on the "Installed" tab. You should see a package called "RLBot.Framework".
43+
4. If an update is available, it should say so and give you the option to upgrade.
3944

40-
1. Download/clone the [FlatBuffers repository](https://github.com/google/flatbuffers).
41-
2. Open `FlatBuffers.csproj` (located in `net/FlatBuffers`).
42-
3. Choose your configurations and build the project.
43-
44-
### RLBotDotNet DLL compilation
45-
46-
1. Download/clone TheBlocks' fork's [csharp-port branch](https://github.com/TheBlocks/RLBot/tree/csharp-port/src/main/cs/RLBotDotNet).
47-
2. Open `RLBotDotNet.sln` (located in `src/main/cs/RLBotDotNet`).
48-
3. Choose your configurations and build the solution.
49-
50-
### RLBot Core Interface DLL compilation
51-
52-
1. Download/clone the [RLBot repository](https://github.com/RLBot/RLBot/tree/master/src/main/cpp/RLBotInterface).
53-
2. Open `RLBotInterface.sln` (located in `src/main/cpp/RLBotInterface`).
54-
3. Choose your configurations and build the solution.
55-
56-
The instructions for building the interface should be in the README in the above repository's interface solution folder.
5745

5846
## Overview of how the C# bot interacts with Python
5947

RLBotCSharpExample/RLBotCSharpExample.sln

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26430.16
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RLBotCSharpExample", "RLBotCSharpExample\RLBotCSharpExample.csproj", "{FFF07A01-2977-4C85-9224-BDB18E72C962}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
11-
Debug|x64 = Debug|x64
1211
Release|Any CPU = Release|Any CPU
13-
Release|x64 = Release|x64
1412
EndGlobalSection
1513
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1614
{FFF07A01-2977-4C85-9224-BDB18E72C962}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1715
{FFF07A01-2977-4C85-9224-BDB18E72C962}.Debug|Any CPU.Build.0 = Debug|Any CPU
18-
{FFF07A01-2977-4C85-9224-BDB18E72C962}.Debug|x64.ActiveCfg = Debug|x64
19-
{FFF07A01-2977-4C85-9224-BDB18E72C962}.Debug|x64.Build.0 = Debug|x64
2016
{FFF07A01-2977-4C85-9224-BDB18E72C962}.Release|Any CPU.ActiveCfg = Release|Any CPU
2117
{FFF07A01-2977-4C85-9224-BDB18E72C962}.Release|Any CPU.Build.0 = Release|Any CPU
22-
{FFF07A01-2977-4C85-9224-BDB18E72C962}.Release|x64.ActiveCfg = Release|x64
23-
{FFF07A01-2977-4C85-9224-BDB18E72C962}.Release|x64.Build.0 = Release|x64
2418
EndGlobalSection
2519
GlobalSection(SolutionProperties) = preSolution
2620
HideSolutionNode = FALSE
-15 KB
Binary file not shown.

RLBotCSharpExample/RLBotCSharpExample/RLBotCSharpExample.csproj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
<Prefer32Bit>true</Prefer32Bit>
5353
</PropertyGroup>
5454
<ItemGroup>
55-
<Reference Include="FlatBuffers, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
56-
<SpecificVersion>False</SpecificVersion>
57-
<HintPath>.\FlatBuffers.dll</HintPath>
55+
<Reference Include="FlatBuffers, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
56+
<HintPath>..\packages\RLBot.Framework.0.0.2\lib\net461\FlatBuffers.dll</HintPath>
57+
<Private>True</Private>
5858
</Reference>
59-
<Reference Include="RLBotDotNet, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
60-
<SpecificVersion>False</SpecificVersion>
61-
<HintPath>.\RLBotDotNet.dll</HintPath>
59+
<Reference Include="RLBotDotNet, Version=0.0.2.0, Culture=neutral, processorArchitecture=MSIL">
60+
<HintPath>..\packages\RLBot.Framework.0.0.2\lib\net461\RLBotDotNet.dll</HintPath>
61+
<Private>True</Private>
6262
</Reference>
6363
<Reference Include="System" />
6464
<Reference Include="System.Core" />
@@ -76,10 +76,10 @@
7676
</ItemGroup>
7777
<ItemGroup>
7878
<None Include="App.config" />
79-
</ItemGroup>
80-
<ItemGroup>
81-
<Content Include="FlatBuffers.dll" />
82-
<Content Include="RLBotDotNet.dll" />
79+
<None Include="packages.config" />
80+
<None Include="port.cfg">
81+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
82+
</None>
8383
</ItemGroup>
8484
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
8585
</Project>
-44 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="RLBot.Framework" version="0.0.2" targetFramework="net461" />
4+
</packages>

RLBotCSharpExample/RLBotCSharpExample/bin/x64/Release/port.cfg renamed to RLBotCSharpExample/RLBotCSharpExample/port.cfg

File renamed without changes.

0 commit comments

Comments
 (0)