Is there a way to target the Playdate device (not Simulator) using Nova?

Title says it all... Nova makes things easy for launching the Mac simulator, but there doesn't seem to be a way to target the Playdate itself and generate a .pdx for the device hardware.

Or do I need to install XCode, cmake and etc. by hand and then ? I got all spoiled by how easy Nova made things for the Simulator, so hoping not :slight_smile: .

Edit: I don't have a physical playdate yet, but know folks who do. Trying to figure out the best way to generate a C-API .pdx that will run on the Playdate hardware (pure Lua was much more straightforward :wink: ).

Edit edit: I'm ancient-unix-savvy, but not Linux or Mac-savvy, for context.

Edit^3: I suppose I could use the Windows toolchain (Nmake, etc.) but I'm trying to get end-to-end familiar with Playdate devstuff on both Windows and Mac (Linux maybe later).

For Lua projects, the Simulator build is the same as the Device build so Nova works without changes.

For C projects, you can, but you'd need to use a build script to build it. Basically you'd be triggering a Make or CMake file from within Nova. You'd need to install all the regular dev tools that come with Xcode, etc to get a C compiler among other things.

I seem to recall that the Nova installation went off and grabbed a C compiler as part of that process... and I can build a C-API project from within Nova already, so I suspect there must be one in there somewhere (at least for the MacOS Intel compiler that builds the dylib for the MacOS Simulator ;). But yes, you're probably right, it looks like I'd have to grab/install/tweak the ARM cross-compile toolchain somehow for Mac (something I've already done on the Windows box).

Thanks for the clarification!

The Simulator installer installs the ARM toolchain already, it may also install gcc as well...I'm not 100% sure on that. Nova doesn't install gcc, I do know that. :slight_smile:

One of them thar installers put GCC on there (but I installed first the Simulator and then Nova in fairly quick succession, so I'm likely having a 'senior moment' regarding which did what). :slight_smile:

For C projects, on macOS, you'll need a small Makefile like the one in this project and then set the toolchain for the Playdate Simulator to Nova to Make (Lua + C):

Hope this helps.

I'm already building ok on MacOS (my Makefile is pretty much the same as you're using). What I was hoping for was a similar 'easy mode' in the Nova UI for building a release for the Playdate hardware itself.

Thanks for the Makefile pointer, though, this line in particular:

# Make sure we compile a universal binary for M1 and Intel macs
DYLIB_FLAGS+=-arch x86_64 -arch arm64

That piece I didn't have (thus, I think, requiring Rosetta on my M1 Mac before things would run).

What I was hoping for was a similar 'easy mode' in the Nova UI for building a release for the Playdate hardware itself.

It sounds like you already have something for building (Make (Lua + C)) in Nova but what you're looking for is how to launch it directly on device maybe?


Ex: I have a friend who (lucky!) actually already has a Playdate. They've been running my Alpha releases (pure Lua to this point) off and on, and things are working well.

But now, I'm adding C-API libraries (playbox2d and the SDK's 3DLibrary) to my Playdate project so I'm no longer in pure-Lua-land.

So, if I want to send my friend my next Alpha point release, I have to build a C-API .pdx that will actually run on the Playdate hardware - and send it to them so they can sideload it.

I also dabble in Unreal Engine development, and the Unreal Engine IDE can target various platforms for deployment (UE4 UI example):

What I was hoping for would be some sort of equivalent in the Nova UI (mockup):

I'm fairly confident I can do this from either Windows or Mac using command-line tools, but I was hoping that this (seemingly obvious?) capability would already integrated into Nova via extension and I was just missing something :slight_smile: .

I think it was mentioned above but the way you have it setup, the .pdx already has both simulator code and playdate code. If you right click on the pdx file and select Show package content you will see both the dylib for macOS and bin for the Playdate hardware.

So what is missing for your mockup is the ability to launch on device after building. There are some solutions for this here but I agree, it should be added directly in the Nova extension together with the option to build in Release i.e. without Simulator binaries and without debug info.

1 Like