So I have this game running on my iPhone 3g, and I am trying to squish a laggy touch problem.
Essentially, I am running at 60fps, I have the standard enterFrame that loops over my main game loop, I have a touch event on a full screen newRect to capture touches anywhere on the screen. I have the rect as the stage:setFocus(TOUCH_AREA) setup as well, and the function to capture touches returns true, so that corona does not try to ‘bubble’ the touch event up or down.
My problem is that, about 50% of the time, the touch event seems not to fire until 3 frames after I touched the screen. Other times, it works fine and I animate accordingly.
I will have to do some testing when I get home, but I am curious about how the touch event fires.
-
Does the touch event fire before, or after, the enterFrame event? Essentially, which has priority?
-
Does it actually try to fire IN an enterFrame event? As in, while executing my enterFrame code, the touch event is an interrupt of the code in the enterFrame, and it executes before the code in the enterFrame event finishes?
-
Is 60fps on an iPhone 3g too fast for the touch events to be captured?
Ill probably have to test with the functions to get the current time on the device to get exactly when events are called, but if someone has some insight, I would appreciate it!
[import]uid: 8541 topic_id: 2696 reply_id: 302696[/import]