DEV Community

Cover image for Compiling a game using the SDK
Robert Mion
Robert Mion

Posted on

Compiling a game using the SDK

In the last article, I referenced two resources that I planned to use:

SquidGod's video

  • I downloaded the SDK
  • I downloaded the Github repo

But...all these files and instructions are for a Windows PC.

I'm on a Mac.

Inside Playdate document

Section 3.3 is about compiling a game.

It references a tool called pdc that is installed with the SDK.

I figured I would try using it in my Terminal to confirm I had it.

A common action in programs is to check the version number:

> pdc --version
Enter fullscreen mode Exit fullscreen mode

I saw 1.13.0!

Success: I have and can use the necessary Playdate Compiler!

Compiling and running the Playdate Template game

Per the documentation:

  • I need to use pdc to generate a pdx folder
  • I do that by passing two arguments to pdc: 1. the source folder of the game's code, 2. a name for the pdx folder

The formula looks like this:

$ pdc MyGameSource MyGame.pdx
Enter fullscreen mode Exit fullscreen mode

Inside VSCode, from the Terminal pane, I ran this command:

$ pdc ./source game.pdx
Enter fullscreen mode Exit fullscreen mode

It successfully created the folder.

I opened it with Playdate Simulator.

I saw this:
Proof of success

I did it!

  • I used the pdc command line tool to generate an executable pdx file that opened in the Playdate Simulator!
  • I understood the official Inside Playdate documentation enough to accomplish my task!
  • I'm well on my way to writing Lua code that I can compile into simple, silly Playdate games!

Oldest comments (0)