Install any skill in seconds. Free to start, no credit card required.
Get Started Free →wintermuted/playdate-sdk-core
Playdate SDK Lua development — global module pattern, import conventions, pdxinfo structure, and Lua 5.4 runtime differences between on-device and desktop execution.
Passed 25 of 25 test cases with the skill, and 18 of 25 without it.
and 5 more in the full report
7 fixed18 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
The instructions your model reads when the skill loads.
Playdate games run Lua 5.4 on-device via the Playdate SDK runtime. The same Lua 5.4 interpreter runs on desktop for unit tests, but the playdate.* API is absent on desktop.
Key consequence: never call playdate.* APIs in models or systems. Those modules must be importable and testable on desktop Lua without a simulator.
The Playdate SDK uses import (not require). Imported modules declare a global table:
-- src/models/Actor.lua
Actor = {}
Actor.__index = Actor
function Actor.new(def)
local a = setmetatable({}, Actor)
a.name = def.name
a.maxHP = def.maxHP
a.hp = def.maxHP
return a
end
function Actor:isDead()
return self.hp <= 0
end
Callers reference the global directly after import:
import "models/Actor" -- declares global Actor
local hero = Actor.new(PARTY_DATA.player)
import resolves relative to the project src/ root (the path passed to pdc)test cases passed, vs 18 / 25 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.