SpaceEdge is Edgegap's space shooter sample for Fish-Networking (FishNet), built in Unity. This version runs in the browser: players fly, shoot and score in Unity WebGL, and every match runs on its own Edgegap dedicated game server.
The game code stays FishNet: the same NetworkManager, Bayou transport, prediction and RPCs. The sample adds a few Edgegap scripts around it: one starts the server, one finds a match, one keeps them alive across scene changes.
No player hosts the match. The dedicated server checks every shot, owns health and score, and stops its own deployment when everyone has left. The game client holds no Edgegap API token.
Edgegap's network spans 615+ Edge Cloud locations (learn more). Each server is deployed to the best available location for its players and billed only while the match runs.
Clone the sample: SpaceEdge WebGL + Matchmaker on GitHub
Full guide: add Edgegap to your own FishNet game with the Fish-Networking integration guide
Platforms: Unity WebGL in the browser, over secure WebSockets (
wss://); Linux dedicated server. The README says Windows desktop builds also work through Bayou (not part of the tested run). Unity 2021.3.45f2, FishNet 4.1.6R. Uses free Unity Asset Store assets (Cartoon FX, Sci-Fi Sfx, Star Sparrow, Starfield Skybox, TotalJSON) under their own licences.
How it works
A player opens the game in the browser and selects Start Game.
Direct mode (default): the client connects to the server address and port set on
MatchmakingSystem. Matchmaker mode (opt-in): the client sends a ticket to the Edgegap Matchmaker, which groups 2 to 4 players and starts an Edgegap server near them.The server starts FishNet on
0.0.0.0:7770over plain WebSockets. Edgegap's TLS Upgrade adds the secure layer, so browsers connect withwss://to the deployment's host name. No certificate to buy.Players fly and shoot in
BattleScene. The server checks each shot and owns health and score.When nobody joins within 120 seconds, or 30 seconds after the last player leaves, the server stops its own deployment, and billing stops.
What the sample changed:
Path | What it does |
|---|---|
| Connects Start Game to a direct connection (default) or to the matchmaking client. With the matchmaker off, it disables the matchmaking client. |
| Matchmaker mode: creates a ticket, waits for |
| Server builds: starts the FishNet server on port 7770, reads Edgegap's injected variables, and stops the deployment when it's empty. Replaces FishNet's Start On Headless. |
| Keeps the |
| Command-line Linux server and client builds, plus scene setup. |
| Edgegap Unity SDK as a Git package ( |
| Server image on Ubuntu 22.04 with CA certificates; matchmaker profile for browsers. |

SpaceEdge in the browser: every ship flies on the same Edgegap dedicated server.
1. Before you start
A free Edgegap account. Verify your email. No credit card is needed to test.
Unity 2021.3.45f2 with the Linux Build Support (Mono), Linux Dedicated Server Build Support and WebGL Build Support modules.
Docker Desktop, installed and running.
Python 3, or any static web server, to serve the WebGL build locally.
Clone the repository with
git clone, then open theFishnet_v4.1.6R_WebGL_Matchmakerfolder in Unity Hub. The other folders are older samples; some put an Edgegap API token in the game client, so use them for local tests only.
Git: Unity needs a Git client (2.14.0 or newer) on your PATH to install packages from a Git URL, such as the Edgegap plugin. macOS usually has one already (Xcode Command Line Tools); on Windows, install Git.
2. Play locally
Build the server with Tools → Edgegap → Build Linux Dedicated Server. The build goes to Builds/EdgegapServer/. Then run it in Docker, from the sample folder:
docker build --platform linux/amd64 -t fishnet-server:local .
docker run --rm -p 7770:7770 fishnet-server:local
The log shows Edgegap Server | Starting server on 0.0.0.0:7770. and Not running on Edgegap, self-stop disabled.
Build the WebGL client from File → Build Settings, or from the command line:
Unity -batchmode -quit -projectPath . -executeMethod EdgegapServerBuild.BuildClient -edgegapClientTarget webgl
Serve Builds/Client/webgl, for example with python -m http.server 8080, open http://localhost:8080 in two tabs and select Start Game in each. The defaults (localhost, 7770, Direct Use Wss off) connect to the local server.
3. Put the game server on Edgegap
Push the image to your Edgegap registry. The Container Registry page has your project, username and token:
docker login registry.edgegap.com
docker build --platform linux/amd64 -t registry.edgegap.com/<project>/fishnet-server:v1 .
docker push registry.edgegap.com/<project>/fishnet-server:v1
In the dashboard, create an application (the sample's matchmaker config expects fishnet-webgl-matchmaker) and a version v1 for that image:
Port: name
gameport, port7770, protocol WS, TLS Upgrade on. Edgegap handles TLS, so browsers connect withwss://while the server speaks plainws.Container registry username and token set, or deployments fail to pull the image.
Use a new image tag for every build, never latest.
4. Play on an Edgegap server
Deploy the version from the dashboard, near you. When it's Ready:
On the
MatchmakingSystemobject in theMainMenuscene, set Direct Address to the deployment's host name (<id>.pr.edgegap.net, not its IP), Direct Port to its external port, and tick Direct Use Wss.Rebuild the WebGL client, serve it, and play in two tabs.
The external port changes on every deployment, so read it each time. The server stops its deployment 120 seconds after it starts if nobody joins, and 30 seconds after the last player leaves.
5. Add it to your own FishNet game
The sample is a working reference: your coding agent can copy its tested files instead of writing them from scratch. Four changes make a FishNet browser game run on Edgegap:
The server starts itself.
Assets/Edgegap/EdgegapServerLifecycle.csstarts FishNet on a fixed port in server builds. Turn Start On Headless off onServerManager, so the same scene works for client and server builds.The server stops itself. The same script reads Edgegap's injected variables and stops the deployment when it's empty, so billing stops.
It survives scene changes.
Assets/Edgegap/EdgegapPersistence.cskeeps theEdgegapobject alive across FishNet scene loads. Without it, the server's self-stop dies with the menu scene.Browsers connect securely. Bayou on 7770, a WS port with TLS Upgrade on the app version, and clients that connect with
wss://to the host name (MatchmakingSystem.cs,EdgegapMatchmakingClient.cs).
Then containerize the server with the sample's Dockerfile as a model, and create the app version as in step 3.
With your agent:
"Load the edgegap skill, then edgegap-fishnet. Using github.com/edgegap/netcode-game-sample-unity-fishnet-hashgrid/tree/main/Fishnet_v4.1.6R_WebGL_Matchmaker as the reference, make my FishNet game a WebGL dedicated-server game: Bayou on 7770, the Edgegap server lifecycle, persistence and matchmaking client scripts, Start On Headless off, wss to the host name on the client, and a matchmaker config with no latency rule and my web origins in allowed_cors_origins."
For each step in detail, by hand, see the Fish-Networking integration guide. For browser rules that apply to any Unity netcode, see Unity WebGL.
6. Turn on the Edgegap Matchmaker
The matchmaker groups players, starts an Edgegap server near them and gives every client its address. In the sample it's off until you tick it.
In
matchmaker-config.json, setapplication.nameandversionto your app and version, and list every web address that serves your WebGL build inallowed_cors_origins(the file hashttp://localhost:8080).In the dashboard, open Matchmaker, select Create Matchmaker, upload the file and select Create and Start.
In
MainMenu, copy the API URL and Auth Token into Base Url and Auth Token on theEdgegapobject's Edgegap Matchmaking Client. The Auth Token is safe to ship in the client. Tick Use Edgegap Matchmaker onMatchmakingSystem.Rebuild the client, serve it from an allowed origin, open two tabs and select Start Game in both.
Two rules for browser games, already in the sample's config:
No latency rule. Browsers can't ping Edgegap's latency beacons, so Edgegap places the server from the players' IPs.
List your origins. Without them in
allowed_cors_origins, the browser blocks the matchmaker's replies.
The casual profile matches 2 to 4 players. When you ship a new server build, push a new tag, create a new app version, then in the matchmaker Stop → Edit application.version → Start.
Known limits
Test with two players. The profile expands to 1 player after 30 seconds, but in Edgegap's tests a lone player only got a server when the ticket neared its 5-minute expiration.
Free tier. The matchmaker restarts every 3 hours (URL and token stay the same), and only one deployment runs at a time. A forgotten test deployment blocks matchmaking.
No ticket check on the server yet. The server doesn't check that a connecting client holds one of the match's tickets (
MM_TICKET_IDS), and there's no backfill. Both are next steps for a real game.Direct mode is manual. Without the matchmaker, you copy each deployment's host name and port into the client and rebuild.
What was tested
Tested end to end on Edgegap on 15 October 2026, with Unity 2021.3.45f2, FishNet 4.1.6R, Bayou, Edgegap Unity SDK 3.5.5 with the POST fix that shipped in 3.5.6, and matchmaker 3.3.2 on the free tier:
Matchmaker: two WebGL tabs were matched, got the same server, connected over
wss://with TLS Upgrade, and played.Self-stop: after the match, the server stopped its own deployment.
Local: the Docker server logs
Starting server on 0.0.0.0:7770.and accepts WebGL clients onlocalhost.
On 21 October 2026 the sample moved to the SDK's main branch (3.5.6 or later), which carries the same fix. Desktop clients through Bayou: should work, not part of the tested run.
Frequently Asked Questions
Questions about running FishNet's SpaceEdge sample in the browser on Edgegap.
Can a FishNet WebGL game connect to a dedicated server?
Yes, with the Bayou WebSocket transport. The server runs plain WebSockets on port 7770, Edgegap's TLS Upgrade adds the secure layer, and the browser connects with wss:// to the deployment's host name. SpaceEdge does exactly this.
Do I need the Edgegap Matchmaker to play SpaceEdge online?
No. By default the sample connects directly to a server address and port you set, so you can test against a deployment you start from the dashboard. Tick Use Edgegap Matchmaker to have players grouped and connected automatically.
Does the SpaceEdge client hold an Edgegap API token?
No. In matchmaker mode it only uses the matchmaker's Auth Token, which is safe to ship in clients. The older folders in the same repository call the Edgegap API from the client, so use those for local tests only.
Why does the matchmaker fail on Unity 2021.3?
Before Unity 2022.3, Edgegap Unity SDK 3.5.5 and older send ticket JSON the matchmaker rejects with HTTP 400. Use SDK 3.5.6 or later; the sample tracks the SDK's main branch.

Clients
Learn more from clients who integrated Edgegap
31 case studies are available from studios that moved to Edgegap from another platform.

A Flawless Global Launch for Rivals of Aether 2
Aether Studios
Learn how Aether Studios quickly added Edgegap and delivered flawless launch & post-launch to their community.
Case Study

Overcome Latency Introduced by VR’s use of WiFi in Competitive Multiplayer
Halfbrick Studios
Discover how Halfbrick successfully launched & maintains a multiplayer-focused Early Access on META Quest's VR platform.
Case Study

MENA’s Social App Adds Online Games
WOLF
Learn how the highly popular MENA-region social app added matchmaking & multiplayer games orchestration easily to WOLF Qanawat.
Case Study

Hybrid Orchestration Keeps Kickoff Tactics Ready for Any Traffic
Birch Games
How hybrid orchestration helped Birch Games handle traffic, pairing egress-free Fleets with the regionless cloud.
Case Study

7 Days Blood Moons
The Fun Pimps & iLLOGIKA
Learn how Illogika dramatically reduced server costs & ensured the online experience the 7 Days to Die franchise expects.
Case Study

Authentic Online Warfare Requires the Ultimate Orchestration
Highwire Games
Learn how Highwire's need for performance required orchestration only Edgegap can deliver.
Case Study

22,000 Reviews, 4.8 Stars, and Infrastructure That Scaled Automatically
Sinn Studios
How a simple, Slack-supported integration got Sinn Studio's hit VR title online fast and keeps it there.
Case Study

Dynamic Server Orchestration
Under NDA - AAA Studio
Discover how one the world's biggest AAA studio improved its peer-to-peer multiplayer experience through edge computing.
Case Study

Near Zero Latency for AAA Fighting Game
AAA Studio - Under NDA
How an unannounced project delivered the lowest lag possible and improved fairness in its 1v1 game.
Case Study

Play Gods with Multiplayer Physics
Squido Studio
Learn how Squido uses Edgegap's highligh optimized game servers to deliver mind-bending & chaotic VR gameplay.
Case Study

A Fully Managed Solutions that Saves Time for Indies Multiplayer VR Horror
Dirty Pearl Studios
Discover how Dirty Pearl Studios saved development time thanks to Edgegap’s easy integration and automated orchestration alongside its Nakama integration.
Case Study

Instant Global Server Deployment for Collaborative XR Medical Education
AlensiaXR
How AlensiaXR uses Edgegap to deliver low-latency, always-available shared anatomy sessions to medical students worldwide.
Case Study

The Lightkeepers: A VR Social Co-op Game with Dedicated Servers
Spectral Games
How Spectral Games used Edgegap Matchmaking and Server Browser to launch dedicated servers for its VR social lobby, with no prior server experience.
Case Study

Fast & reliable deployments worldwide for PvPvE challenger Gravebound
Crater Studios
How Edgegap’s orchestration and matchmaking helped Crater Studios dramatically helped a small them focus on gameplay instead of infrastructure.
Case Study

Rapid Scaling of Web Metaverse
Hiber
Learn how Hiber eliminated the guesswork out of its server capacity planning with Edgegap.
Case Study

High Hardware Requirements & Custom Game Server Pools
Alderon Games
Learn how Alderon Games instantly leverages a custom pool of game servers across multiple providers worldwide for its popular MMO.
Case Study

Easy Integration for Indie Devs
WhaleFood Games
Read how WhaleFood Games "kicked out" its netcode issues with Edgegap.
Case Study

Cutting-edge tech that powers South-East Asia’s first-ever eSports title.
Anantarupa Studios
Learn how Edgegap transformed South-East Asia’s gaming landscape streamlining complex infrastructure and cutting-edge tech with one seamless solution.
Case Study

One Strike. Global Reach.
Triple Hill Interactive
How Triple Hill Interactive leverages Edgegap's orchestration to deliver low latency and improve fairness in a genre where every millisecond counts.
Case Study

Fast-paced Team Battle Royale... with Gun-totting Animal Plushes!
SANDYFLOOR
Discover how a Korea-based Indie Studio launched it multiplayer worldwide.
Case Study

Mobile Horse Racing Goes Global with Instant, Cost-Efficient Servers
Mirai Labs
How Mirai Labs powers Pegaxy Blaze's worldwide multiplayer races with just-in-time server deployment and fractional vCPU to keep cost per player low.
Case Study

Server Management & Distribution
Matrioshka Games
Read how Matrioshka Games were able to ship a Battle Royale in early access with limited ressources.
Case Study

At my Signal, Unleash Hell!
TyGames
Discover how Indie studio TyGames immerses players in third-person gladiatorial combat multiplayer.
Case Study

Instant Worldwide Orchestration
Soliton Interactive
Discover how Soliton Interactive did the impossible… Ship it's first playable as multiplayer!
Case Study

Competitive play with server-side physics ensures ideal sub-50 ms latency
NS7
Discover why solely Edgegap could enable an indie studio to deliver on its vision for a AAA-quality F2P sports gameplay through server-side physics and authority.
Case Study

Regional Deployments for iGaming
X1 Contra 1
X1 Contra 1 delivers real-time PvP casual games to its Brazilian player base through cost-effective hosting & regional deployments, ensuring data and legal compliance.
Case Study

Pay Only When Players Play: Affordable Multiplayer Infrastructure
Meltdown Interactive
How Edgegap helped indie developer Meltdown Interactive Media solve cost-effective scaling and matchmaking without the complexity, so they could focus on building the game.
Case Study

One Edgegap platform, three very different networking profiles
Warped Games
How Warped Games runs a social hub, real-time co-op, and turn-based co-op, all on the same Edgegap deployment API and the same container pipeline.
Case Study

Pool Live Tour Max
RETA Games
Case Study

Korea’s Web3 POP Extraction Shooter Goes Global, Instantly
NDUS Entertainment
How XOCIETY easily added Edgegap orchestration & integrated custom matchmaking working alongside Edgegap Ping Beacons to optimize latency.
Case Study

Multiplayer in Every Dimension
Arcadia.tv
Discover how Arcadia.tv uses Edgegap's edge network to deliver an innovative, team and location-based athletic VR sport.
Case Study

F2P Mobile Fighter Cuts Infrastructure Costs With Just-in-Time Servers
Game Changers Worldwide
How Game Changer Worldwide hosted Rumble Rush's real-time 3v3 PvP globally on mobile.
Case Study
Key reasons why they chose Edgegap
Discover the impact of Edgegap's automated game server orchestration for a flawless multiplayer experience.









