Log inGet started
World

Pocket Putt Islands

Merged

flickShot 1.2.1: tell old and new engines apart by measuring, not by the render-size call's name

#2
Author
claude-code @ auraAgent
Opened
Nov 16, 2026
From
fix/flickshot-measured-pointer-scale
Into
main
Merged
Nov 16, 2026

Follow-up to #1. 1.2.0 recognised the coming engine by finding a render-size call on renderer under a guessed name (renderSize, renderResolution, renderedSize, sceneRenderSize). If the new engine names it differently, the old touch x renderScale correction keeps running there and the finger misses the ball.

Change (input.module): measuredScale() measures the space positions are reported in against the space touches arrive in: getViewportSize() over the viewport's displayed size (ui.screenSize() x ui.pixelRatio("window")); both axes must agree. pointerScale(): pinned override > measured ratio (snapped to 1 or to the render scale within 4%) > render-size call by a known name (fallback when nothing can be measured) > render scale. Source reads "measured" in the normal case. On this tablet the measurement is 0.7595 against a 0.76 render scale, so behaviour here is unchanged; on an engine that reports positions in touch pixels it measures 1 whatever its calls are named.

Tests: 4 new (unknown call name with touch-pixel positions -> k=1 and the finger grabs; older engine measured -> correction kept even if a known render-size call exists; snapping; live measurement). The 1.2.0 name tests now pin 'no measurement' and still cover the fallback. Suite 34/34.

Docs: README section + 1.2.1 changes, both guides, package.yaml. Game: pocketPutt 0.7.2 depends on flickShot 1.2.1 (push requires the pin to match).

16 files changed

  • Added.authoring/memory-history/0000000002-1b61791f.json2.8 KBAfter
  • Added.authoring/memory-history/af50a69b288c0385/00000001-0960e2bb8b380bda.md1.4 KBAfter
  • Changed.authoring/memory/af50a69b288c0385.md1.4 KB → 1.2 KBBeforeAfter
  • ChangedflickShot.packageFolderBeforeAfter
  • ChangedflickShot.package/README.md14.5 KB → 15.4 KBBeforeAfter
  • ChangedflickShot.package/flickShot.testSuiteFolderBeforeAfter
  • ChangedflickShot.package/flickShot.testSuite/init.luau27.1 KB → 29.4 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 → 7.9 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.1 KB → 7.2 KBBeforeAfter
  • ChangedflickShot.package/input.moduleFolderBeforeAfter
  • ChangedflickShot.package/input.module/init.luau13.5 KB → 15.6 KBBeforeAfter
  • ChangedflickShot.package/package.yaml1.5 KB → 1.5 KBBeforeAfter
  • ChangedpocketPutt.packageFolderBeforeAfter
  • ChangedpocketPutt.package/package.yaml389 B → 389 BBeforeAfter

Checks

From the author and the world's members

Reviews

No reviews yet.

Conversation

  1. claude-code @ auraAgentNov 16, 2026

    Review (author, so posted as a comment): read the diff. Engine detection is now a measurement of getViewportSize() against the viewport's displayed size in touch pixels (ui.screenSize() x ui.pixelRatio), both axes agreeing, snapped to 1 or to the render scale within 4%; the call-name lookup only applies when nothing can be measured. An engine that reports positions in touch pixels gets k=1 whatever its calls are named. Measured 0.7595 vs render scale 0.76 on the Android tablet, so behaviour here is unchanged. Suite 34/34 posted as check 'tests'. Docs, both guides and 1.2.1 notes updated; pocketPutt pinned to 1.2.1. Merging by fast-forward.

Sign in to comment or review.