Source code for Brain / Out, the game.
First, clone this repo.
Use Gradle Wrapper: ./gradlew <command> on mac/linux, or gradlew.bat <command> on windows
To obtain project, use ./gradlew idea to generate IntelliJ IDEA project. Once project
is generated, open brainout.ipr within IntelliJ IDEA IDE.
Then,
./gradlew desktop:distto build desktop client./gradlew steam:distto build steam client./gradlew server:distto build server
For either of those to work, Game Assets has to be built.
Look at the troubleshooting document, it includes several common issues and how to fix them.
On your build environment, for scripts to work, you need to install these.
NOTE: You will need to use the Python 2 pip.
pip install git+https://github.com/desertkun/hjson-py
pip install pycrypto
Notes:
- Command line git is required to install hjson
pycryptoon Windows could be replaced withpip install pycryptodomesince original pycrypto requires C development environment.
See this readme for how to change Game Assets.
To build them, call ./make_data.sh on Mac/Linux and make_data.bat on Windows.
NOTE: the client digitally verifies the built data! So by default, the client
won't be able to start up with locally built data, since the private key is not present in this repository.
Pass --unsafe command line argument to the client so it would ignore non-signed packages.
Offline Unsafe IDEA configurations already do this.
By default, both the client and the server are trying to participate into the
Alpha game network. Since no keys are present in this repository, for locally run builds please pass
--offline command line argument both to the server and the client.
Offline IDEA configurations already do this.
Server Lobby – server hosting "Main Menu". Offline version is offline, Alpha version participates
in the Alpha network.
Server – server hosting active game phase. Offline version is offline, Alpha version participates
in the Alpha network.
Server Editor – server hosting old non-steam editor. Offline version is offline, Alpha version participates
in the Alpha network. Important to note that client looks for Home User folder brainout-maps by default to upload
any map, use BRAINOUT_MAPS environment variable to point client to <this repo>/bin/server/maps.
Desktop Local Offline Unsafe – a client that tries to connect to server on localhost.
It uses --connect brainout://bG9jYWxob3N0OzM2NTU1OzM2NTU2OzM2NTU3 argument
which is bas64-encoded localhost;36555;36556;36557
You might also see there's Desktop Local 2 * configurations, these are copies under different user,
e.g., you can launch those two in parallel and run two instances of the game on same PC.
Desktop Alpha – a client that tries to participate Alpha network.
The project has a CI system in place: on every new commit, it builds a new version of client/server and deploys it automatically. There are two environments available:
main, which is built on every master committest, which is built on every pull request. A new pull request wipes out the previous one, as it is intended to verify the correctness of the pull request.dev, which is build on everydev_*branch commit. Contributors with collaboration permissions could push there directly and skip PR requirements to check things quickly.
The clients of those builds are deployed on Dropbox, to get invited there, please join the Dev Support telegram channel below and ask for invite link.
If you have development question, please join Dev Support group on Telegram.
Otherwise, feel free to join the Official Discord Community Server