Multitouch Lag
Hi folks. My game is based around a multitouch mechanic, where the user can drag objects around the screen. They can drag 1 object with 1 finger, or 4 objects with 4. So far everything works as designed, except occasionally the player 'loses grip' of an object, and it's very annoying.
I'm handling multitouch by having 4 different 'touch' actors that snap to the fingertip when pressed on screen, and then follow the finger. If they collide with an object, the object matches the position of the touch actor. The object has the same rule for this movement 4 times, one for each touch, so that multitouch works regardless of any order you touch in etc. And it does work well, which is great!
However, sometimes 'i'm losing grip' and an object gets left behind while the player drags. It's almost as if the touch actor and the object are no longer colliding suddenly and the rule stops. I made the touch actor bigger and it definitely reduced the frequency of the bug, so I'm sure its lag issue where perhaps the object being dragged lags behind too much and the collision link is severed.
My game is running at 50-55fps (which is good for me considering what i've got going on, and i've optimised as best as possible) and feels generally smooth, but i do get the occasional spike where the frame rate drops to below 50 for a split second, usually on playing a sound.
Has anyone else had the same or similar issue with dragging actors, either single or multitouch? Also, is there (and if not their should be!!) a way to graph the FPS of the device, either in gameSalad or via xcode or something?
Thanks for the help y'all. Love this place.
I'm handling multitouch by having 4 different 'touch' actors that snap to the fingertip when pressed on screen, and then follow the finger. If they collide with an object, the object matches the position of the touch actor. The object has the same rule for this movement 4 times, one for each touch, so that multitouch works regardless of any order you touch in etc. And it does work well, which is great!
However, sometimes 'i'm losing grip' and an object gets left behind while the player drags. It's almost as if the touch actor and the object are no longer colliding suddenly and the rule stops. I made the touch actor bigger and it definitely reduced the frequency of the bug, so I'm sure its lag issue where perhaps the object being dragged lags behind too much and the collision link is severed.
My game is running at 50-55fps (which is good for me considering what i've got going on, and i've optimised as best as possible) and feels generally smooth, but i do get the occasional spike where the frame rate drops to below 50 for a split second, usually on playing a sound.
Has anyone else had the same or similar issue with dragging actors, either single or multitouch? Also, is there (and if not their should be!!) a way to graph the FPS of the device, either in gameSalad or via xcode or something?
Thanks for the help y'all. Love this place.

Comments
Or maybe like touch count to trigger rules?
I'm now questioning how I'm doing multitouch dragging of actors. I got the current solution from a few tutorials/samples, which is detailed in the original post - is there a cleaner way in the more recent GameSalad versions maybe? One that doesn't rely on the mouse down, multiple touch actors that collide with the objects?