Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Third Party Upcoming Unity Networking vs. Photon

Discussion in 'Multiplayer' started by vincentellis, Apr 27, 2015.

  1. vincentellis

    vincentellis

    Joined:
    Oct 21, 2013
    Posts:
    100
    With the upcoming networking solution by Unity, should i develop with Photon or with the current Unity networking solution, and then upgrade?
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    Hard to tell. Do you need the a reliable solution at a fixed date? Is it a commercial release or a hobby project? Are you OK to host / manage servers?
     
  3. RBN

    RBN

    Joined:
    Jun 21, 2013
    Posts:
    7
    To be honest, I would choose the new Unity Networking over Photon by a mile. It has so much features that are easy to implement too, and the fact that you don't have to pay and for Photon you do, while UNET has more features... I don't really see any advantages on Photon, except that it's currently released already.
     
  4. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Depends on you project.

    What type of server setup are you looking for? P2P, Authoritative hosted server, non-authoritative hosted server? Do you want to host servers yourself.
    How serious are the project?

    RBN mentions UNET is free, which is true as long as you don't need a server to host anything on. As soon as that is the case then its not free anymore, which is the case with most solutions.

    Right now UNET focus on P2P as far as i understand.

    So as always it depends on the project.
     
    jpthek9 likes this.
  5. 511

    511

    Joined:
    Nov 18, 2012
    Posts:
    55
    Really? I have read somewhere that you can actually swap from p2p to client/server at any point without changing the code.
     
  6. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Capollastre likes this.
  7. Fantastic Worlds Studio

    Fantastic Worlds Studio

    Joined:
    Apr 26, 2015
    Posts:
    48
    If you use the current Unity networking code, you'll have to throw all that out when UNET comes out. Best to wait if you're going to use that system.
     
  8. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    As BFGames said, it completely depends on your project. For most projects though, I'd choose UNET over Photon simply because I get more control. This comes at the cost of setting up your own servers and some lower level stuff, though I think UNET will still take care of most of the under-the-hood for you.

    The hamartia of Photon Cloud is that it can't run any custom code. What I mean by this is that PCloud servers are 'dumb' and only have information routed through them. This information can't be modified by you so don't expect any fancy authoritative servers.

    If Photon Cloud let you customize your server logic, it would be a practical choice for many games but at the moment, it's a viable choice for only low resource games.

    You can create custom server logic with the self-hosted version of Photon but that's not very different from the current Unity networking, which you can get for free.
     
    Last edited: May 1, 2015
    Capollastre likes this.
  9. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    I agree with most of your post.

    But i keep seeing statements like this. As i worked with Photon Server for a year or so, i will say that it is A LOT different. Photon is made out of the box with load balancing and able to scale for large games easily. Also you don't have to run it in Unity instances, which is a big difference. Its a proven solution that is a very good choice if you are very serious with your project and aim for 1000's of players, and it will work for all types of games if you got the coding skills.

    The downside is that it does not integrate with Unity's API, so you have to code physics, pathfinding and stuff like that yourself for the server and match it with whatever you are doing in Unity. So it is not for beginners or for hobby projects, but a great solution for "professional" projects.
     
  10. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    Alternatively, one could use uLink which already does integrate physics, pathfinding, etc. and comes with a neat lobby and matchmaking system (or just use Unity Networking; or even the upcoming UNET). The load balancing is a lot easier to program than every piece of game logic for your server.
     
  11. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    Photon is using a dedicated server which only runs on Windows. The servers usually do matchmaking and in-game communication. There is more than just plain forwarding of messages: late-joining players get network-instantiates and other buffered messages that were sent before the join and there are properties for players and the room which are useful to store and manage some state.
    The default logic is called "LoadBalancing" and you can extend and change it for your own servers. However, "as is", LoadBalancing powers quite a lot of games without special server-side game logic. All can be very client driven.
    The Photon Cloud is an optional service you can subscribe to, if you like the basic logic and if your game works with it. Then we run the actual machines to connect your players.
    While Photon Cloud doesn't allow you to run your own logic on the server side, it's simply not needed in every case.

    Some of this is matched by other networking solutions, some is not. The API's are different, the requirements are all different and the costs are, too. The bugs are different for each solution.

    Last but not least: Every developer is different and while one sees something as benefit, another will rant about ineffectiveness or problems. Everyone will point you to another solution.

    @vincentellis: Try out as many solutions as you can and wrap your head around network gameplay. All solutions will have lag and dropping players. Encounter the issues, try to solve them and see which solution supports your type of development best.
     
  12. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Hi guys,
    Any thoughts on costs for a turned based game in Unity Networking? Is the cost a reflection of users (players playing) or information passed?

    Again, this is a turned based game that would pass 3 values per turn (int, Vector3, float). It would have 2 players active per match.