Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Playdate SDK build workflow — pdc compiler usage, PLAYDATE_SDK_PATH environment variable, building .pdx bundles, launching the Playdate Simulator, and running desktop Lua unit tests without the simulator. Use when building, compiling, running, or testing a Playdate project.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -6% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -42% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -25% | 0% |
| Tool | Install | |------|---------| | Playdate SDK | https://play.date/dev/ — drag PlaydateSDK to ~/Developer/PlaydateSDK | | pdc compiler | Bundled with SDK at $PLAYDATE_SDK_PATH/bin/pdc | | Playdate Simulator | Bundled with SDK | | Lua 5.4 | brew install lua (macOS) — for desktop unit tests only |
Add to ~/.zshrc:
bashexport PLAYDATE_SDK_PATH="${HOME}/Developer/PlaydateSDK" export PATH="${PLAYDATE_SDK_PATH}/bin:${PATH}"
Reload: source ~/.zshrc
Verify: pdc --version
bashpdc src/ build/game.pdx
src/ directory containing main.luabuild/game.pdx bundle directory-q flag suppresses info-level output; remove it to see all compiler messagespdc requires PLAYDATE_SDK_PATH to be set in the environmentError format:
src/models/Actor.lua:12: unexpected symbol near 'end'bash# Direct path: "${PLAYDATE_SDK_PATH}/bin/Playdate Simulator.app/Contents/MacOS/Playdate Simulator" build/game.pdx # macOS open shortcut: open -a "Playdate Simulator" build/game.pdx
The simulator reloads automatically when the .pdx bundle changes on disk.
| Key | Playdate button | |-----|----------------| | Arrow keys | D-pad | | Z | A button | | X | B button | | Backspace | Menu | | Mouse scroll | Crank |
Models and systems that don't call playdate.* APIs can be tested on desktop Lua:
bashlua tests/TurnOrder_test.lua lua tests/Battle_test.lua
Rule: Models and systems must never call playdate.*. This keeps them testable without the simulator.
bash#!/usr/bin/env bash set -euo pipefail PLAYDATE_SDK_PATH="${PLAYDATE_SDK_PATH:-${HOME}/Developer/PlaydateSDK}" PDC="${PLAYDATE_SDK_PATH}/bin/pdc" # 1. Build "${PDC}" -q src/ build/game.pdx echo "Build: PASS" # 2. Run desktop tests for f in tests/*_test.lua; do lua "$f" done echo "Unit tests: PASS"
| Problem | Fix | |---------|-----| | pdc: command not found | Confirm $PLAYDATE_SDK_PATH/bin is on PATH | | PLAYDATE_SDK_PATH is not set | Export the variable in your shell profile | | Simulator doesn't launch | Verify simulator path; try open -a "Playdate Simulator" | | lua: command not found | brew install lua (for tests only) | | Build succeeds but game doesn't run | Check pdxinfo has required name, bundleID, version fields |
Other measured skills in the registry, with their headline benchmark lift.