Hey guys,
I'm not sure if you guys have encountered this or not. I've tried this on iOS (iPhone 4), for Android (Nexus 7) I didn't catch this issue, maybe because the device hardware is greater.
I've tested on two sample apps: 1) With Mouseclick-began / Touch-began events; 2) Without any touch event.
When I touch the screen repeatedly, I can see drops in fps, even if the app does not have any touch event registered. For example, the sample "demo_8" of tnt particle engine shows drop in fps when you touch the screen repeatedly. This only happens when you first touch the screen. Moving your finger on the screen and leaving your finger off the screen do not produce this issue.
In a game that I've planned to develop, it requires rapid and repeated touches on the screen, so this is now a show stopper for me. Are there any workaround or configuration that I've missed? Thanks.
Comments
Because even with older Android and Ipod touch 4gen I don't see anything noticeably different
EDIT: You have to compare the motion of the particles without touching the screen vs touching the screen repeatedly. You can notice the difference in smoothness.
I've tried this with less than 30 objects. But with some objects constantly moving.
Try adding a collectgarbage("collect") call in your main onEnterFrame handler - that should hopefully smooth out the collection process and stop too much garbage being generated.
Careful use of a mesh might also help performance as if you only had one mesh in the scene there wouldn't be so many objects to filter the touch events to.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Another problem now is, even when the app does not have any touch event registered, touches on the screen still drops the frame rate.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
@zvardin I've stopped the propagation but it's the same.
I use the Jumping Ball example, it is the same. Even without touches, the bouncing motion of the balls sometimes seems to suffer once in a while. This is the issue I've reported before: http://www.giderosmobile.com/forum/discussion/808/most-efficient-way-to-move-objects
I don't think it has anything to do with garbage collection also as I've tried forcing garbage collection on every frame.
When I use device with higher spec (Nexus 7), this problem seems to go away. But the problems I have now are tested on iPhone 4 and iPod Touch 4.
no problems with my old iPod 2^nd gen.
U8650 (Andorid) Pad 1^st gen iPod 4th.gen and my Samsung Galaxy S3...
:-/
www.tntengine.com
@atilim / @ar2rsawseen
Is it true that "Touch events are still passed to all objects even if you don't supply handlers" ? Any exception such as unless they're not visible?
so no, they are passed only to the objects with handles, that are attached to stage tree