i really love this script, however I find that imagesearch in general can be unsatisfying slow if you want to track dozens of objects in near realtime (like in a game) even if you use small 10 * 10 snippets. I remember one of my scripts tracking the stack of a cardgame,, i used very small snippets but still it took anywhere between 1-4 seconds for a match, now imagine a fast arcade game or a first person shooter, thats way too much time.
What I wish we had was some kind of semi-parallel distributed computing solution that would broadly look something like this:
* Use VLC (example) as a streaming server, VLC has numerous commandline options that allow it to snoop for instance 20 custom sized/positioned rectangles of say 10*10 from your local screen/window,
* Have vlc combine them into a single rectangle stream of 200 * 100 and have vlc unicast it in realtime over you lan.
* you can have like 5 or more client computers with vlc that all receive the same stream in a client window.
* Have these computers do their findclick stuff on their own part of the matrix , for 20 object spread over 5 computers this works out as 4 objects to process per pc,
one pc will only search the top of the matrix, others the middle and finally one searching the bottom of the matrix,
* have the statistics/ results written in one INI file that is shared over the network and that can be accessed by your main autohotkey script on your local pc.
- an additional advantage of VLC is that you can use different transcoders, so that for instance you can remove shades of colour from your stream, or even transcode to monochrome, so that you can "dumb down" objects that have shade variation and make them process faster.
- at some point you would want to write an automatic load balancer/dispatcher to quickly assign an optimised load for extra computers you might add or remove. - now that you have offloaded the imagesearch from you main pc to other pc's you can also offload some of the objecthandling by have for instance have the dispatch pc pre-proces the statistics in the ini file, like you could have it look for succesfull/failed imagesearches in the matrix to uncover group patterns, like if objectx1y1 and objectx5y6 = 1 AND objectx1y1 = 0 OR etc....
Then the dispatcher would merely set some goto label semaphore flags in the shared INI file so that you local main script just has to read the goto labels and swiftly proceed its programflow without further processing