Skip to content

Search the store

Find products and categories.

Setup

Set up Mirror: regions for lobbies and game servers, the Aegis config, turning mirrored matches on, and the TCP link between regions.

Before you start

You need a working Duels network with Robotricks, and at least two regions. Each region needs its own Duels lobby and Duels game servers. See Duels installation and Robotricks installation.

Mirror decides a player's region from the server they are on when they queue. Players in an EU lobby count as EU and players in a US lobby count as US.

Install

Products are delivered through your personal Aegis loader. If the loader is not on the server yet, follow Installation first.

Set each server's region

Give every lobby and game server the region it runs in. Lobby and game servers in the same region must use the same value.

plugins/Kernel/kernel.yml
serverId: duels-game-1
region: eu
group: duels-game

The NEXUS_REGION environment variable overrides region.

Add Mirror to every game server

Add Mirror on every Duels game server in every region. It is not needed on lobbies.

plugins/Aegis/config.yml
products:
  DuelsGame:
    enabled: true
    release: latest
    channel: stable
    required: true
  Robotricks:
    enabled: true
    release: latest
    channel: stable
    required: true
  Mirror:
    enabled: true
    release: latest
    channel: stable
    required: true

Turn on mirrored matches

On every game server, set mirror: true in Scaffold's config. You can set the SCAFFOLD_MIRROR environment variable to true instead.

plugins/Scaffold/scaffold.yml
gameServer: true
mirror: true

Leave mirror: false on your lobbies.

Every game server listens on TCP port 25599 and connects to the other region's game server on the same port. See The link below.

Restart

Restart the game servers. The console logs [mirror] listening on 25599 when Mirror is ready.

When a mirrored match starts, the game server with the alphabetically first server id waits for the connection and the other one dials it. The dialling server tries every second for about 15 seconds.

A server is reached at this address:

<serverId>.<group>.<domain>
  • <serverId> is the Kernel server id of the other game server, such as duels-game-1.
  • <group> is that server id up to its last -, such as duels-game.
  • <domain> is domain in plugins/Mirror/mirror.yml. It is nexus.svc.cluster.local by default.

So duels-game-1 with the domain eu.example.net must resolve as duels-game-1.duels-game.eu.example.net from every other region. Set up DNS so each game server's name points at that server, and allow the Mirror port between them.

Check it works

  1. Queue the same kit for 1v1 from lobbies in two regions.
  2. Each player should land on a game server in their own region, facing the other player's skin.
  3. The guest server logs dialling and the host logs waiting for, both followed by the other server's id. A log line saying the match could not reach a server means the address or port is wrong.