iDevGames Forums
touches stopped working on device, works in simulator - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: touches stopped working on device, works in simulator (/thread-953.html)



touches stopped working on device, works in simulator - aerospaceman - Jul 27, 2009 12:39 PM

I made a few changes to my game and now the touch screen is unresponsive (only in the gameplay view, not the main menu), when I upload the game to the device. It works fine in the simulator. I tried to undo the changes I made to the code but it still doesn't work.
I draw with quartz and use the touches moved command inside my view controller.


touches stopped working on device, works in simulator - longjumper - Jul 27, 2009 12:51 PM

Imagine your foot hurt. So you sent an e-mail to the doctor and said, "My foot hurts. It didn't used to hurt. I changed some stuff in my life and then tried to undo those changes, but my foot still hurts."

Think he'd make a good diagnosis off that information?

Moral of the story: post some code. Smile


touches stopped working on device, works in simulator - imikedaman - Jul 27, 2009 03:10 PM

The simulator will give very precise and unwavering coordinates for the touch points since the mouse cursor is pixel-perfect and completely stationary. The device will give you much noisier data since your fingers cover a larger area and can shift slightly even when you're trying holding your finger steady. Check your code to make sure you're tracking the persistent touches correctly.


touches stopped working on device, works in simulator - Bachus - Jul 27, 2009 04:02 PM

You can miss touches sometimes if your event loop takes up too much of the device's time. If that's not it, post some code. Wink


touches stopped working on device, works in simulator - aerospaceman - Jul 29, 2009 05:06 PM

Bachus was right, to get the touches to work again, I reintroduced the code that ran the timer every 0.01 seconds but displayed the view only every 0.03 seconds. Now touches work fine on the device. But overall the game is still too slow.