We start by adding the Cls statement to clear the screen before we render anything.
Method OnRender:Int()
Cls
Next, call the Render method of the fantomEngine, which is stored inside the eng variable.
eng.Render()
Return 0
End
Save the script again and now actually try to run it. You should see a basic black canvas in the browser.
What just happened?
With one simple call to the Render method of the fantomEngine, we have rendered every single object that was active and visible. By using this framework, you won't need to think about rendering your game objects anymore. Cool isn't it?