Jooi025 / BrawlStarsBot

Brawl stars bot for farming mastery in solo showdown
MIT License
132 stars 18 forks source link

Multiple errors when installing requirements becouse of wrong python version, after installing them manually program screen is black, white or just a screenshot of the game (not movin) #13

Open Mundos-Games opened 4 months ago

Mundos-Games commented 4 months ago

So the python version im using is just the same you installed on the video but i still got that error, so i tried installing whathever package gave me an error and it seemed to work, but when the program opens the screen is black so idk what to do

Jooi025 commented 4 months ago

Is the detection_test window blank? If so, try making focus_window in constant.py to "False"

Mundos-Games commented 4 months ago

ty now its working but it doenst exit and goes back into a new match, is it becouse of game language maybe? Tho if i press exit it does press the continue button but it exists the match instead of playing again

Mundos-Games commented 4 months ago

(closed on accident)

Mundos-Games commented 4 months ago

checked and language doesnt change anything

Mundos-Games commented 4 months ago

Ok if i leave it until the match naturally ends it does get alone to the main screen but thats it, it doesnt play again

Mundos-Games commented 4 months ago

Ok after some testing, Fullscreen seems to make it work, tho it's pretty bad that I gotta Fullscreen it, also, any way to make sure it doesn't stay pixels out of the bush? Maybe I should put a slightly lower or higher HSF to cover human error?

Mundos-Games commented 4 months ago

And sometimes it says it's hiding and it hasn't even moved

Mundos-Games commented 4 months ago

ok so ive thought abt some ways to fix some of the problems:

  1. it not doing anything at the start: I think its becouse its trying to move before the match lets you, so you cpuld just add a delay (assumption)
  2. It not fully entering bushes: Just adding like .5 or .25 tiles to the distance calculation will fix 50% of the problems (when it doesnt enter the bush), for the other 50% (when it runs in then out) you could just maybe store previous location and if after finding and hiding on a bush it finds another bush tile closer to previous position make it move to it.

Hope those ideas work and i was able to help you make your bot better! :)

Mundos-Games commented 4 months ago

Another idea i think could work, can be to check for the hex color of a part of the brawler that doesnt change on direction, though that'll need a lot of time to do, as you need to find a sweet spot for each brawler, it wont work with skins, etc... But i think as an optional mode to do a check if you are inside a bush its a good idea.! Then you can correct by searching for the closest bushes outside of last detected bush and moving towards that direction slightly, like .5 tiles or 1 tile. Hope that feels like a great idea for you too!