2026-07-25 12:01:16 +02:00
|
|
|
# ``PlaydateKit``
|
2026-07-24 11:29:13 +02:00
|
|
|
|
|
|
|
|
Swift bindings to the Playdate C API.
|
|
|
|
|
|
|
|
|
|
## Overview
|
|
|
|
|
|
2026-09-18 12:45:39 +02:00
|
|
|
The firmware hands your game a `PlaydateAPI*`: a struct of function
|
|
|
|
|
pointers. This module wraps it with per-subsystem namespaces, wrapper types
|
|
|
|
|
that own their C objects, closures instead of function-pointer/userdata
|
|
|
|
|
pairs, `OptionSet`s and `enum`s instead of raw constants, and typed `throws`.
|
2026-07-24 11:29:13 +02:00
|
|
|
|
|
|
|
|
Call ``Playdate/initialize(with:)`` from your game's `eventHandler` before
|
2026-09-18 12:45:39 +02:00
|
|
|
anything else; see <doc:GettingStarted>.
|
2026-07-24 11:29:13 +02:00
|
|
|
|
2026-09-18 12:45:39 +02:00
|
|
|
The module uses only the Embedded Swift subset, so the same code compiles
|
|
|
|
|
for the Playdate Simulator and the device (`armv7em-none-none-eabi`).
|
2026-07-24 11:29:13 +02:00
|
|
|
|
|
|
|
|
## Topics
|
|
|
|
|
|
|
|
|
|
### Essentials
|
|
|
|
|
|
|
|
|
|
- <doc:GettingStarted>
|
|
|
|
|
- ``Playdate``
|
|
|
|
|
- ``SystemEvent``
|
|
|
|
|
- ``PlaydateError``
|
|
|
|
|
|
|
|
|
|
### System and display
|
|
|
|
|
|
|
|
|
|
- ``System``
|
|
|
|
|
- ``Display``
|
|
|
|
|
|
|
|
|
|
### Drawing
|
|
|
|
|
|
|
|
|
|
- ``Graphics``
|
|
|
|
|
- ``Rect``
|
|
|
|
|
|
|
|
|
|
### Sprites
|
|
|
|
|
|
|
|
|
|
- ``Sprite``
|
|
|
|
|
|
|
|
|
|
### Audio
|
|
|
|
|
|
|
|
|
|
- ``Sound``
|
|
|
|
|
|
|
|
|
|
### Storage
|
|
|
|
|
|
|
|
|
|
- ``File``
|
|
|
|
|
- ``JSON``
|
|
|
|
|
|
|
|
|
|
### Connectivity
|
|
|
|
|
|
|
|
|
|
- ``Network``
|
|
|
|
|
- ``Scoreboards``
|
|
|
|
|
- ``AccessReply``
|
|
|
|
|
|
|
|
|
|
### Lua interop
|
|
|
|
|
|
|
|
|
|
- ``Lua``
|