Pocket Putt Islands
- Author
- claude-code @ auraAgent
- Opened
- Nov 16, 2026
- From
- fix/flickshot-pointer-space-1.2.2
- Into
- main
- Merged
- Nov 16, 2026
Bug (reported from Chrome on a desktop): the title and PLAY worked, but a mouse drag from the ball did nothing; the game behaved as if the cursor were up and to the left of where it was. Cause: 1.2.1 multiplied every pointer position by the measured screen ratio (getViewportSize / displayed size = the render scale), but a browser delivers the mouse already in the projection's pixels (as Zin.state.mousePosition documents), so the press landed short of the ball. The Android app delivers touch and mouse in displayed pixels (checked: Zin.touch and the mouse read (865,640) for a window press at (900,900) with the viewport at (35,260)), so builds really differ.
Change (input.module): measuredScale() now reads the pointer space from the engine's own pointer->UI mapping: ui.fromViewport over two probe points, carried into projection pixels by getViewportSize()/ui.screenSize(); both axes must agree. On this tablet: 0.7595 (render scale 0.76), unchanged behaviour. Fallbacks: the 1.2.1 screen ratio, then a render-size call, then the render scale. New retryPick(): a press that grabs nothing at that scale is retried with the raw position and with the render-scaled one; whichever lands on the player's own ball is kept for the session (learnedMode, pointerScaleSource 'learned').
Tests: 4 new (live fromViewport measurement equals measuredScale; browser-style mouse in projection pixels grabbed via retry and learned 'unscaled'; display-pixel touch learned 'renderScale'; a miss teaches nothing). Suite 38/38.
Docs: README section + 1.2.2 notes, both guides (mouse in a desktop browser at any window size). Game: pocketPutt 0.7.3 pins flickShot 1.2.2 and fixes the rail/bumper knock (it read velocity via component.get(Physics), which threw on every contact; now Physics.getVelocity).
15 files changed
- ChangedflickShot.packageFolderBeforeAfter
- ChangedflickShot.package/README.md15.4 KB → 16.6 KBBeforeAfter
- ChangedflickShot.package/flickShot.testSuiteFolderBeforeAfter
- ChangedflickShot.package/flickShot.testSuite/init.luau29.4 KB → 32.2 KBBeforeAfter
- ChangedflickShot.package/guides/example-build-a-paper-toss-game-with-drag-to-shoot.guideFolderBeforeAfter
- ChangedflickShot.package/guides/example-build-a-paper-toss-game-with-drag-to-shoot.guide/guide.md7.9 KB → 8.0 KBBeforeAfter
- ChangedflickShot.package/guides/how-to-add-drag-to-shoot-slingshot-controls-to-my-game.guideFolderBeforeAfter
- ChangedflickShot.package/guides/how-to-add-drag-to-shoot-slingshot-controls-to-my-game.guide/guide.md7.2 KB → 7.4 KBBeforeAfter
- ChangedflickShot.package/input.moduleFolderBeforeAfter
- ChangedflickShot.package/input.module/init.luau15.6 KB → 18.7 KBBeforeAfter
- ChangedflickShot.package/package.yaml1.5 KB → 1.5 KBBeforeAfter
- ChangedpocketPutt.packageFolderBeforeAfter
- ChangedpocketPutt.package/package.yaml389 B → 389 BBeforeAfter
- ChangedpocketPutt.package/ui/ScreensHost.componentFolderBeforeAfter
- ChangedpocketPutt.package/ui/ScreensHost.component/init.luau16.3 KB → 16.5 KBBeforeAfter
Checks
From the author and the world's members
- Passedtests38 passed, 0 failed, 0 skipped. Suites: flickShot
Reviews
No reviews yet.
Conversation
- claude-code @ auraAgentNov 16, 2026
Review (author, so posted as a comment): read the diff. measuredScale now reads the pointer space from ui.fromViewport (the engine's own pointer->UI mapping) carried into projection pixels, so a browser mouse already in projection pixels measures 1 and is no longer pulled up-left; on the tablet it measures 0.7595 (unchanged). retryPick only acts when a press grabbed nothing, only keeps a space that lands on the player's own ball, and never runs under a pinned scale. Suite 38/38 posted. Game pin 1.2.2 and the knock fix ride along. Merging by fast-forward.
Sign in to comment or review.