Log in

View Full Version : Bitmap searching functions too slow... Looking to improve them...



solarwind
10-24-2006, 08:52 PM
Hm....

I'm trying to improve my [currently not-so-good] gnome agility bot. The thing is, it takes a long time to search for the different obstacles. It eventually finds them, but my computer lags with that script and takes a long time to find the obsacles. Is there a faster/better searching algorithim? Can someone show me a simple script that searches for a bitmap fast? And if it doesn't find the bitmap, it'll search more effeciantly?

masquerader
10-24-2006, 08:57 PM
how big are your bitmaps?
are you using deformed bitmaps?

solarwind
10-24-2006, 09:12 PM
Bitmaps are like.... 20x20.

What are deformed bitmaps?

lardmaster
10-24-2006, 09:34 PM
i would suggest DTMs. serach for a tutorial. i think that startblaster100 has a great one. they are basically linked pixels, so they can be bitmaps with holes in them. they are quicker to find because you only need to find a few critical points to know what an object is.

solarwind
10-24-2006, 10:37 PM
OMG!!! Now I finally know what DTMs are!!! (I haven't been using scar for about a year. I'm not a noob to scar)

One more question... Are DTMs faster than bitmap searching?

What are the advantages/disadvantages of DTMs compared to bitmaps?

lardmaster
10-25-2006, 12:53 AM
ADVANTAGES:quicker to search for, DTM to string takes up less space, allows more freedom,allows holes in "btimaps", allows different tolerances throughout the different "bits",can specify the point on the bitmap that it will be "found" at, can be rotated eaisily

DISADVANTAGES:noobs dont understand them, take longer to make, can be tricky to click on intdividual pixels when making them.

that pretty much sums it up!

XxKanexX
10-25-2006, 08:42 AM
20x20 bitmaps should take less than a second to find. Unless your computer is crap.

solarwind
10-25-2006, 08:07 PM
I have an intel centrio 1.86 with 1 GB of duel channel ddr2 ram and an ati 300 mobile card with 128 MB hyper memory. I don't think that's too bad for a laptop.

solarwind
10-25-2006, 08:08 PM
20x20 bitmaps should take less than a second to find. Unless your computer is crap.

Oh, and when it takes "less than a second to find", those seconds really add up when you're searching over and over again to make failsafe procedures. (I need to run failsafe procedures to prevent my script from failing due to lag or other things...)

Boreas
10-25-2006, 08:16 PM
It's been a while since I did agility laps*, are the obstacles on the minimap? I ask because moving to them would mean smaller area to look in.


*When I did, I used a script that I think found colors, it worked but wasn't great. Not sure cuz I was at the hello world sorta stage.