Repository navigation
Reliable Detection of Animated Buttons #1111
Pixoloo
started this conversation in
General Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
In some games, buttons and other interactive elements are animated. They may shake, rotate, pulse, change size, or otherwise continuously change their appearance.
Detecting these elements reliably using an Image Condition can be quite challenging, as the image may change from one frame to the next. This makes it difficult to find a suitable reference image and configure the condition so that it consistently detects the button.
Proposed Solution
I would like to suggest adding an option to the Image Condition that allows it to continuously search for a matching image until either the image is detected or a specified timeout is reached.
Instead of checking the image only during the regular condition evaluation, the app would repeatedly check for the specified image throughout the configured time window. As soon as a match is found, the condition would be fulfilled and the associated event could proceed as usual. If no match is found before the timeout expires, the condition would remain unfulfilled.
Possible Implementation
Perhaps this could be implemented similarly to the existing Reloading feature ("Ignore this event for a given duration after fulfilled").
While Reloading ignores subsequent detections for a specified duration after an event has been triggered, this new option would do almost the opposite: it would repeatedly attempt to detect the specified image until a match is found or the timeout expires.
For example, if I configure a timeout of 2 seconds, the app would continuously look for the specified image during those 2 seconds. This would significantly increase the chances of detecting an animated button, even if its appearance changes rapidly.
Benefits
More reliable detection of animated buttons and other moving UI elements.
Less trial and error when configuring Image Conditions.
Potentially fewer missed detections in games where timing is important.
A more robust way to handle animations without having to find a single reference image that matches the animation perfectly.
I realize there may be technical considerations regarding performance and how image matching is currently implemented, and I am open to alternative approaches that achieve the same result.
Thank you for your work on this fantastic project!
All reactions