PUN 2 or Fusion?

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Fusion.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

PUN 2 or Fusion?

Malachi
2021-12-07 20:53:20

Hello. I'm developing a GPS game, similar to games like Pokemon GO, Ingress, and Orna. I'm just diving into the multiplayer networking stuff, and it's a lot to learn!

I've seen PUN be recommended a lot, but I see that it's now deprecated, and Fusion is the new thing. But I'm still not sure if I should be using PUN 2 or Fusion for my project.

If it matters, my game isn't very complex as far as the multiplayer stuff goes. It's just simple turn-based combat. There's no physics to worry about, not even any movement, and only 2-4 players per battle. I would like to have server authority, though, as I'd like to prevent cheating as much as possible.

Should I be using Fusion? Or should I use the older PUN 2?

Comments

fedefs
2021-12-08 19:16:32

Hey Malachi,

I am in a similar position to you and have basically the same question.

Is Fusion production ready? Should we be using it over PUN?

I have seen a few posts here recommending it over PUN for new projects. But no official statement (apart from the "legacy" label in the site).

Tobias
2021-12-10 14:56:32

@Malachi, in your case, PUN 2 would be fine, except it doesn't have server authority. So I would actually recommend using Photon Realtime and the Photon Server plugin for authority. It's more bare bones but that means it also doesn't make as many assumptions about what your game needs, so it's lean to work with.

A Photon Server plugin means you have to host Photon or book servers as Enterprise Cloud. Running a lot of games with the plugin is quite cost effective, compared to running Unity instances on machines you pay for.

@fedefs, we recommend using Fusion for new projects, unless you are sure you don't want / need more than PUN 2 offers. It is currently in Release Candidate state and should be relatively stable, API wise. It will hopefully release before any game gets finished with it.

Malachi
2021-12-13 20:15:35

@Tobias From my understanding, Photon Server because doesn't know anything about the Unity game, it wouldn't know things like how much damage an ability should do, or what abilities a monster should have, if those things were saved as scriptable object prefabs within Unity. Is that correct? I don't really have experience writing server code, so Photon Server might be a little too advanced for me if it can't also use the stuff I've already got in Unity. Would Fusion be a better choice then, as I see it has a server option and it's for Unity?

Tobias
2021-12-14 10:37:17

You are right, the Photon Server does not run Unity and is not providing the data you'd setup in Unity (e.g. ScriptableObjects). You'd have to separate these items from Unity to make them run in a pure C# dll / app (and that runs in Photon Server).

Fusion can be run as headless instance or someone can host a game. The key here is that some Unity instance is the authority of the complete game state and yes, this will make your life easier from the programming / organizational point of view. The downside is that either players host game instances (which is fine, as the connections are organized automatically and there is relay fallback) or you have to run Unity instances on machines you rent (so called "dedicated servers").

I would recommend looking into Fusion with players hosting the rooms.

Malachi
2021-12-14 19:18:51

If I run Fusion as a headless instance on a dedicated server, is that just one single room? Or can I run Fusion on a dedicated server and have many rooms on that server?

Tobias
2021-12-15 10:23:48

This would be per room.

tomlet
2022-01-06 06:12:10

@Tobias I am also not sure what service i will need... I am building a multiple player snake battle game. with 30-35 player per room. Also I will need server side authority to prevent any cheat. Is fusion share mode a good service to use. Is it turn that i need Enterprise in order to use the server plugin. Or does fusion shared mode already build-in the option to allow me to chose?

My game will also have tournament running so preventing cheat is very important.

ramonmelo
2022-01-07 12:13:54

Hi @tomlet ,

Please take a look at the replies to your other posts here:

--

Ramon Melo

Photon Fusion Team

Back to top