gopdsdk v0.4.0 - Persistence and Playdate System Integration
Highlights
gopdsdk v0.4.0 adds durable game state and the Playdate system facilities needed by a complete offline game.
Persistence
- Owned Playdate filesystem operations with portable error classification
- Bounded, checksummed, versioned stores
- Atomic replacement with backup recovery
- Explicit step-by-step save migrations
- Deterministic corruption and failed-write handling
Playdate system integration
- Owned action, checkmark, and options System Menu items
- System language and localized string lookup
- Accelerometer support with explicit enablement
- Battery, power, volume, timezone, clock-format, and reduce-flashing status
- Exit to Launcher through the normal lifecycle path
Optional facilities
- Bounded asynchronous scoreboards API
- Simulator and serial debug-message FIFO
- Callback cleanup and suppression after termination
Integrated acceptance game
Crank Caverns now integrates the complete P1–P4 surface using only public gopdsdk APIs:
- Persistent settings, progress, score, and best time
- Explicit save/load checkpoints
- Continue Run and Start New flows
- Four generations of save-schema migration
- Localized System Menu settings
- Battery status and Launcher exit
- Simulator and physical-device packaging/deployment
Compatibility changes
- Tile-map draw failures continue to classify as both
playdate.ErrTileMapDrawand their underlying cause, but no longer concatenate arbitrary cause text. - Store migration failures continue to classify as
store.ErrMigration; their direct cause is also available througherrors.Is. - Device validation now distinguishes unsupported channel operations from safe
runtime.chanLenandruntime.chanCaphelpers retained by TinyGo reflection tables.
Applications must not parse error strings. Use errors.Is or concrete error types.
Verified profile
- Go 1.26.5
- Playdate SDK 3.1.1
- TinyGo 0.41.1 with LLVM 20.1.1
- Arm GNU Toolchain GCC 15.3.1
- Windows Simulator and conservative-GC device build
- USB installation and device launch through COM3
macOS and Linux native Go behavior is covered by CI. Official SDK, Simulator, and physical-device execution on those hosts remains unverified.
Extended physical-device soak, memory-growth measurement, live configured scoreboards, and injected power-loss testing remain outside this release’s verified evidence.
Upgrading
Existing v0.3 applications can upgrade without adopting the new optional capabilities.
See: