Frequently Asked Questions
- Which Photon Product Is The Right One For Me?
- What Is The Difference Between Photon Realtime And PUN?
- What Is The Difference Between LoadBalancing API And Photon Realtime?
- Is It Possible To Disable Some Regions?
- How To Quickly Rejoin A Room After Disconnection?
Which Photon Product Is The Right One For Me?
This is a difficult question to answer as it depends on the game you are making and the specifics of your project. However we can recommend the following:
- Watch this talk by our CTO and founder Chris Wegmann at Unite Europe 2017
- Read the comparison page: "PUN vs. Bolt"
- Read the comparison page: "Photon Cloud or Photon Server?"
Feel free to reach out to us if you still have questions.
What Is The Difference Between Photon Realtime And PUN?
Photon Realtime wraps up all generic features needed for the load balancing of Photon. It is a product as much as a defined workflow to use Name Server, Master Server and Game Servers. Photon Realtime (a.k.a. LoadBalancing) is the basis for many games using Photon.
While Photon Realtime is independent from Unity, PUN adds many comfortable features for Unity and makes Realtime (the lower level) even easier to use.
Both products share the same backend, same server applications, same low-level stuff, same core concepts. At first PUN was meant to be a better UNet (old Unity Networking): preserve a similar API with a more solid backend and rich features. Then it slowly diverged and became the number 1 solution for multiplayer on Unity.
While we do have a Photon Realtime Unity SDK, PUN has more high level out-of-the-box features like:
- Magic Unity callbacks
- Extra Unity components that serialize and sync. networked objects for you: most important one PhotonView
- Offline mode
Read more here.
What Is The Difference Between LoadBalancing API And Photon Realtime?
LoadBalancing API and Photon Realtime can be two different names for the same thing. The LoadBalancing API or the LoadBalancing Client API is the programming interface available in the client SDKs we provide for the Photon Realtime product.
Is It Possible To Disable Some Regions?
Yes. It works in the other way around by defining a list of allowed regions. Read more about the "Dashboard Regions Filtering".
How To Quickly Rejoin A Room After Disconnection?
To recover from an unexpected disconnection while joined to a room, the client can attempt to reconnect and rejoin the room. We call this a "quick rejoin". A quick rejoin will succeed only if:
- the room still exits on the same server or can be loaded: If a player leaves a room, the latter can stay alive on Photon server if other players are still joined. If the player is the last one to leave and the room becomes empty then the EmptyRoomTTL is how long it will remain alive waiting for players to join or rejoin. If after EmptyRoomTTL the room is still empty and no one joined then it will be removed from Photon server. If persistence conditions are met and webhooks are setup, the room state can be saved on the configured web service to be loaded later.
- the actor is marked as inactive inside: an actor with the same UserId exists inside the actors' list but not currently joined to the room. This requires PlayerTTL to be different from 0.
- the PlayerTTL for the inactive actor did not expire: when an actor leaves a room with the option to come back we save his Deactivation timestamp. As long as the room is alive, if PlayerTTL milliseconds are elapsed after Deactivation time the respective actor is removed from the actors' list. Otherwise, when the actor tries to rejoin, if the difference in milliseconds between the time of the rejoin attempt and Deactivation time exceeds PlayerTTL then the actor is removed from the actors' list and the rejoin fails. So an inactive actor can rejoin a room only for PlayerTTL milliseconds after Deactivation time.
A "quick rejoin" is composed of two steps:
- Reconnect: simply call the appropriate connect method once disconnected.
- Rejoin: call