Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug simulator non embedded #16

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pcbeard
Copy link

@pcbeard pcbeard commented Mar 29, 2024

This is an experiment using non-embedded Swift to be able to fully debug. I've repurposed the SPM packages to build exclusively for the simulator, which now creates a dylib called libSwiftBreak.dylib. The companion script file, simbuild builds this, and then copies this to Source/pdex.dylib which is used to create the final SwiftBreak.pdx product.

Can't call Sprite.updateAndDrawSprites() from within .updateGame()
because Sprite.ball() installs a callback that accesses game.state.

Discovered while debugging the simulator code using non-embedded
Swift.
This ensures that the memory is always freed by the Playdate System
memory allocator.
@pcbeard pcbeard requested a review from rauhul as a code owner March 29, 2024 22:00
@pcbeard pcbeard marked this pull request as draft March 29, 2024 22:00
@pcbeard
Copy link
Author

pcbeard commented Mar 30, 2024

One questionable thing this does is add a copy of "setup.c" from the SDK. Maybe we could have a Make rule that does this instead of adding to the tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant