linus-jansson / btd6farmer

A tool to make autonomous macros in Bloons Td 6. Relies on OCR and template matchmating for navigation. Made in python
https://discord.gg/qyKT6bzqZQ
MIT License
31 stars 11 forks source link

new CHIMPS gameplan, bug fixes, additions, etc... #39

Closed mirko93s closed 1 year ago

mirko93s commented 1 year ago

some bug fixes/optimizations, including the change_target function, which was broken.

added a chimps gameplan, better than the standard hard one.

this gameplan needed an addition to the bot to wait a given time at the start of a round, before placing a new tower (or it wouldn't have enough money)

Feel free to cherry pick the commits. But I just tried it and it works fine.

mirko93s commented 1 year ago

Remove resolution specific images and upscale/downscale them in _locateall method

mirko93s commented 1 year ago

Multiple heroskins

mirko93s commented 1 year ago

Option to replay map or go back to start screen

mirko93s commented 1 year ago

Added support for linux (and probably macos) screen sizes. Fix for windows dpi/scale

Also, I tried this but it didn't work for me, it was returning only my primary monitor size no matter what I tried

        """
        # Platform independent code to get monitor resolution?
        # https://stackoverflow.com/a/66248631
        import tkinter
        def get_display_size():
            root = tkinter.Tk()
            root.update_idletasks()
            root.attributes('-fullscreen', True)
            root.state('iconic')
            height = root.winfo_screenheight()
            width = root.winfo_screenwidth()
            root.destroy()
            return height, width
        self.width, self.height = get_display_size()
        """
linus-jansson commented 1 year ago

Added support for linux (and probably macos) screen sizes. Fix for windows dpi/scale

Also, I tried this but it didn't work for me, it was returning only my primary monitor size no matter what I tried

Probably because the os opens a program on the primary monitor as a default from what I know.

linus-jansson commented 1 year ago

Awesome work btw, will go through it later!

mirko93s commented 1 year ago

Thanks, feel free to cherry pick what you think fits your bot. These were all changes I made in the older version for personal use and I thought about posting them here as I was porting them to the newer version. They might be useful.

linus-jansson commented 1 year ago

Tested on 1080 monitor and working as expected! Awesome work!