touch events too slow to tap moving objects

Discussion and feedback on Construct 2

Post » Fri Apr 03, 2015 9:07 pm

Hello!
I'm trying to make a game for iOS/android but it seems that touch events in Construct 2 are too slow to have a game where you are supposed to tap moving objects (unless they are moving really slow) to destroy them. I have tested on multiple devices using both cocoonjs and intelXDK.

Is anyone else having the same issues?
B
28
S
10
G
6
Posts: 251
Reputation: 6,655

Post » Fri Apr 03, 2015 9:24 pm

You can do something more robust than that, which just tests if the point touches the object.

Like pick all the objects in a radius:

on touch
for each sprite
system compare: distance(sprite.x, sprite.y, touch.x, touch.y) < 50
--- do something

or just the closest in a radius:

on touch
pick sprite closest to (touch.x, touch.y)
system compare: distance(sprite.x, sprite.y, touch.x, touch.y) < 50
--- do something

Another idea could be to position a circle to the touch location and test what overlaps it.
B
85
S
27
G
85
Posts: 5,062
Reputation: 57,858

Post » Fri Apr 03, 2015 9:34 pm

Those are some great ideas! thanks, I'll continue trying them out.
B
28
S
10
G
6
Posts: 251
Reputation: 6,655


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest