Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Lan Multiplayer For Android Games

Discussion in 'Multiplayer' started by InteDrag, Mar 27, 2017.

  1. InteDrag

    InteDrag

    Joined:
    Dec 11, 2016
    Posts:
    6
    I need help as I'm trying to implement LAN MULTIPLAYER in my game

    I have a few questions...
    1) What are the cost for these
    2) Should i use PHOTON Multiplayer

    This is really important as i think most games are successful due to multiplayer , Pls Help
     
  2. JoshGreen

    JoshGreen

    Joined:
    Mar 16, 2017
    Posts:
    28
    Hello there, Unity can do what you want out of the box using its high level API.

    You'll want to learn all about the NetworkManager component (for hosting / joining games).
    https://docs.unity3d.com/Manual/UNetOverview.html

    You'll also want to learn all about the NetworkDiscovery component if you want devices over a LAN network to find each other easily.
    https://docs.unity3d.com/Manual/UNetDiscovery.html

    None of this will be at any additional cost. Servers are usually hosted in this situation in a Unity instance on a playing machine, so no additional cost there.

    Hope this has pointed you in the right direction!
     
  3. InteDrag

    InteDrag

    Joined:
    Dec 11, 2016
    Posts:
    6
    Hey, thanks for the info
    Will definitely LOOK inside
     
  4. JoshGreen

    JoshGreen

    Joined:
    Mar 16, 2017
    Posts:
    28
    No problem, InteDrag
     
  5. BNJMO

    BNJMO

    Joined:
    Dec 6, 2015
    Posts:
    11
    The solution you provided works fine for PCs. However, for android systems it's a bit tricky as several manufacturers won't grand your phone the permission to listen to broadcast.
    And for some reason, even entering myself the ip address I want to connect to won't work for my phone in both directions.
    What about the other solutions you mentioned InteDrag ? Did they work?