Skip to content

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
PartDoes
SurvivalGamesOn 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 / MariaDBStats, 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.

WhereInstall / set
HubHUB-Plugin; its config.yml network.backend and database: the same as the game servers. spigot.yml settings.bungeecord: true
Each SG serverEranoAPI.jar + SurvivalGames.jar; storage.type: MYSQL and storage.mysql, network.enabled: true, network.lobby-server: <the hub's name on the proxy>
Each backend serverspigot.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 doctor checks it.
  • Lobby world: lobby.enabled: true gives each game server its own lobby world; false sends 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-folder of 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 folder

Hubs: 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 ​

  1. On the hub the player picks an arena or Quick Join. The hub reserves a seat and sends them.
  2. The game server puts them in that arena. A full server refuses the login, so the proxy keeps the player where they are.
  3. Eliminated players watch as ghosts; their compass shows the network's arenas.
  4. When the game ends, everyone goes back to the hub (network.lobby-server).

Settings ​

SettingDefaultMeaning
network.enabledfalsePart of a network
network.server-name""This server's name on the proxy; empty: SG_SERVER_NAME, else asked from the proxy
network.publish-statustruePublish this server's arenas
network.backendMYSQLMYSQL (needs storage.type: MYSQL) or REDIS (network.redis)
network.lobby-serverLobbyThe hub players return to
network.send-eliminatedfalseSend eliminated players to the hub at once instead of spectating

SurvivalGames is a paid plugin. EranoAPI is open source under the MIT license.