andrey-karklins / dota2_mineweeper_bot

Automatic solver for Dota 2 Act IV Minesweeper minigame
MIT License
1 stars 0 forks source link

Screen resolution dependency doesn't mentioned at all #2

Open romualdVII opened 5 hours ago

romualdVII commented 5 hours ago

I don't know python well enough to read this code, but i am a "C++-enjoyer", and i have to say few things. This algorithm, obviously, don't "see" minefield - it see some kind of "start point" and know, how many pixels situated in one tile. This approach good in world, where everybody have FullHD monitors, but on QHD, 4K and 1280x800 (steam deck) it can't work at all - there is infinite "Invalid board size detected" messages. Please, when you uses "pixel-based" graphical solvers, mind other screen resolutions, or, at least, WRITE code workability condition (if i may).

Geczy commented 3 hours ago

so what res does it work at? i still dont know

andrey-karklins commented 1 hour ago

I have tested it only on FullHD with 1920x1080. There are CELL_SIZE and CELL_SPACE parameters that can be tweaked to fit other resolutions, but I didn’t spend time on that. Those numbers were guessed by trials and errors, if you have a good solution you are welcome to suggest a pull request.