0
votes

I'm using Cocos2D to place ccsprites on the screen. I then wrote code to allow the user to drag the sprites around the screen. this works fine in the simulator, but on my real iPhone 3GS, when i drag a sprite, the game seems to be paused until I stop dragging the sprite and the sprite jumps to where i released my finger. the constantly changing Frames per second number in the bottom left corner even freezes. anyone have any clue whats going on? im detecting the touch with the - (void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event method.

1
What code are you using? I have a feeling that FierceMonkey is correct, although we can't help you without something to look at first.tallen11
I am FierceMonkey, I answered my own question because I figured it out shortly after posting. the problem was all of the NSLog statements, so if you ever find your on phone performance stinking, it may because of nslog statments.FierceMonkey
Oh, well glad you found the solution. And remember that CCLOG(); statements get disabled for release builds, but stay active for debug builds. That way, you do not have to go through your code and comment out all of the NSLog(); statements.tallen11

1 Answers

0
votes

I had a lot of NSLog statements, which were running very quickly on my Mac, but slowed my iphone down to a stand still! commenting them out fixed the problem. hope this helps someone with the same problem.