Jump to content

Writing a script to play Kirby's Avalanche


Recommended Posts

[Edits below. If you don't want to read details, just read what's in bold below for my current problem.]

I was wondering if anyone has had experience working with ZSNES. When I am using the cursor inside the window, AU3Info does not seem to give me the correct coordinates. However, it does seem to read the colors when a game is running, but I just don't know the location of the point being read. My first challenge is to find a way to identify important coordinates to read colors. I am considering making a background .bmp with lines every 10 pixels as a last resort. Any suggestions?

For the people who are familiar with the game, I also am trying to figure out a good way to plot out the playing field. I am considering using a 6x14 matrix. There is no problem normally, as I can keep track of where my pieces are going, but when clear blobs come in, I will have problems. Is there a fast way to scan the playing field when this happens, or should I pinpoint a particular spot (or at least small square) that will allow me to identify what kind of block occupies that space? I may be able to find a spot that is unique to each blob.

I am anxious to start trying to tackle the logistics of my strategy, but I find myself stuck trying to gather all the information I need. Please chime in if you are interested or if you would like to get some Netplay action.

[Edit 1]

I have attached a .bmp of the grid I am using just in case anyone can find a use for it. Just set as background and tile it. (I went through making a 1600x1200 grid before realizing the tile trick :() The blue lines are every 10 pixels and the red lines are every 100. I will try to go about getting coordinates using this method. Any more sophisticated methods are very welcome ! :(

[Edit 2]

No more problems detecting pixels from ZSNES. It got along fine with AU3Info as long as it was not the active program, so I just ran notepad on top and moved it away so that I could still see the game. I now have all coordinates and bitmaps of all possible pictures in each square in the playing field using a Screen Capture DLL I found in this forum here. What I need to know now is how I can find a coordinate that is the same color in 11 similar bitmaps. All 11 should be associated as the same thing. See the bitmaps in the attached blobs.zip to get an idea of what I'm talking about; every bmp in each folder should be grouped as that color. Also, can I make a pixel checksum from a bitmap? Speed is not an issue, as I only need to do this once and store the number (or is this not how it works?).

Edited by HyperChao
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...