Skip to content

hepnn/McDonalds-Tasty-Crush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

McDonalds-Tasty-Crush

  1. Capture device screen, crop game board
  2. Use image matching to detect tile classes
  3. calculate the best move
chrome_S2vuL8rA44.mp4

Setup

There are 3 versions of the bot

  • run.py - uses ADB for communication, it is slow because of getting a screenshot delay
  • run_pyautogui.py - uses only autoguipy, much faster, because no adb connection is required, just a stream of your device (f.e scrcpy)
  • run_combo.py - combination of both ADB and AutoGuiPy, AGP used for screenshots and ADB for swipe input (I couldn't get swipes properly functioning using AGP), it is very fast and the version that's shown in the showcase video

I switched to culebra from ADB shell, because adb shell has a huge (1s +) delay You can follow CulebraTester2 setup guide here https://github.com/dtmilano/CulebraTester2-public

You'll have to find your own grid size and tile size as these are hardcoded

You can do so by enabling Pointer location in android developer settings and then getting x, y values from each grid corner and from tile corners.

How it works:

  1. Capture full device screen
  2. Crop it to the grid's size
  3. Convert the RGB images to greyscale and apply histogram equalization
  4. Use OpenCV to match given template assets with the game board items
  5. Use brute force to find the best move (this should be improved)

TODO:

  • Somehow avoid hardcoded sizes and coordinates
  • Improve match finding algo

About

Automate the McDonalds Tasty Crush game. Bot.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages