Skip to content

Manually setting game screen coordinate

HungPV edited this page Jan 16, 2022 · 3 revisions

From Bit Heroes bot version 1.4.0 toward, JNA was added to support automatically detect game window's location (screen offset)

But if you are using Web version of Bit Heroes or the automatic detection method doesn't work, you have to setting it manually by doing the following steps:

  1. Play game on Steam client or web version at https://www.kongregate.com/games/Juppiomenz/bit-heroes using Google Chrome
  2. Make a screenshot and paste/open it using Paint (on Windows) or something like that on the other OS
  3. Point to the top left corner of the in-game screen to find out it's coordinate get x,y
  4. Open user-config.properties file
  5. Update value of offset.screen.x and offset.screen.y. For example, based on the above picture, we have:
  • offset.screen.x=206
  • offset.screen.y=284
  1. Save file after modified
  • On Ubuntu 18.04, usually x=0 and y=57 when using mini client of Google Chrome
  • On Windows 10, usually x=8 and y=31 when using mini client of Google Chrome
  • On Windows 7, usually x=4 and y=24 when using mini client of Google Chrome or x=7 and y=30 when using Steam client
  • On MacOS 10.14, usually x=0 and y=45 when using mini client of Google Chrome

Why do we have to do that? To optimize performance for this bot, I use some hard-coded relative coordinate and only scan specific screen rectangle, thus scan and processing rate would be much more faster than scan the whole window/screen