Results 1 to 10 of 10

Thread: Bitmap searching functions too slow... Looking to improve them...

  1. #1
    Join Date
    Oct 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Bitmap searching functions too slow... Looking to improve them...

    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?

  2. #2
    Join Date
    Feb 2006
    Posts
    406
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    how big are your bitmaps?
    are you using deformed bitmaps?

  3. #3
    Join Date
    Oct 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Bitmaps are like.... 20x20.

    What are deformed bitmaps?

  4. #4
    Join Date
    Sep 2006
    Location
    Scripter's Heaven
    Posts
    455
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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.

    And check out my pascal interpreter!
    <R0b0t1> No, really, I went to a bar and picked up a transvestite.

  5. #5
    Join Date
    Oct 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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?

  6. #6
    Join Date
    Sep 2006
    Location
    Scripter's Heaven
    Posts
    455
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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!

    And check out my pascal interpreter!
    <R0b0t1> No, really, I went to a bar and picked up a transvestite.

  7. #7
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    20x20 bitmaps should take less than a second to find. Unless your computer is crap.

  8. #8
    Join Date
    Oct 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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.

  9. #9
    Join Date
    Oct 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by XxKanexX View Post
    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...)

  10. #10
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How can i improve this
    By Mark in forum OSR Help
    Replies: 10
    Last Post: 05-25-2008, 07:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •