A game scene with multiple layer ant numerous sprite, working almost nicely(except of some problems). But if we put the game on hold, for a long time of 5-10 minutes (approx), it’s frame rate goes down and game start giving jerky effect when been start playing again.
the default frame rate is been used initially here is default ccMacros.h:
#define CC_DIRECTOR_INIT() \
do{ \
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; \
if( ! [CCDirector setDirectorType:kCCDirectorTypeDisplayLink] ) \
[CCDirector setDirectorType:kCCDirectorTypeNSTimer]; \
CCDirector *__director = [CCDirector sharedDirector]; \
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; \
viewController.wantsFullScreenLayout = YES; \
[__director setDeviceOrientation:kCCDeviceOrientationLandscapeLeft]; \
[__director setDisplayFPS:NO]; \
[__director setAnimationInterval:1.0/60]; \
EAGLView *__glView = [EAGLView viewWithFrame:[window bounds] \
pixelFormat:kEAGLColorFormatRGB565 \
depthFormat:0 /* GL_DEPTH_COMPONENT24_OES */ \
preserveBackbuffer:NO]; \
[__director setOpenGLView:__glView]; \
[viewController setView:__glView]; \
[window addSubview: viewController.view]; \
[window makeKeyAndVisible]; \
} while(0)
Edit: The scenario is, APPLICATION KEEP WORKING PROPERLY WHILE I’M PLAYING IT EVEN FOR THAN FIVE OR TEN MINUTES BUT FRAME RATE GET DOWN WHEN WE LEFT THE APPLICATION UN TOUCHED FOR THE SAME TIME PERIOD SO is there any way to refresh the application time to time?
As I tried every thing, @Nitish suggested but, at a movement every thing got to be failed. As that degradading frame rate is still an issue. By googling too much and trying to find out the reason and solution, I have only been succeed to have reason only, as I was unable to afford solution. To check what I got, CHECK THIS LINK.