Search Unity

Peer to Peer Networking - How?

Discussion in 'Multiplayer' started by elmar1028, Jan 21, 2015.

  1. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    So I was looking for ways to have a peer to peer networking instead of traditional way of handling multiplayer using servers.

    Is there a service, plugin which allows you to have that feature?

    To UT staff, are you planning to implement peer to peer into new networking system any time soon?

    Thanks in advance :)
     
  2. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    You can use the current system for that...
     
  3. Aventoria

    Aventoria

    Joined:
    Jan 21, 2015
    Posts:
    2
    @BFGames is right, you can use the current unity networking API for that but i'd suggest you to learn server to client networking before starting to work with client to client because client to client is kind a harder than server to client(in my opinion).
     
  4. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    I know how to setup a server. I need to know how to make a player host of the game while another person joins. Not really what P2P is about but identical concept.

    @BFGames Are there any tutorials or plugins which allow you to do that?
     
  5. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Think you are misunderstanding the concept. Unity's networking is setup exactly to do P2P. P2P always works with someone "hosting a server on their computer" and then people join his IP address.
     
  6. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    I thought you need a Master Server to use Unity Networking :/
     
  7. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    As such no, but you might run into problem's with peoples firewalls not allowing them to join each others game.
     
  8. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    Windows would allow users to choose whether to grant access or not. I am developing for Android though so I don't know if its firewall would block me or not.
     
  9. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,524
    Oh you. :p
     
  10. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    ??