{"id":13496729,"url":"https://github.com/finnvoor/PlaydateKit","last_synced_at":"2025-03-28T19:30:59.124Z","repository":{"id":227702089,"uuid":"771760503","full_name":"finnvoor/PlaydateKit","owner":"finnvoor","description":"Create games for Playdate using Swift.","archived":false,"fork":false,"pushed_at":"2025-02-19T22:31:39.000Z","size":16161,"stargazers_count":215,"open_issues_count":11,"forks_count":21,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-25T18:12:25.426Z","etag":null,"topics":["game-development","playdate","playdate-sdk","swift"],"latest_commit_sha":null,"homepage":"https://finnvoor.github.io/PlaydateKit/documentation/playdatekit","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/finnvoor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"finnvoor"}},"created_at":"2024-03-13T22:39:51.000Z","updated_at":"2025-03-22T10:00:52.000Z","dependencies_parsed_at":"2025-01-29T04:11:46.121Z","dependency_job_id":"3d7415f5-6053-48a0-ab68-6bfd1ccf1c6b","html_url":"https://github.com/finnvoor/PlaydateKit","commit_stats":null,"previous_names":["finnvoor/playdatekit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnvoor%2FPlaydateKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnvoor%2FPlaydateKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnvoor%2FPlaydateKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnvoor%2FPlaydateKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/finnvoor","download_url":"https://codeload.github.com/finnvoor/PlaydateKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245516790,"owners_count":20628227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game-development","playdate","playdate-sdk","swift"],"created_at":"2024-07-31T19:01:58.128Z","updated_at":"2025-03-28T19:30:59.105Z","avatar_url":"https://github.com/finnvoor.png","language":"C","funding_links":["https://github.com/sponsors/finnvoor"],"categories":["C","Swift"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/finnvoor/PlaydateKit/assets/8284016/cc62d7bd-87bc-4f8e-9b0f-18998df28832\" width=\"400\" max-width=\"90%\" alt=\"PlaydateKit Logo\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.swift.org/\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Swift-6.0-f05237.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://sdk.play.date\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Playdate_SDK-2.5.0-ffc500.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/finnvoor/PlaydateKit/actions/workflows/Build.yml\"\u003e\n        \u003cimg src=\"https://github.com/finnvoor/PlaydateKit/actions/workflows/Build.yml/badge.svg\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n# PlaydateKit\n\nPlaydateKit provides easy to use Swift bindings for the [Playdate](https://play.date/) C API. PlaydateKit aims to be as Swift-y as possible, replacing error pointers with throwable functions, avoiding the use of pointers and memory management as much as possible, and adding documentation comments to all functions (copied from the Playdate SDK docs).\n\n## Status\n\nPlaydateKit provides (almost) full coverage of the Playdate C API. PlaydateKit adds wrapper types for some values (Sprite, Bitmap, FileHandle, etc) that automatically manage the allocation/deallocation of resources. While I have attempted to closely follow the C API specifications, much of it is untested, so if you run into an unexpected issue or can't do something with the Swift API, please open an issue!\n\nCurrently, the following sections of the API are implemented:\n\n- [x] Display\n- [x] File\n- [x] Graphics\n- [x] JSON\n- [ ] Lua\n- [x] Scoreboards\n- [ ] Sound\n  - [x] FilePlayer\n  - [x] SamplePlayer\n  - [x] Synth (partial)\n- [x] Sprite\n- [x] System\n\n## Usage\nFor detailed instructions and documentation on how to get started creating a game using PlaydateKit, see [here](https://finnvoor.github.io/PlaydateKit/documentation/playdatekit).\n\n### Summary\n1. Install a recent nightly [Swift](https://www.swift.org/download/#snapshots) toolchain that supports the Embedded experimental feature.\n2. Install the [Playdate SDK](https://play.date/dev/).\n3. Create a new repository using the [PlaydateKitTemplate template](https://github.com/finnvoor/PlaydateKitTemplate).\n5. Build and run directly in the simulator using Xcode, or build using the command `swift package pdc`. When built using `swift package pdc`, the built `pdx` game file will be located at `.build/plugins/PDCPlugin/outputs/PlaydateKitTemplate.pdx` and can be opened in the Playdate simulator.\n\nYour `PlaydateGame` object manages the game lifecycle, receiving events such as `gameWillPause` and `deviceWillSleep`. \n\n```swift\nimport PlaydateKit\n\nfinal class Game: PlaydateGame {\n    init() {\n        System.addCheckmarkMenuItem(title: \"check me\") { isChecked in\n            print(isChecked ? \"checked!\" : \"not checked\")\n        }\n    }\n\n    func update() -\u003e Bool {\n        System.drawFPS()\n        return true\n    }\n\n    func gameWillPause() {\n        print(\"Paused!\")\n    }\n}\n```\n\n## Contributing\nI'm happy to accept contributions on this project, whether it's bug fixes, implementing missing features, or opening an issue. Please try to follow the existing conventions/style in the project.\n\nIf you create a game using PlaydateKit and would like it featured here, please open an issue or pull request! If you would like to demake a retro game or create a new one that demonstrates PlaydateKit's capabilities, feel free to add an example game in the `Examples/` directory.\n\n## Acknowledgements\n\nPlaydateKit was inspired by and would not be possible without the excellent work done by [@rauhul](https://github.com/rauhul) on [swift-playdate-examples](https://github.com/apple/swift-playdate-examples). Specifically, PlaydateKit was created due to the note in the swift-playdate-examples repo: \n\u003e It is not intended to be a full-featured Playdate SDK so please do not raise PRs to extend the Playdate Swift overlay to new areas.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinnvoor%2FPlaydateKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinnvoor%2FPlaydateKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinnvoor%2FPlaydateKit/lists"}