How do you use the Windows SDK tools?

One of our team members needs to switch over to Windows. I don't have a Windows machine at the moment so I can't test this stuff right now. We downloaded the SDK, but there appears to be zero info in the readme or anywhere else on how to use these tools. Double-clicking doesn't seem to do anything. Are they command line tools? If so, what are the commands?

Anybody who has built and uploaded a game from Windows, any help is appreciated!

@nick_splendorr The Windows SDK is kind of primordial at the moment and hasn't gotten much attention. @stevenf built the tools that are in there and can provide the best guidance until we upgrade that kit in the near future.

We'll provide a better README for the next release at the very least.

1 Like

Cool! I've seen some folks talking about using them, but understand they're unfinished. @stevenf, could you let us know how to compile a project and upload it to a Playdate over USB?

Hey, hopefully I can help a bit! They're command line tools. I recommend adding the /bin/ file to your PATH in the Windows environment variables, then you can open a command line and type pdc help for some info on how to build a pdx file. This shows:
usage: pdc [-s] [-u] -sdkpath <sdk-path> <input-folder> <output-folder>
input: folder containing scripts and assets
output: folder for compiled package (will be created)
-s: strip debug symbols
-u: don't compress output files

Use pdutil to sideload pdx files.
Usage: pdutil <action> [options]
datadisk - Mount Playdate data partition
install <pdx-path> - Install .pdx to device
recoverydisk - Mount Playdate recovery partition
run <path> - Run .pdx from device's data partition

1 Like

davemakes beat me to it! That's basically the rundown. They are command line tools and show help when run without arguments.

The Windows simulator is nearly done, but I don't think it was included with the current SDK version. We will try to get it out soon!

So:

pdc -sdkpath c:\whatever\playdatesdk MyCoolGame MyCoolGame.pdx

...will compile everything in the MyCoolGame folder (which should contain main.lua at its top level) and spit out a MyCoolGame.pdx folder, suitable for use in simulator or device.

pdutil install MyCoolGame.pdx

...will install the compiled game to a USB-connected Playdate.

3 Likes

Thanks, y'all! This is great. We'll test it tonight!

Hey all,
I'm on Windows as well. I can successfully compile and install examples, but my device is still on an old version (<0.9.1). Is there a non-simulator alternative for updating the device? I see the Updating Your Device to 0.10.0 link in the SDK announcements, but it leads me to "That page doesn’t exist or is private".

If it's easier that I sit tight for the simulator's Windows release (or I can grab a spare machine from the office), that's totally fine too!

Edit: I've followed the instructions in the latest Announcement, and have been able to update!

Is this Windows SDK to be the Linux SDK via Wine?

Or is there something bespoke coming for Linux?

Our musician is Linux-based and looing forward to getting stuck into the synth options.

Following up! We were able to use pdc to build our project on Windows from the command line. Our team member, being less familiar with command line tools, didn't realize at first that the source and destination options needed to be relative to the current folder, or full file paths. It's always interesting to see what someone does with instructions and their assumptions.

Then we ran into a problem where pdc threw an error about our pdxinfo's bundleID. It said we needed to use reverse DNS style, which we definitely are: bundleID=com.teambottle.ProjectBottle. We even replaced it with the example, com.panic.b360, but it wouldn't build. we tried a bunch of variations, until we finally just deleted the bundleID line. Then it built just fine :upside_down_face:

However, we weren't able to use pdutil to install the project, because Windows insisted on connecting the Playdate as a USB device every time it plugged in. If we manually ejected the Playdate as a disk, then ran pdutil install game.pdx, Windows would reconnect as a USB disk, and pdutil threw an error about the device not being available. We went through several steps to disable automount, scrub the history of automounts, etc, but couldn't get Playdate to stop connecting as a disk... so ultimately we decided to just replace the .pdx folder in the Games/ directory manually! That works well enough for now.

I couldn't find this anywhere: how does someone on Windows update their device to the new 10.0 firmware?

1 Like

Hi Steven,

May I know roughly how to deploy to Windows simulator if the game is written totally in C language ?

Please advise.

There should be an HTML file in the SDK that shows how to use tools such as CMake for Playdate. I'm on my phone right now, but if you set that up properly you should be able to just build to a .pdx and install as usual.

Hello!
I also am working on Windows environemtn.
I also found that deleting the buldleID line is only the way to eliminate that error.
I did not have auto mount problem by somehow. I am using FW with SDK v0.10.1.

Our C tooling for Windows is not complete yet. A Windows simulator capable of running Lua games should ship with the next SDK, I think.

There is a known bug in the current Windows version of pdc that requires the pdxinfo file to have Unix (LF) line endings, or the bundleID cannot be parsed properly. Hope to address this soon.

That seems like the trick. I successfully could compile with using LF instead of CR+LF.

I also am looking forward to get C tool! (And simulator :slight_smile: )

Hi Steven,

"A Windows simulator capable of running Lua games"

  • can a 100% C language generated game running under Windows simulator ?

...or are you referring the next release of PlaydateSDK Windows Simulator only can run LUA created games ?

Please advise.

The initial release of the Windows simulator will likely only support 100% Lua games, but we'll keep working on it.

Actually having some issues with it myself - I'm getting "System.IO.IOException: The device is not ready." when I use pdutil install.