This project is a research project for myself involving OpenCV and Clone Hero. It uses template matching to attempt to play the game.
It definitely performs better than me, and overall I believe it does fairly well! (See: Scores)
It definitely performs better than me, and overall I believe it does fairly well! (See: Scores)
Currently somewhat fine-tuned for my own computer. Modify the Makefile if you have issues. Or just don't cheat 😡.
g++
- X11 Desktop Environment (yea, I know, it's a silly requirement, I have yet to capture the screen in a cross-platform way)
- Install Input_Lite (https://github.com/smasherprog/input_lite)
- Install OpenCV (https://opencv.org/releases/)
- Run
make
./cvhero
You should not run this program in it's current state. It uses all sorts of hardcoded values, resolutions, offsets, and more. It also only works on Linux with an X11 desktop environment. Just don't bother right now, not that you should anyways, cheating is bad and wrong.
- Do the 8x combo power thing.
- Could get fancy with it and detect if there is juice in the bar. Or just do the keybind every X seconds. Latter is probably easier.
- Better star note detection
- Since input image is now cropped, false detections shouldn't happen when the confidence threshold is lowered. Guess we'll see.
- Fix hold bars being detected as notes, causing combo-breaks or hold-breaks.
- Fix fretboard lines being detected as open notes. I think I just need a better open-note template to match.
- This issue and the one above seems to be caused by thick fretboard lines showing up. Ugh.
- Hold notes
- Starting AND finishing
- MAYBE Properly handle combo notes (AKA don't strum)
- Kinda hard, how to know if combo has been broken or not? Not worth the effort probs
As of 2023-01-22 | Bot does not yet activate the 8x score thing lol
Song | Difficulty | Accuracy | Stars | Score | Best Streak |
---|---|---|---|---|---|
"Soulless V" | Expert | 92% | 4☆ | 1,796,349 | 510 |
"Flamewall" | Expert | 98% | 5☆ | 529,132 | 396 |
"Infinite Blue" | Expert | 98% | 5☆ | 256,082 | 229 |
"Inori -warera shinso to tomo no ayumu mono nari-" | Expert | 96% | 5☆ | 232,712 | 312 |
Not indicitive of true performance since I have OBS running, but is pretty close.