DEV Community

Cover image for Beating annoying minigames with Java☕ - Or: How to create a smart auto-clicker 🤖🎮

Beating annoying minigames with Java☕ - Or: How to create a smart auto-clicker 🤖🎮

Pascal Thormeier on January 08, 2024

Last week was slow. After a rather busy holiday season, I felt like I needed to relax a bit (pro tip: do that occasionally; it does help!) and boot...
Collapse
 
christianriesen profile image
Christian Riesen

Very nice article!

Python also is very useful for these things. The enter thing is also a common pitfall. I would suggest using F13 to F24 which exist as keys but are on pretty much no keyboards. That way you don't bomb yourself by accident.

And one question came up for me when reading this: What prevents you from just spamming the key constantly? And If it's a directional dodge, why not spam dodge in a square?

Collapse
 
thormeier profile image
Pascal Thormeier • Edited

Thank you very much! Yep, I learned the hard way that "Enter" isn't the ideal input, as you read :P

Those are excellent questions!

The dodging isn't exactly directional in the sense that the lightning simply strikes, and the animation for dodging is predefined to move the character in a specific direction, depending on the location on the map. I found that even facing the opposite direction, the character would turn 180 degrees and jump back.

Simply spam-clicking doesn't work because of the game rules. If the input comes a little too early, i.e. during the "announcement", it's registered as a failed attempt. I could've "spam" clicked every 500ms or so, but there would've been a chance that the announcement would line up precisely with that interval and register a failed input. I needed this to be as reliable as possible to dodge the entire 200 lightning strikes in one go.

I actually found that clicking at the exact moment the announcement shows up (i.e. when the brightness check is true) is a pretty reliable way of failing.

Does that answer your questions?

Collapse
 
tiuwill profile image
Willian Ferreira Moya

What an answome and entertaning reading!
I always wanted to wirte some code to help me save some time in games, but I didn't knew how can I do that without a dev kit.

I'll defently look at chiaki!

Collapse
 
thormeier profile image
Pascal Thormeier

Thank you so much, glad you liked it! I initially had a few issues finding the right settings for my PS4, as everything in newer Chiaki builds defaults to PS5 stuff. Also, make sure your computer and the PS are connected to your router via cable to reduce latency and get rid of any other hiccups that wifi might cause. Once it's up and running, though, there are no limits anymore! :D