Skip to content

Route gameWillTerminate, deviceWillSleep, deviceWillLock, and deviceDidUnlock to scene methods - #96

Open
ericlewis wants to merge 1 commit into
NobleRobot:mainfrom
ericlewis:feature/scene-lifecycle-callbacks
Open

Route gameWillTerminate, deviceWillSleep, deviceWillLock, and deviceDidUnlock to scene methods#96
ericlewis wants to merge 1 commit into
NobleRobot:mainfrom
ericlewis:feature/scene-lifecycle-callbacks

Conversation

@ericlewis

Copy link
Copy Markdown

Closes #55.

Routes playdate.gameWillTerminate(), playdate.deviceWillSleep(), playdate.deviceWillLock(), and playdate.deviceDidUnlock() to same-named methods on the current scene, mirroring the existing gameWillPause()/gameWillResume() pattern:

  • Noble.lua defines the four SDK callbacks and forwards to Noble.currentScene():<method>().
  • NobleScene gains documented no-op defaults, including a note about the OS's ~10-second watchdog for gameWillTerminate().
  • Noble.Bonk gains matching debug checks (same as the existing gameWillPause/gameWillResume checks) so games that define these SDK callbacks manually get a warning instead of silently overriding the engine's routing.

Source LDoc comments are in place; I left the generated .docs HTML out of this PR to avoid churn — it'll regenerate on the next docs build.

🤖 Generated with Claude Code

…idUnlock to scene methods. (upstream issue NobleRobot#55)

Mirrors the existing gameWillPause()/gameWillResume() pattern: each SDK
lifecycle callback calls the same-named method on the current scene, with
documented no-op defaults in NobleScene and matching debug bonk checks in
Noble.Bonk for games that define these SDK callbacks manually.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for cheery-choux-736619 ready!

Name Link
🔨 Latest commit 66d23ae
🔍 Latest deploy log https://app.netlify.com/projects/cheery-choux-736619/deploys/6a7af310c8e11900086be0a3
😎 Deploy Preview https://deploy-preview-96--cheery-choux-736619.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Add support for terminating/locking/unlocking/sleep callback

1 participant