Search Unity

Android Wifi multiplayer , i got tired from searching ?

Discussion in 'Connected Games' started by m-y, Jan 22, 2018.

  1. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    432
    Hello everyone
    what i want to do is simple ?
    - i want 2 android devices to join same room using wifi multiplayer offline

    what i did ?
    - i found simple video on Youtube just only drag- drop network manager script and network (HUD ) into game empty
    - then it is working in two pc's
    - when i try the same on Android Devices it doesn't work at all nothing appear to happen

    what can i do ?

    - i search a lot i didn't find any article or tutorial about this topic all talking about pc
    but Android there is nothing
    - so what is the solution now ?
    any steps i can follow to do only this simple thing ?

    Help Please .
    thanks in Advance .
     
  2. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    432
    ???????????
     
  3. morris-

    morris-

    Joined:
    Jan 21, 2018
    Posts:
    12
    wifi offline? :D
    if you have time and want your multiplayer to be great, i recommend this guy:

    What you are using is the High Level API (HLAPI) and the video is about the LLAPI. It worked for me on Android using a WEBGL Built and running it on Android in a browser (chrome).
     
  4. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    432
    no i want Normal Application on Android Device
     
  5. morris-

    morris-

    Joined:
    Jan 21, 2018
    Posts:
    12
    the given tutorial works for you
     
  6. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    432
    I DID ITTTTTTTTTTTTTTTTTTTTTTTTTTTtt :D
     
  7. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    432
    i did it without using this Video :D it is my own way :D
     
  8. myloran

    myloran

    Joined:
    Feb 16, 2013
    Posts:
    6
    Can you share how you did it?
     
  9. GoDJaMMing

    GoDJaMMing

    Joined:
    Feb 4, 2014
    Posts:
    7
    He should have probably used one device as Hotspot and the other to connect to its network, thus making a local net.
     
  10. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    432
    After 5 months , that is what i did guys :)
    i worked on my own way
    this
    Game using UNET (Home Router as a point of connection ) Router doesn't need to be connected to internet
     
  11. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    432
    it supports Pc - Android - IOS
     
  12. sandeepchahal573

    sandeepchahal573

    Joined:
    Nov 14, 2017
    Posts:
    2
    @m-y am trying to achieve same as you wanted. could you please share how you did it.
     
  13. Foestar

    Foestar

    Joined:
    Aug 12, 2013
    Posts:
    292
    It looks like all he did was do a basic UNet connection to his router. Typical routers start with a 192.168 address. Easy peasy way to find it is open your command prompt in windows, just search it under your start menu, then type "ipconfig"
     
  14. hmahdavi921

    hmahdavi921

    Joined:
    Dec 28, 2014
    Posts:
    6
    Can UNET work with wifi in mobile devices with out internet?
     
  15. aabramychev_

    aabramychev_

    Joined:
    May 10, 2019
    Posts:
    6
    yes and no, yes as you can use wifidirect on android, no as it will be a little bit tricky to implement as wifi direct support multicast only.
    Steps:
    1. turn on Wifi direct on devices
    2. connect one android to other using wifi direct
    3. on client device get ip of the group owner:
    info.groupOwnerAddress.getHostAddress(); //see WifiP2pInfo instance.
    4a. Use group owner as the serve so, other devices will connect to them or
    4b. Use group owner as rebroadcaster, when it will report ip addresses of each member of the group to other.

    PS. AFAIK this will work only for android and win/linux machines, with Mac and iOs the story is separate...
     
  16. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    432
    Yes you , that is why it is called local multiplayer , it just depend on the wireless of your router , if you have no access on internet it will not affect on it at all

    btw i advice you to not learn UNET now cause it will be out of service after 2 years i think ,, and unity will provide better solution soon
     
  17. parthasarker3

    parthasarker3

    Joined:
    Nov 7, 2018
    Posts:
    2
    Can you tell me how you did it? I want to make a multiplayer fighting game that can be played via hotspot between two android devices. But can't find any tutorial or reference.