12

How do I get rid of the numbers in the bottom left of the screen when I am making a cocos2d game? This is probably a newb question, but still.

jnpdx
  • 45,847
  • 6
  • 64
  • 94
skippy_winks
  • 778
  • 3
  • 14
  • 31

7 Answers7

22

There is a ShowFPS var in one of the files when you create the initial cocos project. But this should work from anywhere:

[[Director sharedDirector] setDisplayFPS:NO];
Sup3rpanda
  • 425
  • 3
  • 10
13

if your app delegate.. Look for

    [director setDisplayFPS:YES];

change it to

    [director setDisplayFPS:NO];

or you can call this anywhere like the previous answer:

    [[CCDirector sharedDirector]setDisplayFPS:NO];
xuanweng
  • 1,939
  • 1
  • 11
  • 10
11

Just a heads up for people checking this out at a later date (like me). setDisplayFPS is deprecated now. Use setDisplayStats instead.

[[CCDirector sharedDirector] setDisplayStats:NO];
Pablo Maurin
  • 1,462
  • 1
  • 22
  • 33
Nathaniel Rogers
  • 249
  • 4
  • 10
3

To show it only when compiling for debug:

#if defined (DEBUG)
[[CCDirector sharedDirector] setDisplayFPS:NO];
#endif
Danyal Aytekin
  • 4,106
  • 3
  • 36
  • 44
2

in AppDelegate.cpp file, and the applicationDidFinishLaunching method

// turn on display FPS
pDirector->setDisplayStats(true); 

change true to false

lightboat
  • 23
  • 4
1

for cocos2D 3.0

[[CCDirector sharedDirector] setDisplayStats:YES];
Maxime Lorant
  • 34,607
  • 19
  • 87
  • 97
1

In appdelegate.m after didfinishlaunchingoptions.

[startUpOptions setObject:@(NO) forKey:CCSetupShowDebugStats];

setObject:@NO (It is YES by default).

Apil
  • 11
  • 1