Search Unity

Basic understanding problem: masterserver / server / iPhone

Discussion in 'Multiplayer' started by Axel-F, Sep 13, 2010.

  1. Axel-F

    Axel-F

    Joined:
    Mar 20, 2009
    Posts:
    224
    Hi,

    is it correct that I need an online masterserver, no matter what kind of networking I want to achieve? Or more precise: is there a way of doing real LAN networking without the masterserver? E.g. between two iPhone's using wlan? I see the advantages of a running masterserver, but what if someone does not have any access to the internet?
    Mmhh, maybe I'm having a basic understanding problem....

    Thanks!

    Axel
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    For the kind of gaming you do you normally wouldn't use unity networking at all but iOS 3.1+ GameKit WiFi layer cause that allows local wifi multiplayer without the need of an access point.

    If you don't use GameKit then you always must have an access point to even have them communicate.

    if that AP is present, no you don't need a master server. But you need to use subnet detection mechanisms to find the other device(s) and connect to one of them directly that identifies itself as host. Thats a thing that will require iPhone pro cause you will do this through sockets
     
  3. Axel-F

    Axel-F

    Joined:
    Mar 20, 2009
    Posts:
    224
    Oh, thanks for this quick reply. Yes, i'm using iPhone pro. If a "lan only" solution is possible that would be absolutely great. Maybe do you have any advice where to get some tutorial's regarding this? My masterserver solution is working, so I hope I do not have to change that much.
    I guess I have to probe for all IP's in the current subnet and look for an open port used by my game?
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Basically though you won't do it through Unity Networking but UDP broadcasting to find the others on the same accesspoint.

    I'm sure there are dozens of C# tutorials on the matter cause you will be using System.Net for the purpose, a standard .net framework capability :)
     
  5. Axel-F

    Axel-F

    Joined:
    Mar 20, 2009
    Posts:
    224