Files
Space-Game/apps/game
francy51 ce631b00f1 fix(galaxy): ensure spiral arms are always visible
Three fixes for circular/non-spiral galaxies produced by Randomize:

1. Raise twist range from [1.0, 6.0] to [4.0, 18.0] radians
   - Old max (~0.95 turns) could barely curve; new range covers
     0.6–2.9 full turns, matching real spiral galaxy morphology
   - Default twist raised from 3.0 to 12.0 (~1.9 turns)

2. Scale angular scatter inversely with arm count
   - Replaced hardcoded ±0.36 rad scatter with arm_scatter() that
     uses 30% of the inter-arm gap (TAU / arms × 0.30)
   - Single-arm disks use a generous 1.5 rad scatter
   - Prevents high-arm-count disks from blurring into circles

3. Bias randomize_disk toward spiral-friendly values
   - Arms weighted toward 2–4 (10%, 30%, 30%, 20%, 10% distribution)
   - Twist floored at arms × 4.0 rad so multi-arm disks always wind
     enough for distinct spiral structure
   - Outer radius defaults to "auto" 60% of the time
2026-06-10 00:13:39 -04:00
..