Skip to content

Show a big roll's tail faster as its dice are read - #373

Merged
drehtuer merged 1 commit into
mainfrom
feature/quicker-tail
Oct 4, 2026
Merged

drehtuer merged 1 commit into
mainfrom
feature/quicker-tail

Conversation

@drehtuer

@drehtuer drehtuer commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Owner feedback: 100d4 takes a long time to settle. Of the options offered (faster tail, fewer cocked d4s, chase the rare give-up), the owner chose A, the faster tail.

Measured on the Pixel 10a (tools/harness.sh -n 200 -c 100 -s d4, main at #372):

  • median settle 1.29 s, p99 3.09 s of simulated time;
  • 1 roll in 200 gave up;
  • 3.07 % of dice re-thrown.

At the watched pace of 0.4, that is 3.2 s and 7.7 s to watch. Nearly all of the tail is a few dice rocking among ninety still ones.

Change (decision 88): for a roll of 10 dice or more, RollPace.paceFor climbs from the watched 0.4 to real speed as the share of unread dice falls:

unread share pace
≥ 25 % 0.4 (watched)
25 % → 10 % straight line
≤ 10 % 1.0 (real time)
  • The climb is gradual, so it doesn't read as a dropped frame.
  • It never passes real speed, so the last dice still move like dice.
  • It only decides when steps are taken: faces, fairness and goldens are unchanged.
  • Rolls under 10 dice keep 0.4 to the end, because there the last die tumbling is the roll.
  • TrayLoop passes unsettled.size and the dice count to secondsFor.

Docs:

  • docs/physics-and-rendering.md, "The simulation clock": replaces the old "one constant, no easing" paragraph.
  • Decision 88, which refines 65.
  • TODO 5.3: the 100d4 item carries today's phone numbers and names cocked d4s as the next step.
  • TODO 5.6: a phone check for the faster tail.

Tests:

  • RollPaceTest: small rolls unaffected, the quarter and tenth bounds, a monotonic line within [0.4, 1.0], a hand or a long roll still wins.
  • TrayLoopTest: a 100-die roll with 5 still moving is advanced at real time through the real frame path.
  • :simulation:api and :render:filament unit tests, ktlint, detekt and the docs checks pass.

Judge on the phone: does the end of 100d4 and 40d6 speed up smoothly and feel short enough now, while 1d20 and 5d6 still feel unhurried?

Based on main (#372).

🤖 Generated with Claude Code

On the Pixel 10a 100d4 settles in a median 1.29 s and a p99 3.09 s of
simulated time, which at the watched pace of 0.4 is 3.2 s and 7.7 s on the
screen, nearly all of the tail a few dice rocking among ninety still ones.

For a roll of ten dice or more, RollPace.paceFor now climbs from the
watched pace to real speed as the share of unread dice falls from a
quarter to a tenth. It only decides when steps are taken, so faces,
fairness and goldens are untouched. Smaller rolls keep 0.4 to the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Oct 4, 2026

Copy link
Copy Markdown

@drehtuer
drehtuer merged commit c39285a into main Oct 4, 2026
11 checks passed
@drehtuer
drehtuer deleted the feature/quicker-tail branch October 4, 2026 14:05
@drehtuer drehtuer mentioned this pull request Oct 4, 2026
drehtuer added a commit that referenced this pull request Oct 4, 2026
Bumps `version.txt` from 0.1.1 to **0.2.0**, so the `v0.2.0` tag and the
APK it builds agree (`release.yml` refuses a tag that disagrees). README
and STATUS name the release.

**Why 0.2.0:** many new features and no breaking change to saved data.
- The face designer's drafts move to format 2, but format 1 is still
read and carried across.
- An older build cannot open a format-2 draft. That is a downgrade,
which semver does not promise.

**Checks:** `:app:assembleRelease` passes R8 locally; `markdownLint` and
`verifyDocsLinks` are clean.

**After merge:** I tag the merge commit `v0.2.0` and push the tag. That
runs the full check suite and publishes the signed
`dInfinityApp-0.2.0.apk` with its SHA-256.

### What's in it since v0.1.1
- **Rolling**
  - Only a shake starts a roll.
  - Waiting dice drop onto the board under real physics, from one spot.
  - A livelier tumble, watched at a 0.4 pace.
  - A big roll's tail is shown faster.
  - The wrist's swing no longer pushes the dice to the top of the tray.
- **Stuck and picked dice**
- Cocked dice wait for your shake, with an accent prompt over the tray.
  - Pick a landed die and shake to throw just that one.
- **Roll screen**
  - Controls fold away after a throw.
  - A double tap clears the table.
  - The formula field has a ×.
- **Startup:** a cold start shows the tray in 0.8 s instead of 9.9 s.
- **Face designer**
  - Clear face.
  - More than one personal set.
  - d10/d18 drawings fit their faces.
  - *Roll it* throws the drawing as it is now.
- **Rendering**
  - Prefiltered reflections.
  - The tray's corners are fillets, not posts.
  - Table thumbnails the right way up.
  - The frame rate on the debug overlay.
- **Notation and statistics**
  - Braced notation for a set's own dice.
  - Faces named by their label.
  - The saved-rolls list scrolls while dragging.
- **Fixes**
  - A roll that gives up no longer takes the app with it.
  - Fudge totals keep their sign.
  - The SonarQube gate is green again.

Based on `main` (#373).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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