com.jme.app
Class VariableTimestepGame

java.lang.Object
  extended by com.jme.app.AbstractGame
      extended by com.jme.app.VariableTimestepGame

public abstract class VariableTimestepGame
extends AbstractGame

VariableTimestepGame implements a very simple loop, updating game logic and rendering as fast as hardware permits. To compensate for the variable framerate, every frame the update method is passed the amount of elapsed time, in seconds, since the previous update. The game should execute the logic based on the time elapsed.

Version:
$Id: VariableTimestepGame.java,v 1.19 2007/08/02 21:36:19 nca Exp $
Author:
Eric Woroshow

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme.app.AbstractGame
AbstractGame.ConfigShowMode
 
Constructor Summary
VariableTimestepGame()
           
 
Method Summary
 float getFramesPerSecond()
          getFramesPerSecond gets the current frame rate.
 void start()
          Renders and updates logic as fast as possible, but keeps track of time elapsed between frames.
 
Methods inherited from class com.jme.app.AbstractGame
finish, getVersion, setConfigShowMode, setConfigShowMode
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableTimestepGame

public VariableTimestepGame()
Method Detail

getFramesPerSecond

public float getFramesPerSecond()
getFramesPerSecond gets the current frame rate.

Returns:
the current number of frames rendering per second

start

public final void start()
Renders and updates logic as fast as possible, but keeps track of time elapsed between frames.

Specified by:
start in class AbstractGame