Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

advantages & disadvantages for extra server with photon

Discussion in 'General Discussion' started by NikoBusiness, Nov 29, 2014.

  1. NikoBusiness

    NikoBusiness

    Joined:
    May 6, 2013
    Posts:
    289
    i am using photon PUN for my multiplayer game and i realised that its so easy to implement multiplayer with pun and i dont wanna leave it,my problem is that it doesnt allow more than 500 messages that means it can handle maximum 10 players on a room.so i created a whole new extra server for (login & database requests etc...) is it bad idea?if it is, why?is it good idea? if yes, why?
     
  2. lorenalexm

    lorenalexm

    Joined:
    Dec 14, 2012
    Posts:
    307
    PUN allows 500 messages a second, sadly I feel if you're exceeding this limit you are in dire need of reevaluating your current networking code.
     
  3. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Thats the worst advice you could give.

    For fast paced games sending 20 messages per second can be pretty normal (Valve do it for example).
    Now each message you send shall be multiplied with the amount of players because you need to send one to the Photon Server which will then send it to the other players. So with 5 players, send 1 message = 1 for the server and 4 the other players.

    So 5 players sending 20 per second = 5x100 = 500, and there is your limit already.

    Now look at 10 players with 10 messages each per second, you do the math...
     
  4. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Can you describe the type of game you are creating? Also login and database stuff should never be handled with PUN, it is not created for that.
     
  5. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    best bet is to wait for Unity 5.0 with the new Networking it has, I know I hate waiting too, but I think that's the best option at this point.
     
  6. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,158
    Waiting is never an option. It won't be in 5.0 anyway.
     
    carking1996 likes this.
  7. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    There is a lot of good options. And if people are doing a serious multiplayer game they should be able to afford a license of whatever. If its not that serious they might as well use unity's build in solution. As a hobbyist you can't have it all like with most other things.
     
  8. lorenalexm

    lorenalexm

    Joined:
    Dec 14, 2012
    Posts:
    307
    @BFGames You're absolutely correct and I apologize for the misinformation, I was going off my experiences with my own hobby project which is slower paced than the average FPS. With a personal room limit of 5 players, I am able to hold steady at roughly 160 msg/s. Every project holds different needs, and I should have inquired for more information before stating such a blanket answer.

    @NikoBusiness If you have the resources to spare Photon does offer self-hosted servers which do not place a restriction on messages per second. There are also alternatives such as Bolt (http://www.boltengine.com) and TNet (http://www.tasharen.com/?page_id=4518) which offer solutions that require only a one time license. But one thing to keep in mind here would be the cost of bandwidth for your server, plus the need to scale depending on the success of your project.
     
  9. NikoBusiness

    NikoBusiness

    Joined:
    May 6, 2013
    Posts:
    289
    thats what i told you,i've created a seperate server from pun and im handling databaserequests and login ,i could divide more stuff to keep low messages to the pun server to allow more players in each room
     
  10. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    Unless you're doing a huge number of database requests and login... how will moving them to a different server help? And are you creating a different server, or simply a different room?
     
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,071
    I would expect a different room since the limitation is simply per room.
     
  12. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,353
    Someone make a website isthenewnetworkingout.com
     
  13. NikoBusiness

    NikoBusiness

    Joined:
    May 6, 2013
    Posts:
    289
    no im creating a whole new server with java (netty library) for the database requests and logins,and i may sperate networking messages with players to allow more players in a room,