Turns out you can't have too many draw commands
-
Doing some testing, and commented out the
update()
function so nothing would be shown on the screen. The only draw commands being done wasclear()
andprint()
. After a short while, the program stopped with an error saying...Error: Out of command memory: Too much drawing between calls to update().
So there's a limit, but how much?
-
In some cases this can also bring to a stack overflow, the functions like clear and draw are essentially screen writing commands for the video engine, but the engine seems to have a fixed length array of operations it can do beetween each update call, this is done probably for optimization purposes, so all the drawing commands can be performed very quickly by optimized and possibly compiled code from the engine in a reasonably short ammount of time, so you program can have smooth graphics while being written in an interpreted language, luckly the limit of commands beetween update calls is quite high so it should be plenty for every program.