Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Online Multiplayer

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

  1. Kukoy


    May 1, 2019
    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


    Jan 14, 2011
    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


    Mar 26, 2013
    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:
    JoeStrout likes this.