Touch Behavior Fails on KitKat 4.4.2 [mini game capx]

Bugs will be moved here once resolved.

Post » Thu Jun 02, 2016 4:04 pm

Problem Description
Touch an drag and drop behavior fail after a while on Android Kitkat 4.4.2

Attach a Capx
https://onedrive.live.com/redir?resid=4BD833D2DB097488!18772&authkey=!AOUAPiAvrKIX1Lo&ithint=file%2ccapx

Description of Capx
A mini side scrolling space shooter. Drag and drop the spaceship and shooting while holding the shoot button

Steps to Reproduce Bug
  • Play the game while moving the ship around, fast as if you played the game.
  • Hold the shoot button on the bottom right corner.
  • Play until you reach a score of 4000
  • Sometimes the bug doesn't appear straight away, you have to close the app and start over

Observed Result
Drag and drop become less reponsive.
Spaceship stops shooting even though your finger is still on the shoot button

Expected Result
Drag and drop should be responsive.
Holding the shoot button should trigger shooting

Affected Browsers
  • None

OS
Android Kitkat 4.4.2 (Samsung S4 mini. Game ran fine prior)

Export
Mobile Cordova

Minimum supported OS
4.0+ Ice Cream Sandwich (Crosswalk)

Built
Intel xdk

Construct 2 Version ID
r227
B
11
S
2
Posts: 38
Reputation: 709

Post » Thu Jun 09, 2016 9:42 am

@Wenutz we've been experiencing a similar touch problem, when exporting our C2 project with Cordova. But we're building through PhoneGap, not Intel xdk.

We've been experiencing a double touch problem, with all of our touch objects. So when we click on an object, it registers the touch twice. We're using C2's 'On touched object' event, but we've also tried using 'On any touch end' combined with 'Is touching object', to see if that would help. But we're still getting a double touch either way.

We've only noticed the problem on Android devices running 4.x versions. We've tested on Android 4.1, 4.2, 4.3 and we see the double touch issue on all of these devices. But we've also tested on an Android device running version 5.0, and the touch behaviour performed correctly.

We believe it could have something to do with webview, although we're not exactly sure what the problem is.

I hope they find a fix for it soon though. Because our app is ready for release now!

EDIT: We've tried exporting the project through both C2 r227 & r229, but the problem still persists. One odd thing to note, we were using C2 r216 before we recently updated to r227. But we never experienced this problem when using that earlier version of C2!
B
18
S
4
G
2
Posts: 77
Reputation: 1,588

Post » Fri Jun 17, 2016 1:05 am

@unplugged
Not sure if it is being investigated. Its been a while and no replies from the devs or @Ashley .
B
11
S
2
Posts: 38
Reputation: 709

Post » Fri Jun 17, 2016 6:35 am

I've had similar issues but on windows phone Game is running smoothly at 60 fps 40% cpu, but the touch input is laggy, or not registering at all. Not sure if device is faulty as this seem to happen for other html5 games on this device, even intels own xdk demos in the app preview.
Follow my progress on Twitter
or in this thread Archer Devlog
B
40
S
17
G
17
Posts: 992
Reputation: 12,656

Post » Fri Jun 17, 2016 10:09 am

I have a similar problem, sometimes it is not detected the touch.

For example, I touch and keep your finger on the screen, but the touch is not detected, then if I move my finger without lifting it from the screen (in other words, drag your finger), then the touch is detected.

This in android 6.
B
29
S
12
G
21
Posts: 802
Reputation: 14,455

Post » Mon Jun 20, 2016 3:34 pm

The touch plugin and drag&drop behaviors rely entirely on touch start/end events provided by the browser. In the past we've had a bunch of bugs with double touches which turn out to be bugs in the OS or browser layer. IIRC both Chrome on Android and Windows Phone have had issues with this, which were not C2 bugs, but bugs in the OS/browser incorrectly firing touch events. Another case was touches being "cancelled" but the event not firing for it. We can't fix any issues in the OS or browser, and if C2 gets the wrong touch events, after a while it can end up confused since it thinks there's a stack of touches piled up that never went away, or something like that. The C2 code already has mitigations to ignore duplicate touchstart events (e.g. if the browser fires "touchstart" twice in a row with the same touch ID), but it's impossible to mitigate bugs like duplicate touchstart events with different IDs, or missing touchend events.

In short, the fact it works on almost all platforms is strong evidence C2's code is actually correct, and you're facing OS/browser/driver issues. I suspect the OS or driver, since Chrome has a pretty well-tested touch input engine, and presumably Chrome works fine on other devices.

Your best bet would probably be to report Android bugs. Alternatively you could try to make a more minimal repro that demonstrates a problem immediately and I could see if we can work around it, but I suspect we cannot reproduce it without having the exact model of device in the office, and even if we had, the bug may not be possible to work around.
Scirra Founder
B
398
S
236
G
88
Posts: 24,442
Reputation: 194,683

Post » Mon Jun 20, 2016 4:18 pm

In my experience at the moment this has not happened in other games outside of Construct 2.
In my current project this error happens to me, I've done my research but everything looks correct code.

I tried a very basic example but it worked, it's complicated, perhaps the error occurs only when certain circumstances coincide, this makes it difficult to know what those circumstances are able to reproduce the error.

This error occurs occasionally while you're playing, suddenly you touch the screen to make a move and the touch is not registered , then fails and you lose a life in the game while the player thinking: "How ?, I touched the screen!"
B
29
S
12
G
21
Posts: 802
Reputation: 14,455


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests