Search Unity

Player data through Masterserver?

Discussion in 'Multiplayer' started by Metron, Jun 27, 2010.

  1. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    Hello everyone,

    I'm currently planning a multi player game. The game itself will feature dedicated servers which will (by now) only run on my servers.

    The dedicated servers register at a master server who keeps a list of all servers and their games.

    I only want registered players to be able to connect to the dedicated servers.

    What would be the best structure to ensure this?

    My current idea is to "force" the player to log onto the master server. Player credentials are checked through username and password. The player gets a list of games/servers to which he can connect.

    Once he selects a game/server, the client will try to log onto the game/server. That game/server has to counter check if the client who wants to connect may do so.

    I have 2 choices:

    a) since all the dedicated servers will run on my hardware farm, I grant direct DB connection to the dedicated servers.

    b) I pass all critical messages (such as XP points gained or unlocked weapons) through the master server who then handles the appropriate DB commands.

    What's your opinion on this? I see several pros/cons for both. But then, perhaps someone who has already done some dedicated server <-> DB server code, could give his insights into this.

    Have fun and thanks for your help :)
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    neither a nor b will happen.

    the Unity masterserver does not allow you to transfer any data.
    it does match listing, thats it. The facilitator handles nat punchthrough and the whole thing is backed up by the connection tester.


    if you want to pass data you must implement an own master server and use Sockets or you can use webservices what most would recommend anyway
     
  3. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    Thanks, but I already knew that the Unity master server does not handle any DB connections.

    I tend to writing my own master server (mainly to support lobby chat). I already have a rough server framework...

    I was just wondering how to handle player actions that have to be "mirrored" in some way in a DB. While web services might do the job, I'm not sure if this is OK for real time DB interactions...