Networks
SurvivalGames runs on BungeeCord or Velocity networks. The servers share what arenas they have, so a hub can show every arena of every server in one menu and send players straight into a game.
BungeeCord / Velocity
│
┌───────────────┼────────────────┐
Hub ×N SG server ×N
HUB-Plugin SurvivalGames
└──── shared state: MySQL or Redis ────┘
│
MySQL / MariaDB: stats, coins, names| Part | Does |
|---|---|
| SurvivalGames | On every game server. Publishes its arenas, takes players sent to an arena, sends players back to the hub. |
| HUB-Plugin (free) | On the hub: hub map and rules, the arena menu of all servers, Quick Join, /play. |
| MySQL / MariaDB | Stats, coins and player names, shared by all servers. |
| Redis (optional) | Live arena state and instant menu updates; for large networks. |
Small network (100 - 1k players)
A proxy, one hub, 2 - 20 SurvivalGames servers and a MySQL / MariaDB database.
| Where | Install / set |
|---|---|
| Hub | HUB-Plugin; its config.yml network.backend and database: the same as the game servers. spigot.yml settings.bungeecord: true |
| Each SG server | EranoAPI.jar + SurvivalGames.jar; storage.type: MYSQL and storage.mysql, network.enabled: true, network.lobby-server: <the hub's name on the proxy> |
| Each backend server | spigot.yml settings.bungeecord: true (Velocity: legacy forwarding), server.properties online-mode=false |
- Server name:
network.server-name; empty asks the proxy when the first player joins./sg doctorchecks it. - Lobby world:
lobby.enabled: truegives each game server its own lobby world;falsesends players from the hub straight into an arena and back to the hub when the game ends, and the compass shows the whole network. - Maps: point
maps-folderof every server at one shared folder; an edit saved on any server becomes every server's map from its next game. Two servers can't edit the same map at once.
Large network (1k - 10k+ players)
A cloud system (CloudNet, SimpleCloud, Kubernetes) starts and stops game servers from one template; a few hubs, Redis and MySQL. Settings come from environment variables: SG_ + the setting's path in capitals. They're never written to files or logs, so the template holds no passwords.
bash
SG_SERVER_NAME=<the name the cloud gives>
SG_STORAGE_TYPE=MYSQL
SG_STORAGE_MYSQL_HOST=db.internal
SG_STORAGE_MYSQL_PASSWORD=...
SG_NETWORK_ENABLED=true
SG_NETWORK_LOBBY_SERVER=hub
SG_LOBBY_ENABLED=false
SG_NETWORK_BACKEND=REDIS
SG_NETWORK_REDIS_HOST=redis.internal
SG_END_ACTION=SHUTDOWN # one server = one game; or RESTART for several arenas per server
SG_MAPS_FOLDER=/srv/sg-maps # the shared map folderHubs: HUB_NETWORK_BACKEND=REDIS, HUB_NETWORK_REDIS_HOST=....
Memory: every arena is a world of its own; plan about 1.5 GB for a server with four arenas.
How a player moves
- On the hub the player picks an arena or Quick Join. The hub reserves a seat and sends them.
- The game server puts them in that arena. A full server refuses the login, so the proxy keeps the player where they are.
- Eliminated players watch as ghosts; their compass shows the network's arenas.
- When the game ends, everyone goes back to the hub (
network.lobby-server).
Settings
| Setting | Default | Meaning |
|---|---|---|
network.enabled | false | Part of a network |
network.server-name | "" | This server's name on the proxy; empty: SG_SERVER_NAME, else asked from the proxy |
network.publish-status | true | Publish this server's arenas |
network.backend | MYSQL | MYSQL (needs storage.type: MYSQL) or REDIS (network.redis) |
network.lobby-server | Lobby | The hub players return to |
network.send-eliminated | false | Send eliminated players to the hub at once instead of spectating |