Andrea Franz

Don't abuse NSLog in your iPhone game

I'm working on a simple game for iPhone based on cocos2d. Yesterday I installed it on my old iPhone3G and it was veeeeeeeery slow. After a lot of refactoring I found a NSLog call inside my game loop. It basically logged all the collision detection of the player with all the tiles in the map. After removing that it's even faster then before. So, if you want to log something, do it, but remember to remove all these logging calls later.

#Cocos2d #Development #iPhone

comments powered by Disqus