Skip to content

Calibrated Curling Physics Update#60

Open
LrWm3 wants to merge 3 commits intomainfrom
curling-physics-update-18093505600013104836
Open

Calibrated Curling Physics Update#60
LrWm3 wants to merge 3 commits intomainfrom
curling-physics-update-18093505600013104836

Conversation

@LrWm3
Copy link
Copy Markdown
Owner

@LrWm3 LrWm3 commented Feb 22, 2026

Implemented a new, more realistic physics model for the curling game.
The update includes:

  • New constants in DEFAULT_PHYSICS: curl_decay, pivot_bias, and lateral_mult.
  • Updated existing constants: mu_0, A, spin_rate, restitution, and stone_friction.
  • A completely rewritten Stone.step(dt) method using a 20-point integration model.
  • Improved state initialization to handle existing user data in localStorage.
  • Verified the changes visually and functionally using a Playwright script.
  • Removed accidental server.log file before submission.

PR created automatically by Jules for task 18093505600013104836 started by @LrWm3

Updated curling physics to use a 20-point integration model that decouples
Total Friction from Curl Asymmetry. Introduced new tuning constants:
- curl_decay: Controls curl drop-off at high speeds
- pivot_bias: Front-to-back friction difference
- lateral_mult: Multiplier for rotational influence

Updated DEFAULT_PHYSICS constants and ensured state initialization merges
with localStorage to support returning users. Verified via Playwright.

Co-authored-by: LrWm3 <9008889+LrWm3@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Feb 22, 2026

Deploying lrwm3g with  Cloudflare Pages  Cloudflare Pages

Latest commit: 68ecc33
Status: ✅  Deploy successful!
Preview URL: https://cbfeefe3.lrwm3g.pages.dev
Branch Preview URL: https://curling-physics-update-18093.lrwm3g.pages.dev

View logs

google-labs-jules bot and others added 2 commits February 22, 2026 17:32
…lity fixes

Updated curling physics to use a 20-point integration model that decouples
Total Friction from Curl Asymmetry.

Key changes:
- Introduced new tuning constants: `curl_decay`, `pivot_bias`, and `lateral_mult`.
- Updated existing physics constants to new calibrated defaults.
- Rewrote `Stone.step(dt)` to use the new physics model.
- Added stability fixes to the physics model:
    - Ensured friction coefficient `mu` is non-negative.
    - Implemented a friction clamp to prevent velocity overshoot at large time steps.
- Updated React state initialization to merge defaults with localStorage.

Verified that stones stop correctly within a few seconds after delivery.

Co-authored-by: LrWm3 <9008889+LrWm3@users.noreply.github.com>
…s and spin decay

- Implemented the 20-point friction integration model.
- Added tuning constants: curl_decay, pivot_bias, lateral_mult.
- Fixed the stopping issue with a friction clamp.
- Fixed curl direction: Clockwise spin now correctly curls Right.
- Fixed spin decay: Friction now correctly opposes rotation.
- Updated React state to handle localStorage migration.
- Verified with Playwright screenshots.

Co-authored-by: LrWm3 <9008889+LrWm3@users.noreply.github.com>
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