I have installed the Playdate SDK on my Windows 10 laptop, and I'm trying to open one of the pre-installed example games in the Playdate Simulator, but I keep getting this message:
This is where the example game I'm trying to open is located:
In the Playdate SDK folder, as shown in the image above, it's located in the "Examples" folder.
Anybody know how to convert an example game into a PDX game to be played in the simulator?
You have to compile the examples with
pdc (Playdate Compiler). Open a console (type
cmd in the address bar) and if your %PATH% variable is set up correctly, you should be able to run
pdc and get a
If your PATH is not set,
pdc is located in the
bin folder of the SDK.
For single file examples, you have to run
pdc -m NameOfTheLuaFile.lua.
Thank you for the information, hopefully it helps, I'll try it out
I just tried to use pdc as a %PATH% variable on my Windows 10 PC, and I tried to use
pdc -m NameOfFolder, but it didn't work because the console said that pdc is not recognized as a command. What should I do?
-m option only work for single file examples, not for folders.
If Windows tells you that
pdc is not a recognised command, then it means that your
PATH does not contains the folder
bin from the SDK.
For now, try to launch
pdc using its relative path.
First, enter the folder of example you want to build with
C:\PathToTheSDK\Examples> cd "Level 1-1"
pdc with the name of the folder containing the main Lua file (here it is "Source"):
C:\PathToTheSDK\Examples\Level 1-1> ..\..\bin\pdc Source
Unrecognized file types are copied by default. Use the -k or --skip-unknown flag to skip these files instead.
You should now have a
pdx folder named
C:\PathToTheSDK\Examples\Level 1-1> dir
29/07/2023 11:29 PM <DIR> .
29/07/2023 11:29 PM <DIR> ..
29/07/2023 11:29 PM <DIR> Source
29/07/2023 11:29 PM <DIR> Source.pdx
29/07/2023 11:29 PM 20,592 bytes level.tmx