3 ms·
Calling it a CPU is a simplification, but PICO-8 does emulate limited CPU resources by limiting how much code you can run per frame. Lua code runs at exactly t
by krajzeg 10y ago
Calling it a CPU is a simplification, but PICO-8 does emulate limited CPU resources by limiting how much code you can run per frame.
Lua code runs at exactly the same speed inside the PICO-8 executable on a PC and in the HTML5 export on a mobile - in both cases much slower than in a standard Lua interpreter on my PC.
My guess is that PICO-8 is counting and limiting the number of opcodes the Lua VM is allowed to execute per frame, but that's hard to confirm.
It's certain though that everything you can do in code (from variable assignment to graphics operations like rectfill()) has a certain "cycle cost", and you get a limited number of "cycles" per frame - just as if it was a real machine.