Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Poll Master Server from outside Unity

Discussion in 'Multiplayer' started by Aubrey-Falconer, Aug 25, 2008.

  1. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    I couldn't find any documentation anywhere about how to query / poll the master server from outside of a Unity application.

    Is it possible to use HTTP to request a list of all the registered servers playing your game in JSON, CSV, or a similar format?

    I can think of quite a few applications where this would be fun!
     
  2. shaun

    shaun

    Joined:
    Mar 23, 2007
    Posts:
    728
  3. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    Great idea, but it seems a bit involved :)
    There is no way anyone knows of to query the Unity run list server from outside Unity?

    Unless communications to the list server are encrypted, it seems like you could at least reverse engineer it's query protocol with a packet sniffer.

    All I want to do initially is just add a JS powered badge to my site showing how many people are playing.
     
  4. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    Does it need to be JS powered?

    What about a small unity webplyer?

    If all you are doing is querying the masterserver and displaying the info, the player should be pretty light-weight.

    It seems kind of like driving a Ferrari in a school zone, but people do it with flash, why not Unity?
     
  5. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    Brilliant point!

    For some reason I have never thought of using Unity like that before, but yeah - just embed the Ferrari - particle effects, 3D text, dynamic lighting, and all! 8)

    I had a couple other data sources I wanted to include in my badge, but now that I actually think of it, a totally simple regex based JSON parser inside Unity should do the trick.

    Thanks for helping shove my head through the side of the proverbial box... It's a big world out here!