[REL] Slowbars [54357]

Discussion in 'Mod Discussions' started by cola_colin, August 6, 2013.

  1. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    This mod is no longer supported and thus no longer available.
    I might offer a new fixed version soon.


    So after I read a bit about the fps drops caused by the updates to the resource bars I tested them on my system and they indeed reduce fps fps from 50 to 20 at the beginning of the game. I am not entirely sure of how big their parts in the laggy experience is (probably it's by far not the only problem), but this is a problem that we can "fix" from our side. Somebody else already posted an idea to fix this here, but the code was old and not very user friendly.

    So I build a small UI mod that makes the steps configurable by which the bars and the "current" resource values update. Default is 10% of the max value.
    You can play with the value by changing the stepSize variable if you want.

    http://www.nanodesu.info/stuff/pa/mods/slowbars.zip

    To install unpack in your PA/media/ui/mods/ directory and edit your ui_mod_list with this addition for 'live_game':

    '../../mods/slowbars/live_game/slowbars.js'

    So I.e. my list now looks like this:

    Code:
    /* start ui_mod_list */
    var global_mod_list = [
    
    ];
    
    var scene_mod_list = {
        'connect_to_game': [
    
        ],
        'game_over': [
    
        ],
        'icon_atlas': [
    
        ],
        'live_game': [
    '../../mods/keymapper/live_game/map.js',
    '../../mods/keymapper/live_game/keymapper.js',
    '../../mods/mouseswitch/live_game/mouseswitch.js',
    '../../mods/stats/stats.js',
    '../../mods/slowbars/live_game/slowbars.js'
        ],
        'load_planet': [
    
        ],
        'lobby': [
    
        ],
        'matchmaking': [
    
        ],
        'new_game': [
    
        ],
        'server_browser': [
    
        ],
        'settings': [
    
        ],
        'special_icon_atlas': [
    
        ],
        'start': [
    
        ],
        'system_editor': [
    
        ],
        'transit': [
    
        ]
    }
    /* end ui_mod_list */
    I have taken utmost care to make this mod sustainable through future updates, so it should keep working, but of course it can still be broken by patches.
    Last edited: November 27, 2013
  2. Clopse

    Clopse Post Master General

    Messages:
    2,535
    Likes Received:
    2,865
    Re: [REL] Slowbars [51531]

    stats eh? guess you updated an old mod but can't / dont want to take the credit. Smart fooker :D

    Thanks for the others btw :D
  3. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Re: [REL] Slowbars [51531]

    It's an updated version of sneakyness unit counter. So small and meaningless I didnt care to share it.
  4. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    Re: [REL] Slowbars [51531]

    good work! can't wait to try this out!
  5. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    keeps working in 51853
  6. Corang

    Corang Well-Known Member

    Messages:
    772
    Likes Received:
    313
    Is there something i am missing because when i updated i no longer have any resource bars.

    EDIT: After reinstalling the mod and restarting the game i have the bars again.
  7. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    keeps working in 52512
    cptconundrum and reptarking like this.
  8. masterdigital

    masterdigital Uber Alumni

    Messages:
    438
    Likes Received:
    833
    So UI updates reduce the FPS because they trigger a memory copy of the whole screen. Since the memory copy is performed by the CPU and is more expensive the larger your screen, it can be significant on on slower CPUs with fast graphics cards and high res displays (more pixels to copy).

    However, I have been working on a fix for it... but it isn't quite ready. However, it works perfectly most of the time and if you want to mess around with it you can modify live_game.js to enable the fix. Just uncomment out the line:
    //engine.call('set_active_regions', regions_string); // disabled because its buggy.

    in the function self.updateActiveRegions (it is line 235 for me but my file may not match yours).

    What this does is restrict the memory copy to only include the 'active' regions of the ui.
  9. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Yeah I've seen that. What kind of bugs are to expected when having that enabled?
  10. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    i'll try it, report back.
    it is indeed at 235
  11. masterdigital

    masterdigital Uber Alumni

    Messages:
    438
    Likes Received:
    833
    Parts of the UI may appear or disappear. It didn't happen very often. If it does occur f5 (reload) should fix it.
  12. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    it made raevn's unit info mod unclickable.
    also made cola colin's stats mod partly show when not called and not show when called.
    Last edited: September 7, 2013
  13. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    keeps working in 54357
  14. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    the bars update slower in vanilla unmodded PA now too. So there are tradeoffs there.

    Vanilla, they update like half second. Where you see it twitch, but very fast. Not sure how slow yours updates the economy, vanilla is much faster than original TA so if it does it more slowly it could still help.
  15. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    the mod can be configured for any kind of stepsize you want. I don't know if it is still necessary, all I can say is that it still works.
  16. larse

    larse New Member

    Messages:
    10
    Likes Received:
    10
    How to "edit your ui_mod_list"???
  17. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221

Share This Page