DEV Community

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

Posted on

2

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!

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay