com.jme.app
Class VariableTimestepGame
java.lang.Object
com.jme.app.AbstractGame
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
|
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. |
VariableTimestepGame
public VariableTimestepGame()
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