Unity 6 multiplayer vs. Photon Fusion

I have a simple multiplayer game that I developed in Photon Fusion. I built it to WebGL, uploaded it to itch.io and I can play it smoothly with other people, who open the game in their browser.

Now, I have read that Unity 6 has new multiplayer features. My questions are:

  • With Unity 6, can I simply build a game to WebGL and upload it to itch.io, and it will be playable by multiple players (without hosting my own server)?
  • Is there a guide on how to migrate a Photon Fusion project to Unity 6?

Any feedback from developers who know both systems is welcome.

Yes. You can also directly upload to Unity Play for quick testing via Web Publisher package.

Online multiplayer on the web always requires running a server executable somewhere, and it can’t be a web application (eg it must be a Linux or Windows executable) and you’ll have to pay for the server / hosting one way or another.

There is no client-hosted option on the web with any networking framework, including Photon, because browser security measures do not allow applications to accept incoming connection ie act as a server/service.

If not having your own server currently works with Photon they probably have a webserver backend service running for you (presumably a simple Relay service) and I assume you’d likely have to pay for it past a certain threshold.

I believe Unity’s Distributed Authority may eventually provide web multiplayer without a “true” server but I’m just making an assumption - it seems likely but it’s not currently an option as far as I’ve heard. Nevertheless it’s also (or will be) a paid service.

So if you intend to port merely because of (fear of) costs, it’s probably not worth it.

You can’t expect that since nobody in their earnest is converting a multiplayer game to another networking framework AND documenting the process.

What you can do is to get an idea where the frameworks differ by studying their manuals. Typically, besides the setup and some keywords, they function pretty similar.

However, all of these frameworks are tightly coupled with your code, including basing off of a common “NetworkBehaviour” and those sorts of things. So you’ll have to touch every script that uses networking.

Porting is a whole lot easier if you rely only on the Transport level or messaging features of any networking framework. This can be encapsulated in a modular way and replaced with another transport module much more easily if you’re looking for less dependency on a particular tech in the future.

You are right, they have a webserver that is free up to 20 concurrent users, which is more than I need. Does Unity have something similar?

Multiplay grants you a $800 bonus for 6 months from sign-up. But there’s no free tier.

Forums have some answers around WebGL and Unity supported solutions. But here’s a quick summary:

Netcode for Game Objects has been around for many years and is not only for Unity 6, though there are improvements only available in that latest version. It will be the analogous monobehaviour netcode framework you’d convert to from Fusion, many of the concepts and even class names are similar:

Unity Relay (cloud service with a free tier) supports WSS connections for WebGL client hosted games: Networking

The distributed authority network topology in Netcode for Game Objects supports WebGL and host migration (also a cloud service with a free tier): Distributed authority and WebGL quickstart | Unity Multiplayer

Pricing for Unity services: UGS Pricing

Is there any information about the capacity of the services provided? I would like to compare Unity services with regular Ubuntu-based dedicated hosting. I have already heard several times about the high price of the services provided in comparison with regular hosting

What do you mean by “capacity”?

Performance specs are in the manual. For Multiplay Game Server Hosting, unless you are an Enterprise customer, you get a Google Cloud compute N2 system with 2 cores, 8 GB RAM, 50 GB disk space and Linux last time I checked (±3 months ago).

Yes, regular hosting is cheaper. But regular hosting also isn’t a service. You manage everything yourself. You cannot (currently) use Unity Matchmaker with your self-hosted server for instance. You don’t get on-demand allocation of additional servers or automated shutdown of unused servers. You also don’t get fleet management where you get provisioned more servers located in Asia when the game takes off there and so on.

Keep in mind that online multiplayer games do not, almost never, run on just a single server or a single location. For a worldwide game you’d have to have at least one or two servers in all heavily populated regions of the world, ie Australia, Indonesia, Asia, Europe, North & South America and depending on where the game is hot, even more ie spread across several countries in Europe or servers in Japan and Taiwan.

1 Like

Just in case this is unclear:

Fusion supports exports to WebGL in Unity 2021.3 and newer (including of course Unity 6).
The game client can then be hosted for browsers on itch.io, other services or your own server.
Developers get 100 CCU for free for one Fusion app and this can even be combined with subscriptions for more CCUs later on (as needed).

when developing for Fusion with Unity 6, is it possible to use Multiplayer Play Mode, for testing several players simultaneously within the editor?

Yes, that’s supported in Fusion 2 (since v2.0.2). There are a few details you want to be aware of (e.g. you can not really use static variables in this mode, etc).