This is the official repository of Rai-Net Access Battlers, the digital version of the famous board game downloadable from www.rainetdigital.com, and available for Android, Windows, and Linux
The project is composed of two main part:
- The game source code located in Game/
- The multiplayer server located in Server/
The game is currently developed using Unity 2020.3.2f1
For any information and support join our Discord Channel!
The multiplayer is implemented using real-time client-server communication via WebSockets using Socket.IO available with Node.js. The backend implements four services:
- HTTP server that exposes a single end-point /info used by the application to retrieve up-to-date information such as the latest version and custom message to show to the user. The source code of the server is located in Server/HTTPserver
- MongoDB server used to store persistent data about users and matches information. This server is implemented with a docker container using the latest MongoDB image
- Mongo Express server an optional service used to get quick access to the MongoDB database. For more info about Mongo Express click HERE. Also, this server is implemented with a docker container using the latest Mongo Express image
- Matchmaking Server, the actual service that provides matchmaking functionality using real-time client-server communication via WebSockets using Socket.IO.
At run-time, each one of these services is dockerized and run via docker-compose
Thanks to docker containers and docker-compose starting a local multiplayer server is pretty simple, follow these steps:
- (Optional) Change the credentials information on the .env file
- Open the game project with Unity and open the script NetInfo.cs located in Assets/Script/NetInfo.cs. Here change the value of the variables
HTTP_SERVER_INFO
andMATCHMAKING_SERVER
replacing 192.168.1.20 with your local machine IP - Compile the game and generate the build for your device
- Open a terminal in Server/ and run
docker-compose up -d --build
to instantiate all the services
The client game application and the server must have the same game version otherwise the client connection will be refused. To set the game version on the server set the GAME_VERSION variable on the Server/.env file. To set the game version of the client game application set the public variable Version of the Main_Menu gameobject.
Feel free to contribute to this project! The main improvements concern:
- Implement an efficient AI for single player
- Clean and comment the code
- General improvements
Open a PL on the DEV branch to propose a change or open an Issue to suggest a change, report a bug, or discuss a feature
If you like this project, you can give me a cup of coffee :)
The content of this project itself is licensed under the GNU General Public License v3.0