Search Unity

Network overview please?

Discussion in 'Multiplayer' started by reset, May 26, 2009.

  1. reset

    reset

    Joined:
    May 22, 2009
    Posts:
    393
    I just need some help in understanding Unity's networking options.

    Options are:

    1. a person at home can play a game with friends by becoming a server/player? In this case they would need to drop their firewall and configure their modem to allow the Unity port (port forwarding)? The friends would need to drop their firewalls and configure their modem ports too?

    or ...

    2. a server sits on a computer (firewall and ports config'd) and orchestrates the game for all players logging in? Players/clients would need to config port and firewall too?

    or ...

    3. Master Server orchestrates multiple servers and can use NAT "punchthrough" to making port forwarding possibly automated? These servers can exist on the same computer as MS - centralized - or it be a server that a player has started ie option 1?

    Is this right?

    Are there any tutorials that look at peer-to-peer connections - ie option 1?

    If the game is complicated - lots of players - MMORPG maybe - physics-heavy - then options 2 and 3 are preferable? For option 1 the player/server would need to be a fast computer with a fast internet connection?

    If you are creating a multiplayer game with physics - an authoriative networking is best - so everyone is experiencing the same physically environment in game play?

    Sorry - that was about a million questions in one

    thanks :D
     
  2. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Actually, for convenience, you'd always use the MasterServer - including for your scenario 1. I think in most cases, firewall configuration shouldn't be necessary for that.

    Using the MasterServer, your game can easily look up the IP/port of the server once it's registered, so in most cases, no manual configuration should be necessary.

    I think it has some advantages to host the MasterServer on a separate machine from the game server. In most cases, you can probably use the MasterServer that UT hosts ... and may consider hosting your own MasterServer later in the process (it's really just a small configuration change going from one MasterServer to another, so I wouldn't worry too much about that).

    I think there's networking demo projects, and in general I think the documentation that comes with Unity is quite sufficient. However, I'd recommend reading up on game networking and distributed environments in general. Multiplayer (especially large-scale multiplayer) is really not a trivial thing to deal with and even with a theoretical background understanding, putting the principles into practice can give you a hard time now and then - without the proper background understanding, it'll very likely just be frustrating to the point of giving up.