We won't change the
OnRender method in the
game class. We will only change the background color and set the text of the FPS indicator to see how fast our game renders everything:
CLSstatement, which defines a nice orange color background.
Method OnRender:Int() Cls (255,155,0)
txtFPSobject with the current FPS value.
txtFPS.SetText("FPS: "+eng.GetFPS()) eng.Render() Return 0 End
OnRender method is done. We determine the current FPS value inside it, as Monkey is skipping rendering frames if
OnUpdate is taking to long. Only here will you get the true FPS value in its traditional meaning.