← Back to team overview

sikuli-driver team mailing list archive

[Bug 1788596] [NEW] Sikulix 1.1.3 exist() ignores region

 

Public bug reported:

I recently tried to automate a couple of games and ran across a major
issue of which I spent a good couple days searching for a fix but i've
come up empty handed and so here I am hoping I can get it fixed here.

My issue is that r.exists() seems to ignore the region I've given it
I've had this happen to me in multiple games so far but I'm going to use
the most basic one to make it easier to possible try and fix.

My code:
l = Region(1009,579,116,51)

r = Region(1223,576,109,53)

while True:

        if l.exists("1535015573308.png", 0):
            type(Key.LEFT)
        else:
            type(Key.RIGHT)

        if r.exists (Pattern("1535015633109.png").similar(0.73), 0):
            type(Key.RIGHT)
        else:
            type(Key.LEFT)

what this is supposed to do is play a game called Timberman for me (the browser version) essentially the entire game is just you with a never ending tree in the middle of the screen and your goal is to chop it down...
as you chop the tree down (with the left or right keys) branches come down on either the left or right side.

Your goal is to dodge them (by pressing the left or right key again
note: the branches only move on key input) and continue to chop the tree
down or else you will die and game over.

How I obtained this (Or attempted to rather) is by making two very small
regions on the left or right exactly where the branches would be
directly above you.

after that I just grabbed two pics of the tree branches and set it up so
that if the tree branch exists above you... go to other side (by hitting
the left or right key) and that's it.

My problem is that it seems to ignore the regions and just sees the
branches way far up the tree and decides to go to the left or right and
well, dies because a branch was lower on the other side and game over.

And again this isn't the only game or program I've experienced this with
- this one is just the simplest one.

Sorry for the wall of text - I just wanted to really explain everything as best I could. 
I'm not sure if it's my code or an actual bug but any help would be really appreciated. Thanks!

** Affects: sikuli
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1788596

Title:
  Sikulix 1.1.3 exist() ignores region

Status in Sikuli:
  New

Bug description:
  I recently tried to automate a couple of games and ran across a major
  issue of which I spent a good couple days searching for a fix but i've
  come up empty handed and so here I am hoping I can get it fixed here.

  My issue is that r.exists() seems to ignore the region I've given it
  I've had this happen to me in multiple games so far but I'm going to
  use the most basic one to make it easier to possible try and fix.

  My code:
  l = Region(1009,579,116,51)

  r = Region(1223,576,109,53)

  while True:

          if l.exists("1535015573308.png", 0):
              type(Key.LEFT)
          else:
              type(Key.RIGHT)

          if r.exists (Pattern("1535015633109.png").similar(0.73), 0):
              type(Key.RIGHT)
          else:
              type(Key.LEFT)

  what this is supposed to do is play a game called Timberman for me (the browser version) essentially the entire game is just you with a never ending tree in the middle of the screen and your goal is to chop it down...
  as you chop the tree down (with the left or right keys) branches come down on either the left or right side.

  Your goal is to dodge them (by pressing the left or right key again
  note: the branches only move on key input) and continue to chop the
  tree down or else you will die and game over.

  How I obtained this (Or attempted to rather) is by making two very
  small regions on the left or right exactly where the branches would be
  directly above you.

  after that I just grabbed two pics of the tree branches and set it up
  so that if the tree branch exists above you... go to other side (by
  hitting the left or right key) and that's it.

  My problem is that it seems to ignore the regions and just sees the
  branches way far up the tree and decides to go to the left or right
  and well, dies because a branch was lower on the other side and game
  over.

  And again this isn't the only game or program I've experienced this
  with - this one is just the simplest one.

  Sorry for the wall of text - I just wanted to really explain everything as best I could. 
  I'm not sure if it's my code or an actual bug but any help would be really appreciated. Thanks!

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1788596/+subscriptions


Follow ups