[Resolved] tough bug, and my current work-around.

0 favourites
  • 2 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • I'm working on a game (tower defense type) using touch controls, it has plenty of touch tap and double tap (no multitouch required).

    After a while playing on an android device (samsung A5 2017 "SM-A520F" and Js Galaxy tab A "SM-T510") the touch index gets "stuck" as if the user suddenly kept its finger in exact same spot while continuing using an additional finger.

    This messed upp all "is touching" and set to position touch.X.

    Solution (work around):

    Create object called TouchPoint and variable TouchToUse.

    All touch X/Y replaced with XAt(TouchToUse)/YAt(TouchToUse)

    Any event previously asking: "is touching" replaced with "overlapping touchpoint"

    and so on.

    I've read lots of old threads regarding a similar problem to a device own built in 2+1 gesture, this bug behaves in the same way but the two mentioned devices in my test have no such feature.

    I've just thrown out my work-around here in case anyone else faces the same problem, perhaps someone else has a better solution and maybe construct dev team wants to look into the bug.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I've just taken the project apart piece by piece until the bug revealed itself (Ockham's razor)

    In a double tap event, under a very uncommon condition, one frame in a 5fps animation caused an infinite loop where a function kept calling itself (collision not triggering).

    That caused the system not to recognize that the user ended the touch, and that touch index got frozen in place.

    Ashley the bad programming was mine to own, but perhaps this is something that can be avoided? Some sort of failsafe? (on the other hand... a failsafe would have kept me with bad code)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)