Search Unity

Simple Number multiplayer game

Discussion in 'Multiplayer' started by CBRNEU, Jul 2, 2019.

  1. CBRNEU

    CBRNEU

    Joined:
    Jun 13, 2019
    Posts:
    4
    Hi Guys, new to the forum.

    Looking to create a simple (I think) multiplayer game for android / iOS.

    I am hoping to integrate the unity network lobby and utilize it to set up a local host.

    The issue I am having is creating the appropriate scripts to accomplish a simple task:

    Device 1: Host device. Have the capability of changing numbers on 1 or more connected devices.

    Any number of other devices to be able to join, assigned a name (user generated) and the host be able to manipulate numbers on any / all of the devices which joined.

    If there is a prefab for this or if anyone would be so kind to assist I would appreciate it. I have a simple GUI and the network lobby prefab... just having trouble with the afformentioned control.
     
  2. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    Simple and multiplayer are oxymorons.

    The tasks you are trying to achieve are basic networking concepts which will be covered one way or another in pretty much any networking tutorial aimed at beginners.

    I'd suggest you google a few such tutorials, work through them and then, once you understand the basic concepts, apply that knowledge to your particular goals.

    It also sounds like you are using UNET, which isn't a good idea as it's buggy and deprecated. You might be better off looking at a different, more stable and better supported networking solution such as Photon PUN for example (there are others).
     
    Joe-Censored likes this.
  3. CBRNEU

    CBRNEU

    Joined:
    Jun 13, 2019
    Posts:
    4

    Thank you, that is exactly my plan, however have had a hard time finding such tutorials. I will try to find Photon PUN. Much appreciated.

    I have found some multiplayer game tutorials and examples, however they all involve 2 active players (i.e race cars) instead of one control device for multiple (Slave devices)
     
  4. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    I haven't had time to check it out, but this tutorial sounds like it might be closer to what you're looking for.

     
  5. CBRNEU

    CBRNEU

    Joined:
    Jun 13, 2019
    Posts:
    4
    Again, that seems player vs player (or CPU), instead of player controlling players.
     
  6. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735
    Okay, I misunderstood what you were aiming for with your game.

    I still don't understand entirely what you're game design is, but with PUN, one client is the MasterClient and can control all networked objects in the other clients, so that may be of some help.

    I doubt there will be a tutorial specific to your requirements, so I think you'll probably just need to get your head around all the concepts and then work it out yourself as I mentioned earlier.
     
  7. CBRNEU

    CBRNEU

    Joined:
    Jun 13, 2019
    Posts:
    4
    Also PUN will not work for me, as I am looking for LAN hosting only and PUN is cloud based. Any recommendations are appreciated.
     
  8. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Other options in the below thread.

    https://forum.unity.com/threads/wha...of-available-network-solutions-assets.609088/

    Note that some Android devices don't work with how automatic network discovery features are typically implemented. So you'll probably want to implement an IP address direct connect option for those users.