Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Running a Unity game on Google compute engine.

Discussion in 'Multiplayer' started by yoonitee, Jul 2, 2014.

  1. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,364
    Hello, has anyone done this or made any tutorials on this?

    Presumably it would go something like this:

    Unity on mobile device calls URL (with parameters giving IP address of user) on Google app engine site.
    Google app engine executes script.
    Script starts up Unity game in server mode on a virtual server.
    Unity on server connects peer-to-peer with unity on mobile device.

    All this server side stuff is pretty black-box stuff to me. Also I presume you would have to compile the Unity game for Linux if you didn't want to pay for a Windows server license.

    This server side stuff is very difficult because you can't see what's going on! It's like being blindfolded. Or have I got that wrong? Like if I run Unity on my own computer I can see it running on the screen. How do you do the same on a virtual server?
     
  2. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    Hmmmm, compute engine is just a fancy word for a VPS I presume.
    If that's the case then it's just a matter of running an instance of a Unity Server and having the clients connect to it.
    Not the server connecting to the clients.
    Or host the master server on the VPS and have your servers hosted by users register with the MS.
     
  3. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,364
    Yes, its like a VPS but it's also automatically expands to your needs. So if loads of people want to play your game at the same time it can spin up new VPS's and new Unity instances.
     
  4. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    Yes, but you still need a way for the clients to find those instances.
    So you will need a MS to advertise them.
     
  5. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,364
    Yep you could Unity's code or make one in PHP, Python or Java for the App Engine.

    Anyway, just wondered if anyone had any experience doing this? It seems like a good platform to use.