Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document minimal Java bot requirements and interaction model #21

Open
Lambeaux opened this issue Jul 20, 2020 · 1 comment
Open

Document minimal Java bot requirements and interaction model #21

Lambeaux opened this issue Jul 20, 2020 · 1 comment

Comments

@Lambeaux
Copy link

Lambeaux commented Jul 20, 2020

This might be in the wrong place but I figured I'll document it somewhere for now and it can get moved if necessary or closed if it isn't valuable.

I don't think this is an urgent need but I would like to suggest documenting the interaction model and all functional dependencies of a well-behaved Java bot process. There's a little magic hidden by Gradle that devs would have to reverse engineer to understand correctly. Ideally we have a set of rules that, if any Java process follows, you can reasonably expect it to work.

I recently tried to create the most bare-bones, minimal Java bot I could make using Maven as the build tool. Here's what I did:

  1. Created a standalone directory (under source control or not) for bot.cfg, bot-appearance.cfg, and bot-module.py; this is data that, once updated to reflect my own values and ingested into the RLBot UI, largely remains unchanged.
  2. Created the maven project with a single pom.xml and three classes: Main, BotImpl, and PythonInterface. That's it.
  3. Ensure the resultant jar has transitive dependencies packaged correctly.
  4. Ensure the resultant jar is executable.
  5. Ensure the system property jna.library.path is set to a directory with RLBot_Core_Interface.dll in it. In my case I'm just calling System.setProperty in Main to some stable, external directory (for now).

Doing the above resulted in a working bot controller without any Gradle assumptions. I can rebuild and restart the jar completely independent of the cfg files or python module and everything keeps working.

@Lambeaux
Copy link
Author

Lambeaux commented Aug 16, 2020

See https://github.com/Lambeaux/Clojure-Bot for some sample maven work and refer to the commit log for varying levels of detail when it comes to bot impls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant