iDevGames Forums

Full Version: touches stopped working on device, works in simulator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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
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.
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
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.
Reference URL's