This is somewhat similar question to Stand alone Playdate extended Lua interpreter.
What is the best way to use the Playdate SDK with the standalone lua interpreter?
Concrete example, on my Mac, run: lua
and be able to use playdate.geometry
?
Having a REPL handy for working through maths/geometry would help speed things up vs always running/debugging through the simulator.
$ lua
Lua 5.4.7 Copyright (C) 1994-2024 Lua.org, PUC-Rio
> playdate.geometry.distanceToPoint(1,2,3,4)
stdin:1: attempt to index a nil value (global 'playdate')
stack traceback:
stdin:1: in main chunk
[C]: in ?
>
I've tried import
/require
from my CoreLibs
directory without much luck. I can copy files from there but I actually don't see playdate.geometry
.
I figure at this point I am just missing something obvious, any help appreciated.