1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

2.91.0 - High Performance Listeners, Callbacks, and Updater Overhaul

Discussion in 'Announcements' started by Cloud, Nov 15, 2018.

  1. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    Over a week of development went into this update and it's yielded some very nice results.

    I'll start with mentioning the updater. Whenever the game engine updates, we run our updater over the updated game engine and attempt to use pattern recognition to determine how Jagex is storing various pieces of data in the game (we attempt to identify around 500 data structures). Over time these patterns can break as they change around the engine, and as a result over the past few months several important patterns broke. As a temporary measure, I was identifying where Jagex was storing certain pieces of data by hand since I often had work shortly after one of their updates went live. This week, I went ahead and fixed every pattern that had broken and added a couple dozen new patterns for the new callback features which I'll be discussing shortly. As a result of these changes, after this morning's game engine update we had less than 30 seconds of downtime (it took a few seconds to scan the game engine for all the patterns).

    Moving on to the topic of listeners, listeners are a way for bot authors to be notified when a certain type of change occurs (it's dependent on the type of listener they register). Traditionally listeners have been implemented in one of two ways, either via polling the same pieces of data frequently looking for changes to report (slower), or by modifying the games engine to inform the listener directly when an event happens (faster). Most botting clients takes the faster approach of modifying the game engine directly to get event data faster and more efficiently, modifying the engine to varying degrees. However, one common factor of these clients is that they not only modify the contents of the game engine methods, but they add additional, easily detectable fields and methods to the game engine.

    We pride ourselves on making sure that we do everything in the safest way possible, and as a result, we used to take the slower, but safer approach of polling data and looking for changes frequently to notify the listener of. However, we recently began investigating a new hybrid approach that is just as safe as the polling technique we'd been using however it's *significantly* faster and more accurate at identifying when to send events. This new hybrid approach expands upon our unique RMI based cross process data access system to allow us to receive events from the game itself (known as callbacks), similarly to the way many other bots receive events, but without having to inject any additional fields and/or methods into the game itself to achieve this. Due to this new way of receiving callbacks, we're now able to offer much more responsive, more efficient listeners, and even new listeners which we were previously unable to offer.

    The entire infrastructure for setting up these new callbacks that are passed through RMI is complete, and several of our listeners have already been migrated to using the data being provided through the callbacks instead of via polling. It'll still take a few more days to migrate all of the old listeners over to the new system, however the results from the ChatBoxListener show fantastic results already. We've also been able to add a new EngineListener which allows developers to invoke code exactly once per engine cycle, a new MenuInteractionListener which can inform developers exactly what was just clicked on, allowing them to more confidently verify that there wasn't a missclick. These callbacks are currently implemented for OSRS only however all of these callbacks will be being implemented into RS3 in the coming days as well.

    In other news:
    • Updated the bridge to support the callback framework.
    • Added a callback when the region base changes on OSRS, allowing us to cache this value instead of making hundreds of thousands of unnecessary RMI calls throughout the lifetime of a bot.
    • Fixed Bank.isOpen on OSRS when viewing the contents of a specific tab instead of the view all/main tab.
    • Patched the waiting conditions when using the wilderness lodestone (Aidden)
    • Deprecated getTitlePrefix and getTitleSuffix since they changed the way titles work in the game engine and these fields no longer exist from what I can tell.
    • Reduced the odds of getting stuck trying to click an icon that overlays the Minimap on RS3 (Robin)
    • Don't try to open the quest list for quest information if the quest tab isn't available such as on tutorial island (Fonrus)
    • Added ControlPanelTab#isOpenable()
    • Fixed bots not realizing that a varbit event dispatcher is already running when adding both a varbit and varp listener, which was resulting in two varbit events being fired by the dispatcher every time their was a varbit change.
    • Improved the alert messages shown on startup when the user doesn't have the Java RS3 client or OSRS client installed.
    • Improved the efficiency of MakeAllInterface#getSelectedQuantity() (Aidden)
    • Improved the performance of Bank.getBoundsOf(index) on OSRS (Aidden)
    • Changed several labels throughout the primary stage such as "Official Legacy client required" -> "Official Java client required"
    • Further work to support rs3 submenus
     
    #1 Cloud, Nov 15, 2018
    Last edited by a moderator: Nov 16, 2018
    Qosmiof2, Arbiter, Derk and 7 others like this.
  2. Jhinn

    Joined:
    Jun 9, 2015
    Messages:
    3,649
    Likes Received:
    1,337
    This is huge. Fantastic work!
     
  3. proxi

    proxi s̶c̶r̶i̶p̶t̶ bot*

    Joined:
    Aug 23, 2015
    Messages:
    2,223
    Likes Received:
    501
    Cloud... you're sexy.
     
  4. Gengsta

    Gengsta Community Manager

    Joined:
    Apr 7, 2015
    Messages:
    1,392
    Likes Received:
    763
    Ok this is epic
     
  5. Mmaaikel

    Joined:
    Mar 11, 2014
    Messages:
    448
    Likes Received:
    106
    Very nice! Good read
     
  6. Parametric

    Joined:
    Sep 9, 2017
    Messages:
    32
    Likes Received:
    20
    Not even a mention :feelsbadman:
     
    Qosmiof2 likes this.

Share This Page

Loading...