Zeit
Zeit is a simple timer for the Playdate game console.
It was built as a weekend project after seeing the Byte-sized Swift: Building Tiny Games for the Playdate blog post on swift.org.
Since working on my side projects Pagi and Kompressor I learned to love Swift and was intrigued by the idea to use the language to build something for my Playdate. Additionally, I was eager to learn how to use the language in a different context than building apps for Apple's platforms.
At the time, I was traveling through Germany with my partner and didn't spend much time on my computer. In the little time I had, I was working on Futureland, so this had to be a short weekend project.
Luckily, some people in my Mastodon circle were writing about building Playdate projects using Swift around the same time, which helped with inspiration and problems that came up.
As I started with the Playdate example project from Swift's website, I realized that I had to learn more about Playdate's C API and how Swift interoperates with C. The example project didn't include a lot of the methods I needed to pull off this project, so I learned how to use some of the missing C interfaces in my Swift code. After some discussion on Mastodon, I learned about PlaydateKit, which already included most of the functionality I needed and made the existing C to Swift interface more enjoyable to use.
Working on this project was very different from my usual work on apps and websites because Playdate's API is designed to build games and not applications. There is no GUI library, and every element had to be built from scratch, which was a lot of fun. After I was done with the UI, I looked for some fun sound FX to give the experience more juice.
The only thing I’d like to improve is the screen after the alarm got triggered. Currently, it only shows the word ‘Alarm’ and plays music, but I want to show some nice space themed animation and artwork.
The timer is simple, you can set hours, minutes, and seconds by using the arrow keys or the crank. You can start the timer by pressing (a) and cancel the timer by pressing (b). While the timer is active, the Playdate won’t go into standby mode and keep the timer in the foreground. The display only gets updated once a second to preserve as much battery as possible.
You can download the latest version from here: Zeit.pdx.zip