Brawl stars bot for farming mastery through solo showdown. The bot will find bushes and hide, it also attacks enemies if they are within range. Macro is integrated into the code to automate when defeated, it will queue up for another match automatically.
Inspired by OpenCV Object Detection in Games Python Tutorial playlist by "Learn Code By Gaming" and "How To Train YOLOv5 For Recognizing Game Objects In Real-Time" by "Jes Fink-Jensen".
The Bluestacks app player is used to emulate Brawl Stars onto the computer. Bluestacks default game control is modified. The bot works well with tanky brawlers and on maps with little obstacles (wall, bush, fence, etc) and a lot of bush. A recommended map to run the bot on is island invasion, using short/medium range and tanky brawlers such as Frank, Sam, Buster, Pearl, Nita, etc.
- Fully automated
- When the player is defeated, it will exit the match
- Requeue another match
- Start the bot when loading in
- Find the closest bush and hide in it
- Attack the enemy when they are in the range
- Activate gadget when the enemy is closer to the player
- Windows OS
- Bluestacks 5 to run brawl star
- Python>= 3.8.0 installed (I used version 3.11.6)
- Clone the repository
git clone https://github.com/Jooi025/BrawlStarsBot.git
- Install the required library
cd BrawlStarsBot
pip install -r requirements.txt
Important - please disable Bluestacks' ads and close the left sidebar for the bot to work as intended
-
Run "detection_test.py" to check if object detection is working
-
Change the brawler_name in "constants.py" to your selected Brawler's name and run "constant.py".
-
If the brawler's stats in not found manually change the speed, attack range and height scale factor located below brawler_name at "constant.py" to the brawler's speed and range and to find the height scale factor run "hsf_finder". Also modify sharpCorner (True if the map has many walls, otherwise False) and centerOrder ( True if brawler spawns in the middle of the map, otherwise False).
-
Run "main.py"
-
Select solo showdown and "start bot" (enter 1)
cd BrawlStarsBot
git pull
- bot can attack power cube boxes and collect them
- improve detection of enemy (less false detect)
- change player detection
- improve storm direction function
- improve the screen detection of "defeated"
- fix spam printing of "stop bot"
- improve fps for lower performance computer