SRL Archive - OSR Help

plugins for simba


Shuttleu

2011-06-08 09:48:24

Hello, i have a problem

i want to search through 64 images 50 times to see if they are on the screen

unfortunately simba isnt fast enough, so i thought i would do it in a plugin, but what sort of functions can i use in the plugin?

can i use FindBitmap?
can i use LoadBitmap?

this will be a private DLL for myself to do something personally

~shut

nielsie95

2011-06-08 10:07:57

The source of those function is available, so you can just include them in your project. I doubt you will gain much speed, though. The slow part is searching, which is already done by Simba. Moving the loop to a plugin probably wont help much.

Dgby714

2011-06-08 10:50:08

From: nielsie95
Moving the loop to a plugin probably wont help much.


Agree, The only speed increase you would see would be from C and that is only ms.

Shuttleu

2011-06-08 11:15:45

ok, if its going to only save a few seconds then would it speed up if i looped

getcolor(points[z].x, points[z].y)=123;

instead of using bitmaps

~shut

nielsie95

2011-06-08 11:28:41

A loop in pascal script doesn't take that long (definitely not in the seconds when you're not talking about millions of iterations); the time it takes to loop 3500 times is negligible if you take into account the time FindBitmap takes. The only way to speed it up is to adjust your algorithm. For example, it would help to decrease the search area or decrease the number of bitmaps (prefiltering?).

Shuttleu

2011-06-08 11:39:28

ok, well io think i have found a way to do it quickly in normal script, it takes about 202ms now, which is quick enough

~shut