Bot for Android game Beatstar using OpenCV pattern matching.
Click here to see it in action.
Using an Android emulator, this bot will continually search for a matching note image. It takes a screenshot and runs the pattern matching algorithm. If two notes are found at the same time, then it will press them at the same time. Currently this bot is completely dependant on a particular setup for the game. See dependencies for more details.
- Windows
- LDPlayer (or other Android VM)
- Tap lanes must be assigned to A, S, D keys*
- Template images matching VM window size*
*Beatstar has 3 lanes for notes, left, center, right. Your VM must be configured to have the A, S, D keys correspond to these tap lanes.
*The provided bar.png and beatstar_text.png are sized to the default LDPlayer window size. If your window size is different, you may have to update the images using screenshots of the game from your VM.
- Launch Beatstar in Android VM and choose a song
- Before starting the song, run main.py
- Choose top left and bottom right points by clicking to define focus region*
- Bot should automatically begin playing!
*We could grab the entire VM window, but the smaller the focus region, the faster it can process pattern matching. Therefore it would make the most sense to choose only the hit region as the focus region. This also makes the most sense because the bot does not check if the note is located in the hit region.
- Improve beatstar note match speed
- Only press 2 keys when vertically aligned
- Implement hold notes
Reference source code for details.
- 0.1.1
- Minor fixes
- Added TODO items
- Expanded README.md
- 0.1
- Initial Release
- Hits single, double notes
- Hits beatstar note (late)
- Hits hold notes, does not hold
Thanks to