Time for action – hide statistics and FPS

Every SimpleApplication displays the current frames per second (FPS) and some mesh statistics, in the bottom-left corner. Before releasing your game, you should hide these displays as follows:

  1. Make a copy of Main.java and name the class HideStatistics.java. Remember to also refactor the first line of the main() method to HideStatistics app = new HideStatistics();.
  2. In simpleInitApp(), call the following method to hide the FPS value:
    setDisplayFps(false);
  3. In simpleInitApp(), call the following method to hide the debug statistics:
    setDisplayStatView(false);

Run the application with either of the application settings, and note the difference.

What just happened?

By default, a jMonkeyEngine game displays debug information. ...

Get jMonkeyEngine 3.0 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.