hai I am new to iphone development. I used NSTimer scheduledTimerWithTimeInterval 0.01 seconds for game loop. The game consists drawscreen function inwhich I use CGContextClipToRect to clip the large images for animation. But the speed 0.01 seconds is working in simulator only not in the iphone(device). How can i overcome this problem? I respect your reply......you have told about it in previous post. But i could not understand..... can anyone give tutorial to do this in openGL like (CGContextClipToRect in openGL),animation of 2d images,drawing,clipping etc,sample source code.....
+2
A:
Hi, you'll find there are differences with the simulator and on the actual device especially in regards to the possible frame rate. Check out the free Cocos2D http://code.google.com/p/cocos2d-iphone/ it provides extensive 2d functionality and has already proven it's use in many games.
Maniacdev
2009-06-10 18:03:36
A:
Keep in mind that a refresh interval of 0.01 seconds is equivalent to 100 frames per second. I would start by increasing the interval to at least 0.02 seconds (50fps) or 0.0333 seconds (30 fps).
nvuono
2009-06-10 18:11:51
+1
A:
The iPhone OpenGL ES implementation likes 60 fps, so set that timer interval to 1.0/60.
Use XCode's OpenGL ES profile (under Run->Start with Performance Tool)
to verify that you are indeed getting 60fps.
Rhythmic Fistman
2009-06-10 20:56:45