Jump to content


Photo

Automating a Match-3 Game

Match-3 Match 3 Bejeweled Candy Crush

  • Please log in to reply
4 replies to this topic

#1 Nironior

Nironior

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 12 May 2019 - 04:05 AM

Hey! I've used ACTool for a long time with only a limited amount of commands, so I had to get creative in order for things to work most of the time. I'm trying to get a bit better. I've successfully made a script which recognizes colors of gems in each of their possibly permutations which allow for a match. The thing is: It is still way less efficient than my really simple macro which just blindly matches the whole grid (8x8) in each of it's possibilities regardless of color by starting in the left/top corner and working down to the opposed corner horizontally and then vertically.

 

I feel like my Object based script which takes color into account could be way better though. Have you got any tips for me?

And more specifically: How could I turn this into a script which searches for any matching objects instead of one color at the time? Is that possible?

This is what the game looks like (and below that I'll include my script):

bH5qhhZ.png

 

 

Edit: Sorry, didn't know that Tabs would disappear, will use spaces from now on.

 

Spoiler


#2 Ego

Ego

    Insane Poster

  • Moderators
  • 447 posts
  • LocationAustralia

Posted 12 May 2019 - 05:44 AM

Is there code missing?, seems incomplete

When the code is run all it does is objvar 20

Attached File  gems.zip   2.03KB   1 downloads

Ego is not a dirty word


#3 Nironior

Nironior

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 12 May 2019 - 06:08 AM

This is the script in its entirety:

Spoiler
 
I'm now using "call script1" to use a mix of my static script which matches all possibilities without checking colors and "procedure grid" with color set to green to check for green gems once in a while as they are the most important gems to me.
 
"procedure script" is the one in which it looks for specific colors.


#4 Ego

Ego

    Insane Poster

  • Moderators
  • 447 posts
  • LocationAustralia

Posted 12 May 2019 - 06:18 AM

Thanks for that. I'll have a look tomorrow seeing as it is 10:48pm here :)

Ego is not a dirty word


#5 Nironior

Nironior

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 12 May 2019 - 06:21 AM

Thanks! Appreciate it a lot ;)