Android SOCKET.IO FOR ANDROID AND IOS

Discussion in 'Programming' started by Roger Canchanya Garcia, Mar 15, 2019.

  1. Roger Canchanya Garcia

    Roger Canchanya Garcia Member

    Joined:
    Feb 17, 2019
    Posts:
    2
    Hi, colleagues again. I need my mobile games (ios / android) to communicate in real time with my server in NODEJS. I plan to use SOCKET.IO but I can not find information about it. Do you know something about the subject? Thanks for everything
     
  2. Pfap

    Pfap Member

    Joined:
    Apr 30, 2017
    Posts:
    440
    I think socket io is more for web based games and development. I don't have a ton of experience with web development or servers, but regular sockets are probably what you would want to look into for connecting to node js for a mobile app. Depending on what type of game you are making and what amount of lag you can tolerate you could checkout patchwire.

    https://github.com/twisterghost/patchwire
     
  3. Roger Canchanya Garcia

    Roger Canchanya Garcia Member

    Joined:
    Feb 17, 2019
    Posts:
    2
    Thanks friend. I had a lot of hope for GMS, but I'm very much encouraged to migrate Unity. I'll review the library you mention. Thank you
     
  4. YellowAfterlife

    YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    2,159
    If your server is in node.js, you can use regular TCP/UDP sockets (which node.js offers) and connect to it via network_connect_raw from GML side - there's little reason to add extra wrapping and encoding that websockets use if you are not connecting from a web browser (but even then, you can have a separate port for the native version)
     
  5. The-any-Key

    The-any-Key Member

    Joined:
    Feb 2, 2017
    Posts:
    1,474
    As long GMS2 dont support IPv6 you need some kind of extension if you plan to put the game on ios app store (apple demand IPv6).
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice