hello, im using javaFX AnimationTimer for my game loop, i would like to know if there is another way to improve it, docs say that AnimTimer will run at 60 FPS or will try, below is my gameloop:
gameThread = new AnimationTimer()
{
@Override
public void handle( long now )
{
//not to run if level is nul
if( null == currentLevel ){return;}
//getting delta
delta = ( float ) ( ( now - pastTick ) / 1e9 ) ;
update( delta );
render();
pastTick = now;
}//
};