3 ms·
Yes, PlayDate uses Lua 5.4, for a good reason - it is a retro console with a ARM Cortex M7 running at 168 MHz. This is similar to RPi Pico or ESP32 and LuaJIT c
by jmiskovic 4y ago
Yes, PlayDate uses Lua 5.4, for a good reason - it is a retro console with a ARM Cortex M7 running at 168 MHz. This is similar to RPi Pico or ESP32 and LuaJIT cannot run on it.
In such environment you'd best utilize Lua for configuration, implementing branching dialogs, scripting the story events and similar occasionally-triggered high level code that needs frequent tweaking. A more static project (turn-based, or a card game) could be done just in Lua. Using interpreted Lua in hot loops will not only drag the frame rate, it will also bring down the battery life.
Luckily even the plain Lua can easily be integrated with C, so it's not that difficult to take a chunk of Lua-prototyped code and push it down to C. For LuaJIT it's a non-issue for most part (and most algorithms can be reworked to be more efficient while staying in Lua).