[REL] [CLIENT] [LOBBY] [LIVE GAME] Faster Server Browser for Titans & Classic

Discussion in 'Released Mods' started by mikeyh, September 9, 2014.

  1. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    PA#4079
    Fr33Lancer likes this.
  2. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
  3. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    There's probably a lot of people experiencing this with old games from 72996.

    Current feed shows 72 games from 72996.

    It would really help if getGameWithPlayer returned more info like the build number and run time (for multiple games) then we could easily block old builds and games in the mod.

    And if removePlayerFromGame worked...
  4. Alpha2546

    Alpha2546 Post Master General

    Messages:
    977
    Likes Received:
    1,561
    I just tried this mod and it didn't worked for me. While the lobby was loading actually way way faster than normal i couldn' t join a game. The button for join game just didn' t responded. Any ideas?
  5. knub23

    knub23 Active Member

    Messages:
    181
    Likes Received:
    152
    Bug: In the new build you can't see games in the lobby when using this mod.
  6. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    Confirmed.
    upload_2014-10-10_0-37-10.png
    Code:
    function gPatchServerBrowser()
    {  
    
        var buildVersion = model.buildVersion();
    
        if ( ! ( buildVersion == 73441 || buildVersion == 72996 ) )
        {
            console.log( 'gPatchServerBrowser not patching newer build ' + buildVersion );
            return;
        }
      
        console.log( 'gPatchServerBrowser on ' + buildVersion );
  7. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    It's not a bug, it's a feature. Not sure I understand this feature though.
  8. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    This conflicts with the way PA Stats adds custom servers to the list and I don't understand why. My games don't show up when faster server browser is enabled.

    [here was text that did no matter for the issue as I can see now]

    model.lanGameList(); should have the custom games.
    However it stays empty with faster server browser enabled.

    Additionally:
    Looking at faster server browser one issue probably is that it has a priority of 100. It should have like 5, so it loads before any other mod loads, so other mods can do what i.e. I am doing to allow people to join the custom games:
    Code:
        var oldTryEnter = model.tryToEnterGame;
        model.tryToEnterGame = function() {
            if (model.currentSelectedGame().region.startsWith("custom: ")) {
                // If we're looking at a locked game, we need to make sure we presented the password modal
                if (model.currentSelectedGame().locked && !model.hasEnteredPassword()) {
                    model.privateGamePassword();
                    $('#getPassword').modal('show');
                    return;
                }
                model.hasEnteredPassword(false);
        
                sessionStorage['gameHostname'] = encode(model.currentSelectedGame().host);
                sessionStorage['gamePort'] = encode(model.currentSelectedGame().port);
                localStorage[paStatsGlobal.isLocalGame] = encode(false);
                window.location.href = 'coui://ui/main/game/connect_to_game/connect_to_game.html';
            } else {
                oldTryEnter();
                localStorage[paStatsGlobal.isLocalGame] = encode(model.currentSelectedGame().region === 'Local');
            }
        };
    
    faster server browser currently risks just overwriting what I do.

    EDIT:
    Even on the new PTE where faster server broowser disables itself and is not supposed to do anything at all it prevents my server listings from working.
    wtfbbq

    EDIT 2:
    I have found the issue:
    sessionStorage[ 'build_version' ] = buildVersion;
    in start.js
    has to be
    sessionStorage[ 'build_version' ] = encode(buildVersion);

    without faster server browser it has "version" in the session storage
    with faster server browser it turns to version without "".
    That makes it refuse my games as "wrong version" due to missing quote. I don''t know what the purpose of that line in faster server browser is though.

    EDIT 3:
    This in my start.js fixes the issue:

    Code:
    
        if (typeof gFasterServerBrowser_gPatchStart !== "undefined") {
            var oldPatch = gFasterServerBrowser_gPatchStart;
            gFasterServerBrowser_gPatchStart = function() {
                oldPatch();
                var before = sessionStorage['build_version'];
                if (!before.startsWith('"')) {
                    sessionStorage['build_version'] = '"'+before+'"';
                }
            };
        }
    
    I don't know why faster server browser modifies the version in the first place. Will wait at least until tomorrow maybe @mikeyh can say something about this before I potentially break something.

    or maybe I will my mod add at each game twice: one with version and one with "version". The filter will never show more than one of those xD
    Last edited: October 11, 2014
  9. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    The Faster Server Browser mod has been euthanised and is no longer available.
  10. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
  11. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    The current gold rush to enable custom offline and dedicated servers before Uber has the plumbing ready means that various mods are trying to patch the same code creating conflicts.

    I've also got another project rolling out and I keep missing the PTE to stable release windows (often while catching up on sleep).

    The following can be fixed easily by Uber if they allocate a small amount of dev time: (hours not days)
    • enable gzip on the current games feed request
    • failed to join should return to game browser
    • leaving a game should return to game browser
    • kicked from a game should return to game browser
    • show starting planet icons in currently selected game details
    • automatically update currently selected game details
    The following might also require PlayFab changes:
    • filter the current games feed for broken games, old builds, etc
    • add 1 second expiry to the current games feed
    • enable 304 not modified on the current games feed
    Reconnect requires a better solution:
    • getGameWithPlayer needs to return the most recent game with more info (or multiple games for evaluation and display on client)
    • reconnect should be an option on the main menu and not just a startup prompt
    • reconnect dialog should display game information so players know what they are abandoning or reconnecting
    • reconnect dialog needs a cancel button
    • abandon needs to actually work (once game information is displayed and a cancel option are available)
    • reconnect needs to support Uber servers via lobbyId and local / dedicated servers via host : port
  12. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    Is there a way to distinguish AI Skirmish Game Lobby from Multiplayer Game Lobby ?
    There's nothing more annoying to click back in an AI Skirmish lobby to go back to Main Menu, than being redirected to the Server Lobby :confused:
  13. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Yep by setting and using connectFailDestination.
    Fr33Lancer likes this.
  14. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Specifically you would have to:
    • patch model.navToAISkirmish in start.js to set a destination
    • mod server_browser.js to set a destination (as Faster Server Browser did)
    • patch model.fail in connect_to_game.js to use the destination (as Faster Server Browser did)
    • patch both model.leave and handlers.connection_disconnected in new_game.js to use that destination
      (Faster Server Browser just set the destination to the server browser and the last available update did not correctly set model.userTriggeredDisconnect(true) which made leave show as connection to server lost)
    Just tested those changes in my local copy of Faster Server Browser using the existing connectFailDestination.
    Fr33Lancer likes this.
  15. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    This would be a perfect fit for @pownie 's mod, but I fear it's not maintained
  16. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    His mod broke some stuff which is why I added to Faster Server Browser... in those links you'll see a couple of comments:
    • connect_to_game.js: // we set connectFailDestination in the server browser to avoid any conflict with gw
    • server_browser.js: // patch failed to join game so that it returns to server browser (return to server browser mod by pownie doesn't cover this and also breaks gw)
    All of these code patches can easily break Uber releases so it would be much better if Uber just allocated a couple of hours of dev time to fix.
    Bsport and Fr33Lancer like this.
  17. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Is this available on github or somewhere else? I'd like to implement connect-to-last for Connect Buttons and it doesn't hurt to reference previous work.
  18. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Check the links in my previous replies... reconnect needs a much better solution.

  19. Jackbandanna

    Jackbandanna Active Member

    Messages:
    104
    Likes Received:
    87
    Never understood why this great mod was killed. Need it more than ever, now that steam sales are causing even more games to be listed. Making joining a game, for us on slow dsl, difficult.
    Bsport likes this.
  20. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    Well now that offline servers are released it should be less of a pain to update and fix the mod, but the points he mentioned about gzip compression make it annoying to mess with still.

    It could be revived by someone with some far better programming skills than I.
    Jackbandanna likes this.

Share This Page