{"id":16148714,"url":"https://github.com/deevus/zig-playdate-sdk","last_synced_at":"2025-04-06T21:26:25.439Z","repository":{"id":231310706,"uuid":"780931526","full_name":"deevus/Zig-Playdate-SDK","owner":"deevus","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-07T04:29:01.000Z","size":417,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-07T05:25:24.861Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deevus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","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":null,"patreon":null,"open_collective":null,"ko_fi":"DanB91","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2024-04-02T12:40:18.000Z","updated_at":"2025-03-07T04:29:05.000Z","dependencies_parsed_at":"2024-08-03T05:22:50.055Z","dependency_job_id":"729c6837-6870-46f0-b5bb-1fc8b58f4626","html_url":"https://github.com/deevus/Zig-Playdate-SDK","commit_stats":null,"previous_names":["deevus/zig-playdate-sdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deevus%2FZig-Playdate-SDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deevus%2FZig-Playdate-SDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deevus%2FZig-Playdate-SDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deevus%2FZig-Playdate-SDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deevus","download_url":"https://codeload.github.com/deevus/Zig-Playdate-SDK/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247552785,"owners_count":20957344,"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":[],"created_at":"2024-10-10T00:34:41.011Z","updated_at":"2025-04-06T21:26:25.414Z","avatar_url":"https://github.com/deevus.png","language":"Zig","readme":"# Zig Template for Playdate\n\n## Overview\nWrite your [Playdate](https://play.date) game in [Zig](https://ziglang.org)!  Use this template as a starting point to write your games in Zig.  The `build.zig` will allow you to generate a Playdate `.pdx` executable that will work both in the simulator and on hardware.\n\n## Things To Be Aware Of\n- Not Everything Has Been Tested\n    - With `zig translate-c` and a bunch of customization by hand, I converted the C API of the Playdate SDK to Zig.  While I have battle tested a lot of the APIs in my upcoming Pictoblox game and in my [port of UPWARD](https://github.com/DanB91/Upward-for-Playdate), there is much of the API here that has not been tested -- especially, the Sprite, JSON, Synth, and Sound Effect APIs.  If something isn't working, please check against the headers in the Playdate SDK C API and make sure the APIs match. Please open a bug report if the APIs don't match.\n\n- Not Officially Supported\n    - While it works very well due to its interoperability with C, Zig is not officially supported on the Playdate.  If you are having any issues, feel free to open a bug report here.\n\n- Be Mindful Of The Stack\n    - You only get 10KB of stack space. That's it. I have not tested much of Zig's std on the Playdate, but std was not designed for a stack this small. See how far you can get, but you might want to write a lightweight \"toolbox\" library, like I did for UPWARD.  `std.fmt.bufPrintZ` works well, though!.\n\n##  \u003ca name=\"Requirements\"\u003e\u003c/a\u003eRequirements\n- Either macOS, Windows, or Linux.\n- Zig compiler 0.12.0-dev.3156+0b2e23b06 or newer. Pulling down the latest build is your best bet.\n- [Playdate SDK](https://play.date/dev/) 2.4.1 or later installed.\n\n## Contents\n- `build.zig` -- Prepopulated with code that will generate the Playdate `.pdx` executable.\n- `src/playdate_api_definitions.zig` -- Contains all of the Playdate API code.  This is 1-to-1 with [Playdate's C API](https://sdk.play.date/2.0.0/Inside%20Playdate%20with%20C.html)\n- `main.zig` -- Entry point for your code!  Contains example code that prints \"Hello from Zig!\" and an draws an example image to the screen.\n- `assets/` -- This folder will contain your assets and has an example image that is drawn to the screen in the example code in `main.zig`.\n\n## Run Example Code\n1. Make sure the Playdate SDK is installed, Zig is installed and in your PATH, and all other [requirements](#Requirements) are met.\n1. Make sure the Playdate Simulator is closed.\n1. Run `zig build run`.\n    1. If there any errors, double check `PLAYDATE_SDK_PATH` is correctly set.\n1. You should now see simulator come up and look the [screenshot here](#screenshot).\n1. When you quit out to the home menu, change the home menu to view as list and you should see the \"Hello World Zig\" program with a custom icon [like here](#home-screen-list-view).\n1. Optionally, connect your Playdate to the comupter and upload to the device by going to `Device` -\u003e `Upload Game to Device..` in the Playdate Simulator.\n    1. It should load and run on the hardware as well!\n\n\n## \u003ca name=\"Screenshot\"\u003e\u003c/a\u003eScreenshot\n\u003cimg src=\"readme_res/screenshot.png\" alt=\"isolated\" width=\"400\"/\u003e\n\n## \u003ca name=\"ListView\"\u003e\u003c/a\u003eHome Screen List View\n\u003cimg src=\"readme_res/listview.png\" alt=\"isolated\" width=\"400\"/\u003e\n\n","funding_links":["https://ko-fi.com/DanB91"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeevus%2Fzig-playdate-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeevus%2Fzig-playdate-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeevus%2Fzig-playdate-sdk/lists"}