Search Unity

Online Multiplayer

Discussion in 'Getting Started' started by Kukoy, Aug 20, 2019.

  1. Kukoy

    Kukoy

    Joined:
    May 1, 2019
    Posts:
    1
    TL;DR: I have a 1v1 style mobile game, how should / can i implement online multiplayer?

    I've been using unity for a couple of months now and am now in the process of making a mobile game. In this game players vs each other in a 1v1 style game. i have already sorted out things such as local (same device) multiplayer and a vs AI mode, but i want to implement online multiplayer. I'm in no position to pay for dedicated servers, however i could host if needs be. Considering the game is very simple and although realtime and reaction focused, i think p2p shouldn't suffer from too much latency (although i might be wrong on this), so i could use that as well. Anyways, where can i get started on implementing online multiplayer, i heard UNET was being deprecated, and the new version of the multiplayer wouldn't be great in terms of p2p, is there some sort of basic tutorial i could follow (because i'm kinda dumb). I really know nothing about multiplayer, networking, hosting or anything like that. where could i get started?
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,193
    The short answer is, you probably shouldn't. Real-time networking is difficult, especially if your game wasn't properly designed for it from the beginning.

    But if you're prepared to pour tons of time and energy into it, Photon is a reasonable way to go for something like this.
     
    Joe-Censored likes this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    6,532
    Expect to put more work into adding the network multiplayer feature than you've already put into the entire project. Because of the way the modern internet is structured, you need to have a server in your network architecture in order to at least facilitate connections between players. That can be a server you build, or something like Photon Cloud which is operated by a third party.

    Tutorials shouldn't be difficult to find, but they will be specific to the network API you choose. Here's some of the options:
    https://forum.unity.com/threads/wha...of-available-network-solutions-assets.609088/
     
    JoeStrout likes this.