Trouble running game on device even though it works in simulator


I recently finished my first playdate game and it works completely fine in simulator (I'm on Mac). I've tried to use the MacOS "compress" option to make the .pdx a .zip and sideload it through the website, but it was giving me a download error. I also tried sideloading it using a usb-c connection and the simulator, but it also gives me an error. It seems to be some problem with my images not making the switch to device. Every single image I have is causing assertion failure errors, yet everything works great in simulator. What would you suggest I do to fix it?

The error I'm getting:
sceneController.lua:20: assertion failed!
stack traceback:
[C]: in function 'assert'
sceneController.lua:20: in function 'setBackground'
sceneContoller.lua:35: in function 'setStartingScene'
main.lua:29: in main chunk

Can you please try the following:

  1. Delete game from device
  2. Connect device by USB
  3. Wake up device
  4. Run game in Simulator
  5. Choose option to send game to device (I use the menu on the tiny device button in the simulator, or press Cmd+U)

If it works I'll explain what's happening. If not, we can try other things.

I got the same issue again


It would be useful to see a line of code showing how you're loading an image?

And can you please show the structure of your project folders?

Finally, how are you compiling the project?

Code to load image:

Project Folders:

I'm compiling my project by using the option "Run App in Playdate Simulator"

Have you tried removing the colon from the directory name?

Yes, it makes the game not work in the simulator

Did you remove the colon in the filesystem and the code?


I thought I had, but there was one I forgot and that fixed it. Thanks for the help!