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:
- Make a copy of
Main.java
and name the classHideStatistics.java
. Remember to also refactor the first line of themain()
method toHideStatistics app = new HideStatistics();
. - In
simpleInitApp()
, call the following method to hide the FPS value:setDisplayFps(false);
- 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.