Multitouch Lag

allornothingallornothing Member, PRO Posts: 126
edited November -1 in Working with GS (Mac)
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. :D

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Are you using touch is inside or touch is pressed.
    Or maybe like touch count to trigger rules?
  • allornothingallornothing Member, PRO Posts: 126
    Not got the project open in front of me just now but using when touch is pressed on the 'touch1/2/3' actors, and when actor collides with touch1 on the actual objects. Works fine, except for these occasional drop outs.
  • allornothingallornothing Member, PRO Posts: 126
    Bump and update...

    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?
Sign In or Register to comment.