Skip to content

fix(determinism): remove FMA drift from gameplay helpers - #2745

Open
houko wants to merge 1 commit into
mainfrom
fix/issue-2732-determinism
Open

houko wants to merge 1 commit into
mainfrom
fix/issue-2732-determinism

Conversation

@houko

@houko houko commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

What changed

Remove arm64 fused multiply-add and architecture-dependent math from the deterministic gameplay helpers named by #2732: random ranges, spawn ring positions, loot soft-pity weights, and spatial circle queries.

The change routes arithmetic and trigonometry through internal/detmath, adds a fixed-seed golden covering all four packages, and adds an arm64 objdump guard for the linked helper code. English and Chinese determinism docs, a changelog fragment, and an implementation note are included.

Verification

  • go tool nsgo test ./internal/detmath ./pkg/random ./pkg/spawn ./pkg/loot ./pkg/spatial -count=1
  • go tool nsgo check
  • go run ./tools/changelog check
  • bun run verify-notes

@houko
houko force-pushed the fix/issue-2732-determinism branch from 8c2681a to a399855 Compare December 1, 2026 05:52

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant