GetMapEngineFrameRate

From Spheriki

Jump to: navigation, search

Gets the map engine frame rate being used.


Contents

Usage

number GetMapEngineFrameRate();


Examples

The variable font must contain a previously loaded Sphere Font object. This script should be placed in the render script of the map being tested, using the Sphere map editor.

font.drawText(0, font.getHeight(), "FPS: " + GetMapEngineFrameRate());

Press F11 while the map is running to compare this desired framerate to the actual frame rate of the map engine.


Notes

  • This function will only work while the map engine is running.
  • GetMapEngineFrameRate can be useful if a continuous loop needs to be used to simulate free execution of the map engine inside a script loop. See UpdateMapEngine for an example of how this could be achieved.


See also

Personal tools