server_browser.js

Discussion in 'Support!' started by maxpowerz, October 2, 2013.

  1. Fishrock123

    Fishrock123 New Member

    Messages:
    4
    Likes Received:
    1
    Ah, good to hear.

    I'm pretty sure a good way to deal with this data is simply to do what I mentioned before. I found this bit of code from underscore.js that allows you to quickly omit values from JS Objects. Omit the time sensitive values, run it through a quick hash, send the hash to the server, and check if the client actually needs to be updated. Should be relatively straightforward.

    github /jashkenas/underscore/blob/master/underscore.js#L845 (I apparently cannot post links.)

    (Also omitting games-in-progress that cannot be joined is probably a good idea.)
    maxpowerz likes this.
  2. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Only updating when needed is one way, but seriously why would the client even need a list of all games running? The filtering for games to join should happen on the ubernet server already. The statistics about games and players can be filled by another call to the ubernet backend that only returns 2 numbers.
  3. maxpowerz

    maxpowerz Post Master General

    Messages:
    2,208
    Likes Received:
    885

Share This Page