PUN vs Realtime vs Turnbased

Options
Hi there,

I've never used Photon before. I'm interested in making a Unity game that involves asynchronous drawing and responding to such. I'm a little confused as to all of the product offerings of Photon though - can someone explain the difference between PUN, Realtime, and Turnbased? I understand why there might be a different product for Realtime and Turnbased, but how they compare to and/or overlap with PUN doesn't make any sense to me.

Just trying to pick the right SDK to use. Thanks!

Vexir

Comments

  • Tobias
    Options
    It's a bit confusing, I admit. From our perspective, it makes more sense.
    You can do async games with Photon Turnbased. Players may leave a room to return later. State is saved. You will have to make sure the state of a game does not grow endlessly but that's another matter.
    Use the Photon Turnbased SDK for Unity from this page:
    https://www.exitgames.com/en/Turnbased/Download
  • Vexir
    Options
    I know that Turnbased allows for a-sync games, but what is the difference between Turnbased/Realtime and PUN?
  • Tobias
    Options
    :)
    Turnbased allow async games. It also has a lower price as subscription but lower messages/sec limit, too.
    It is otherwise not different from Realtime. It runs on the same cloud and has the same features (plus the async ones).

    PUN is a client side "SDK" that is basically a layer on top of the "cloud logic" (a.k.a. LoadBalancing API). It uses Photon's features in a way to implement RPCs and Instantiate calls the way Unity does. This makes some things easier to do and adds some components. In the end, the server side is the same for PUN and the other Photon SDKs. Just the methods are different to resemble those of Unity more.

    PUN is not compatible with the Turnbased way to handle inactive players, etc. So this would not be an option, unless you save game state somehow else. That would however mean you loose a big part of Photon's features.
  • Vexir
    Options
    So at the moment PUN is a Unity-optimized, easy to use version of Realtime and has good documentation, examples, and tutorials written for it? I say this because just going through the Turnbased documentation was thoroughly more confusing and had much less explained as well (hence I opted for the seemingly much more plug-and-play PUN).

    Are you guys going to release a version of PUN for Turnbased as well? Because that would be rad.
  • Tobias
    Options
    At the moment, it's unclear if we will allow Turnbased games with PUN.
    We definitely want to make Turnbased a proper solution with appropriate learning curve and good examples and tutorials.
    At the moment I'm working on another PUN update. Then, with your feedback in mind, it's likely we revisit the Turnbased material and improve it.
    I'm sorry there is such a clear difference for the docs. PUN got polished for quite a while now and Turnbased is still new.
  • Vexir
    Options
    No worries. I'm glad the docs for Turnbased are going to be a focus. I look forward to seeing it hopefully work with PUN.
  • PhilippBGL
    Options
    We are currently developing a turn based mobile game with unity. I´d like to evaluate Photon for the networking since it seems that it´s a good choice for our game.

    But theres one big question: We need the turnbased features for persistant session storing, inactive users and rejoining rooms. And we need also the PUN+ feature to deploy to iOs and android without unity pro. Is this possible with the turnbased sdk and licensing?

    And the second question is about CCU:

    Whats with turnbased games? Let´s say I have currently 10 "running" games (1on1) and only 3 of them are active playing (In one game both users are logged on and in two games one user is logged on). The other 7 games are persisted in the cloud and the user are currently inactive. Do I have 20, 6 or 4 CCU?

    Thank you for your time

    Bye
    Philipp
  • Tobias
    Options
    It's possible to use the native sockets from the PUN+ for Turnbased games. However, we don't have a proper package for that, yet.
    Sadly, it's a bit more tricky than just copying a dll from PUN+ to another project. I think we can write a summary though.
    Can you start without the exports?


    Concurrent users only count anyone who's connected at some time. Being inactive in some game does not count, so Turnbased game might have lower CCU counts, if you disconnect players until they get a turn notice via push notification.
  • +1 for this request. I am in the same boat. I purchased the PUN+ package from Unity Asset Store, thinking that the "+" would mean that it would work for all solutions offered. I will say, that it would benefit your team financially if you could streamline your product offering and reduce the confusion. There should only be one package on the asset store (preferably free) that holds all the client side sdks. I could even see a wizard that helps you determine what package you want (realtime/turn-based) and then installs the appropriate dll. From there I would unify your web interface. Consolidate all the dashboards and then separate the apps by type from within your single dashboard. Obviously you are still going to need to register that app for a production license to get more users, but at least then you have a clear path to get to what you need. As it stands, your product is incredibly fragmented and confusing. Had I not purchased the package from the asset store, I would have bailed long ago on this and found another solution.

    I am not trying to knock your company or solution, instead I am trying to give you a viewpoint from a frustrated customer. Hopefully these types of changes could drive more sales for your company. Best of luck and thanks for listening to my rant :)
  • As a followup to this question - I was reading the comparison between Realtime and Turnbased. It looks as though they have the exact same feature set, with the exception of a lower maximum message rate. Does this mean it would be feasible to create an a-sync turn based game using event caching and webhooks using PUN and Realtime? It seems much easier to use than Turnbased and so just as a test I think I'd almost prefer that if it's possible to do.
  • Tobias
    Options
    PUN does not yet work well with loading a persisted game so you can't use it for Turnbased games. We will look into this but we can't promise anything yet.
  • PhilippBGL
    Options
    Do I have any chance to store session data / rooms in the cloud and let user get inactive for hours and perform push notifications and room reactivation with PUN+? Is there any possible workaround? I´d really like to try PUN+. But without these abilities it´s a KO criterion to PUN+ for our project.

    The second possible solution with Photon could be using the turnbased SDK. But since it comes with limited unity support (we already have a running unity networking prototyp) and no in build deployment on the two major target groups (we only have unity pro without iOs and android support) it´s much less charming. And the costs to equip all team members with two additional unity licenses...
    So the second solution might only reasonable if theres a realistic chance to get turnbased PUN+ support in the next few months. (Even if it´s a little dirty merging or something like that)
  • Tobias
    Options
    Are you using Network.Instantiate and .Create a lot?
    If you are OK with a solution that involves some work on your side we might be able to get things to work for your case. Maybe I can even work on making PUN turnbased compatible. It might be good to have you as test case, if you agree.

    Please let me know and mail to: developer@exitgames.com. Then we setup a more direct contact and can work on things. Ok?
  • PhilippBGL
    Options
    Initially for the realtime prototyping we did. But in the meanwhile we decided to realize only a turnbased multiplayer for the mobile devices. So there aren´t any network instantiations anymore. Currently all I do are some RPC calls.

    I have to finish some prototyping regarding visualization and transfering first, than I could start migrating to photon.

    Your offer sounds very interesting :) I´d like to explain what we want to accomplish in a mail in a few days.

    Have a nice weekend
  • So since Turnbased doesn't have an equivalent of Photon's Instantiate, what's a good way to make sure two game objects are synced up when they're spawned?
  • Tobias
    Options
    PhilippBGL: Great. We will look out for your mail. In best case, also refer to this thread.

    Vexir: Almost all in-game communication in Photon is done via events. So you'd call OpRaiseEvent and buffer that. In the event, you name the Prefab that you need instantiated, where it should be created and you give it some network ID. Then you can put this network ID in a list to fetch this object easily.
    PUN does this behind the scenes.
  • Any news on this development? Is it active?

    Can I expect to see a Photon Turnbased in PUN+ in the next, let's say, 6 months?
    Any chance I get to beta it before that? :)

    Thank you!
  • ali
    Options
    Hi Tobias
    you discussed difference between real time and turn based service and you said PUN is a client side "SDK" that is basically a layer on top of the "cloud logic". but I couldn't understand somethings.

    1- If PUN is only a client side SDK so what does mean the prices in this page?
    https://www.photonengine.com/en/PUN/Pricing
    in this page there are two icon for free PUN and 95$ PUN+. but What are other prices for 20ccu, 100ccu, ....
    I confused because according to your explanation PUN is only SDK, not service.

    2- what is photon server?
    https://www.photonengine.com/en/OnPremise/Pricing

    3- and last one, We have a real time sync One By One game. which photon service is suitable for us?
  • vadim
    Options
    Hi,

    1. PUN is client side sdk which allows client use Photon Cloud service. Photon Unity package includes one of PUN clients and CCU limit on server.
    2. Photon server is basically same service as Photon cloud but running on your own hardware. This allows implement any feature which cloud lacks but takes much more effort from developers: https://www.photonengine.com/en/OnPremise
    3. If you want to store game state between game sessions then you probably need Turnbased. Otherwise, Realtime is usually enough. You can easily switch from Realtime to Turnbased later if use Unity SDK. But with PUN switch is not possible. More details: http://forum.photonengine.com/discussion/comment/18894/#Comment_18894
  • ali
    Options
    Hi Vadim and thank you for your complete answer
    so we can use realtime and pun for unity game and as Tobias said pun uses Photon's features in a way to implement RPCs and Instantiate calls the way Unity does. we never need turnbased for our game So you recommend us witch one? pun or realtime? is the only pun advantage easier implementation in unity? does realtime have any advantages that pun doesn't?
  • vadim
    Options
    Realtime may have some advanced features which are not yet in PUN. But basically they are the same. So if you see benefits in PUN's per-object synchronization and sure that you will never need Turnbased, choose PUN.
  • GameDevKev
    Options
    So let me get this straight, the PUN unity asset download from the asset store does not allow Turnbased?
  • vadim
    Options
    The most significant turnbased feature not supported by PUN is rejoin.
    Without it turnbased does not make much sense. So I would say PUN does not allow turnbased.
  • Do we have this rejoin feature yet or not .
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @souravsachdeva,

    Please read @Tobias's comment on this matter here.