Search Unity

Mobile to PC help!

Discussion in 'Multiplayer' started by HK_PHANTOM, Jul 16, 2018.

  1. HK_PHANTOM

    HK_PHANTOM

    Joined:
    Jul 12, 2018
    Posts:
    11
    Hi all, this is my first post here so sorry if I get anything wrong!

    I've got a simple cube that moves forwards, backwards, left and right and can shoot mini cubes. I can play it two player on a keyboard, but I'd really like to export the controls to Android/IOS smart phones so I can have multiple people play at once without having to crowd around a keyboard.

    Could anyone point me in the right direction? Thanks!
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    1) Choose an appropriate networking API
    2) Follow tutorials for said networking API

    Sorry, I'd like to give a more specific answer but your question is a bit too general.
     
  3. HK_PHANTOM

    HK_PHANTOM

    Joined:
    Jul 12, 2018
    Posts:
    11
    No problem, any finger in the right direction is much appreciated, thanks!
     
  4. HK_PHANTOM

    HK_PHANTOM

    Joined:
    Jul 12, 2018
    Posts:
    11
    For a more exact question, I'm trying to make a simple game pad for Android with a rotation stick for moving up, down, left and right, a bit red shoot button and a small blue pause button. Then I want to connect that Android controller application to a PC to control my cube while the game application is running.

    So more or less I need some help with where to look/go to learn how to do the network coding.
     
  5. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    What I meant with my previous comment was you can do that with almost any available networking API. How you'd actually write the code for it would depend on the chosen networking API and how you want to arrange your networking architecture. For example, you'd have a significantly different networking design if you wanted both the PC and Android device to connect to a centralized dedicated server (which could be handy to allow users to connect via their mobile plan and still control the PC - From your comment I have no idea what you really had in mind), than if you only wanted to support direct connections from the Android device to the PC over local wifi.

    So I'd suggest as a first step reading up on the available networking API options, think about how you actually want your devices to connect together as I mentioned just a couple options above, and eventually choose a networking API you're going to use. At that point then try experimenting with the networking API and start planning out your actual implementation. When you run into issues you can then come back with specific implementation questions for that networking API that anyone with experience with it will likely be able to help with.
     
    Last edited: Jul 18, 2018