https://github.com/filippo-orru/fourinarow-server
Authoritative game server. Written in Rust using the actor framework actix.
https://github.com/filippo-orru/fourinarow-server
actix game rust
Last synced: 6 months ago
JSON representation
Authoritative game server. Written in Rust using the actor framework actix.
- Host: GitHub
- URL: https://github.com/filippo-orru/fourinarow-server
- Owner: filippo-orru
- Created: 2020-04-11T05:52:04.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-14T20:21:16.000Z (over 1 year ago)
- Last Synced: 2024-12-14T04:04:39.802Z (6 months ago)
- Topics: actix, game, rust
- Language: Rust
- Homepage:
- Size: 6.24 MB
- Stars: 24
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Four in a Row - Server

An **online** version of the popular game **four in a row**, written in Rust on the server side and Flutter + Dart on the client.
***Download here: https://play.google.com/store/apps/details?id=ml.fourinarow***
Or play online (beta): https://play.fourinarow.ffactory.me/
## Related Projects:
- Clientside: [fourinarow-app](https://github.com/filippo-orru/fourinarow-app)- Serverside: [fourinarow-server](https://github.com/filippo-orru/fourinarow-server)
- \[WIP\] bot / watcher: [fourinarow-bot](https://github.com/filippo-orru/fourinarow-bot)
## Features:
- world wide online play
- over 4000 downloads
- account creation, friends system
- beautiful, minimalist design
- subtle animations
- request to battle your friends
- local mode: two players - one device### Under the hood:
- reliable websocket connection
- message delivery guarantee
- message reordering on client and server side
- clean architecture: state and view completely separate
- automatic reconnection

# Deployment
## Prerequisites
Before getting started, make sure you have Docker with Docker Compose installed on your machine.
## Deploy
1. Set up reverse proxy with traefik: https://github.com/filippo-orru/vps-reverse-proxy. Follow instructions there.
1. Create a deploy key using [this script](https://gist.github.com/filippo-orru/a4dcfc7a68c0b8d35487aa8297e98128) and add it to the Github repository.
1. Clone this repository using the command echoed by the script.
1. Copy the `.env_template` file to `.env` and fill in the values.
```bash
cp .env_template .env
nano .env
```
1. Create a systemd service file:```bash
sudo cp fourinarow-server.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable fourinarow-server
sudo systemctl start fourinarow-server
```1. Check the status:
```bash
sudo systemctl status fourinarow-server
```