If you see Terminal respond with a path similar to the one above, things are working well.
Step 3 - Pick a Starter Game
Playdate SDK comes with a suite of fantastic examples. For this example, I will pick the "Asteroids".
Change the directory to the game.
Step 4 - Create two Convenience Shell Scripts
These are two shell scripts I recommend creating. They make it easier to compile and test without having to remember a bunch of commands.
4.a - Create a Compile Script
In the Asheteroids directory, create a new file named compile.sh and paste a Playdate-specific command.
echo "pdc Source ./main.pdx" >> compile.sh
The command above will run the pdc executable, look within the Source directory for the default main.lua file, and create a game file named main.pdx in the same directory as the compile script.
Run the shell script. We explicitly add ```/bin/ssh `` to minimize any unexpected issues from the Terminal.
4.b - Create a Test Script
Like 4.a, let's create a test.sh script.
echo "open -a ~/Developer/PlaydateSDK/bin/Playdate\ Simulator.app ./main.pdx" >> test.sh
Run the script.
Step 5 - Adding Game Metadata
Create a new file within the Source directory.
Edit and paste your metadata into pdxinfo.
name=My First Game
description=My First Game
You can see the data inputed within the Metadata menu within the simulator.
Step 6 - Review Your Work
Step 6.a - Review your Metadata via "Show Package Contents"
Compile your project.
/bin/sh ./compile.sh && /bin/sh ./test.sh
Then inspect your .pdx file to verify things are looking good.
Step 6.b - Test Game in Simulator
If you want to see your game in a different way within the Simulator, copy the game into the SDK then turn on the simulator again.
cp ./main.pdx ~/Developer/PlaydateSDK/Disk/Games/
Step 6.c - Test Game on Physical Device
With your simulator open, plug-in your physical device and you will notice a new menu option to upload your game.
Step 6.d - Test Physical Game on Computer Screen via Mirror
Aside from Simulator, Panic also offers Mirror, a piece of software that allows you to mirror your physical device back to your computer monitor. This is useful when trying to take a video capture for promotional purposes.
If you happen to get a Permission denied while trying to run the shell scripts, changing the permissions to make it executable will likely fix the issue.
Make compile.sh executable.
chmod +x compile.sh
Make test.sh executable.
SquidGod has a collection of fantastic videos I highly recommend watching. I appreciate the efforts he's making to empower the Playdate developer community.
The link has been copied!
Others from playdate
Subscribe to new posts
Processing your application
Please check your inbox and click the link to confirm your subscription
There was an error sending the email
You’ve successfully subscribed to Chris Mendez
Welcome back! You’ve successfully signed in.
Great! You’ve successfully signed up.
Success! Your email is updated.
Your link has expired
Success! Check your email for magic link to sign-in.