Using Photon Fusion
Photon Fusion is a networking library for Unity with support for client-side prediction, data compression, and lag compensation. Its Dedicated Server mode runs an authoritative server with no player host — Gameye orchestrates these servers globally via Docker containers.
This integration is documented on Photon’s own site.
How it works
Section titled “How it works”You build a Fusion Dedicated Server binary, wrap it in a Docker image, and push it to Docker Hub. Gameye pulls that image and schedules it across its infrastructure. At session start, you pass Photon-specific arguments (-s for session name, -r for Photon region) so the server connects to the correct Photon relay.
Setup steps
Section titled “Setup steps”1. Build your Fusion Dedicated Server
Section titled “1. Build your Fusion Dedicated Server”Follow the Fusion Dedicated Server sample to produce a Unity dedicated server build for Linux.
2. Create a Docker image
Section titled “2. Create a Docker image”Wrap the Linux build in a Docker container using the Fusion Dedicated Server Docker Image guide. Push the image to Docker Hub.
3. Set up your Gameye application
Section titled “3. Set up your Gameye application”Configure your application in the Admin Panel with the Docker Hub image, port bindings, and target regions. Contact support@gameye.com to get your API token if you don’t have one.
4. Start sessions via the API
Section titled “4. Start sessions via the API”Start a Photon Fusion session by calling POST /session with your Fusion-specific arguments:
curl -X POST https://api.gameye.io/session \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "location": "eu-west", "image": "your-fusion-server", "args": ["-s", "my-match-session", "-r", "eu"], "labels": { "matchId": "abc123" }, "restart": false }'Region mapping
Section titled “Region mapping”Gameye regions map to Photon regions as follows:
| Gameye region | Photon region |
|---|---|
eu-west, eu-south | Europe (eu) |
na-east, na-central | USA East (us) |
na-west | USA West (usw) |
sa-east | South America (sa) |
asia-east | Asia (asia) |
asia-northeast, oce-east | Japan (jp) |
Select the Gameye region that matches your target Photon region to minimise relay latency.