3 ms·
decide it’s impossible on the puny simulated CPU Doesn't PICO-8 had no limitations on CPU? It is not an emulator that slowdowns the clock to a certain frequenc
by shultays 10y ago
decide it’s impossible on the puny simulated CPU
Doesn't PICO-8 had no limitations on CPU? It is not an emulator that slowdowns the clock to a certain frequency. It is as fast as Lua gets.
- krajzeg 10y agoCalling 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.