To determine an FPS value in fantomEngine, a call to its GetFPS
method will return the current FPS value, as follows:
GetFPS
call in the fps
field of the game
class.Method OnRender:Int() fps = eng.GetFPS()
eng.Render() Return 0 End
Inside the OnRender
method, we determine the current frames per second value that indicates how many times the game is able to display the content. We will later create a method to update the corresponding text object called txtFPS
. We also told the engine to render all objects in one batch.
3.138.123.106