speaker
Announcement: coherence 1.2 is now released! See what's new with 1.2

Running a Game for Free, Without Servers

At coherence, we’re well aware of the hurdles in making a multiplayer game. In addition to the technical skills needed, the question “How much will it cost to run it?” is one that always pops into the mind of a wise developer. Calculating ongoing costs for a live game can be difficult before even starting development, and might lead to shifting the game’s business model entirely.

Luckily, there is an option that might help you keep the costs down, effectively making coherence completely free to use: CLIENT-HOSTING.

Hurdles small.jpg

How does Client-hosting work?

Before explaining Client-hosting, let’s quickly cover some basics.

At the heart of a multiplayer match running on coherence there is always a Replication Server: a lightweight server that all Clients and Simulators connect to, and that is effectively managing the streaming and messaging between them. But where does this Replication Server run?

The most convenient way is to run it in the coherence Cloud. We take care of all the scaling, persistence, and connectivity between Clients, and you can easily support desktop, console, VR and especially mobile games this way.

Cloud-hosted HD.png

This is the easiest option for you and, if you ask us, often the cheapest if you want to run a game at scale: we take care of running the servers, we make sure they don’t go down, and more. That’s our core business, as described in our pricing page, and our credits system makes it possible to really tailor it to your needs.

With Client-hosting, the game is set up pretty much in the same way, except that one of the connecting Clients will also run the Replication Server on their machine, alongside the game. They effectively become the host, even though in the game they don’t have any special power (well, except an exceptionally low ping!).

Client-hosted HD.png

By doing this, because there’s no “server” involved but only the players and their computers, there is no cost to pay to us or anyone else, so coherence becomes effectively free to use.

Using Steam or Epic Game Store so players can find each other

A typical problem in this setup is that players won’t easily be able to find each other over the internet, and their firewalls will make it even more difficult to establish a connection.

Luckily Steam, Epic Games, Playstation and others offer the ability to use their relays to connect players, and they offer it for free!

We already support Steam Datagram Relay. For more information, you can have a look at the documentation and the sample project.

Support for custom relays, Epic, Playstation, and others is also coming, but for now you can easily add it yourself using the Steam implementation as a sample.

Supported platforms, stores

Supporting Client-hosting with one of the aforementioned store APIs doesn’t lock you into their platform: oftentimes, their APIs can be called even if the game is run outside of the store.

Client-hosting is currently supported on PC, Mac, Linux, Xbox and Playstation (for details on console support, please get in touch).

Disadvantages of Client-hosting

There are a few reasons also to not choose Client-hosting.

For instance, all players will be dependent on the connection speed and performance of the one hosting the Replication Server.

Another one is that there is no cheat prevention whatsoever. This, combined with the fact that the hosting player will always have the best latency, makes it hard to establish a level playing field for competitive games.

Other considerations involve persistent data: if your game has a persistent world and the host can’t play, how can the other players access their progress?

Note: we do actually have some improvements to persistence on our roadmap that will take care of this. Players will eventually be able to transfer persistence data from a Client-hosted game to a managed one.

Advantages of Client-hosting: zero costs, longevity

The main advantages of Client-hosting are zero running costs and longevity of the game. As long as the hosting player can be reached by the other players (either through a relay like the Steam Datagram Relay or by making the host machine accessible on the internet), the game will keep supporting multiplayer even if the developer or publisher is no longer investing in it.

The ability to choose

As we saw, Client-hosting has its pros and cons. You might decide not to go for it and opt for the convenience of the coherence Cloud instead. Or maybe you want to defer and implement it later in the lifecycle of the game. After all, Client-hosting is a great way to put the game in the hands of your players, who will be able to keep playing even if you decide to shut down the game’s servers. This is great news for games with dedicated communities.

So it’s great to be able to do Client-hosting if needed, and this is not to be taken for granted. Many networking solutions you can find out there only support hosted networking. Our mission is to make multiplayer networking easier and more accessible, even if it means less revenue for us in the short term.

And the great thing about Client-hosting is: you can freely change your game from client- to managed hosting and back without making any changes to the netcode. You might start with Client-hosting at first, get loads of players, add cloud hosting to take advantage of features like persistence, mobile connectivity, etc., and then switch back to Client-hosting when you no longer have the budget to support the game, but don’t want to disappoint a vibrant player base by shutting down the game entirely.

If we made you curious about Client-hosting, head to the dedicated page on our docs for the technical nitty-gritty.

And if you’re totally new to coherence, head to our documentation, download the Unity SDK, jump on the free tier, and start creating a great multiplayer game!

Thumbnail by Lorenzo Herrera on Unsplash

Header by ELLA DON on Unsplash

Photo by John Cameron on Unsplash

Written By

Ciro Continisio

Published in: Tech
November 2, 2023