Mac OS 15.5
SDK 3.0.1
Steps to reproduce
- Load pdx in Simulator
- Encounter an error within the game
- There’s an error in the console logs
- The simulator pauses
- Press “Restart“ button (or cmd+r, or Playdate > Reset from the menu bar)
Expected:
- Game refreshes from it’s initial, boot state
Actual
-
Simulator throws an error:
-
Need to go to `File > Open Recent` to perform the “reset“ instead
Here’s the console log output - I placed an error early in my game to reproduce:
11:43:45 AM: Loading: /Users/me/projects/playdate/tutorial/tutorial.pdx/
Loading C API Library: /Users/
me/projects/playdate/tutorial/tutorial.pdx/pdex.dylib
Update error: menu.lua:76: attempt to perform arithmetic on a nil value (field 'bar')
stack traceback:
menu.lua:76: in field 'update'
menu.lua:266: in field 'updateMenu'
main.lua:228: in function <main.lua:224>
11:43:46 AM: Update failed, simulator paused.
11:44:21 AM: Loading: /Users/me/Developer/PlaydateSDK/Disk/System/Launcher.pdx/
I am a hybrid with lua & C.
Here’s my Makefile:
HEAP_SIZE = 8388208
STACK_SIZE = 61800
PRODUCT = tutorial.pdx
# Locate the SDK
SDK = ${PLAYDATE_SDK_PATH}
ifeq ($(SDK),)
SDK = $(shell egrep '^\s*SDKRoot' ~/.Playdate/config | head -n 1 | cut -c9-)
endif
ifeq ($(SDK),)
$(error SDK path not found; set ENV value PLAYDATE_SDK_PATH)
endif
# List C source files here
SRC = src/main.c
SRC += src/he_api.c
SRC += src/he_prv.c
SRC += src/he_foundation.c
SRC += src/he_bitmap.c
# List all user directories here
UINCDIR =
# List user asm files
UASRC =
# List all user C define here, like -D_DEBUG=1
UDEFS =
# Define ASM defines here
UADEFS =
# List the user directory to look for the libraries here
ULIBDIR =
# List all user libraries here
ULIBS =
override LDSCRIPT=./link_map.ld
include $(SDK)/C_API/buildsupport/common.mk
OPT = -O2 -falign-functions=16 -falign-loops=32 -fomit-frame-pointer
I am building with:
pdc source tutorial.pdx
And yes, my game is still in a folder call “tutorial“ cause I have been too lazy to change it ![]()
