Skip to content

feat(space): mini-asteroids roll seeded sizes and mineral families, water ice included - #689

Merged
marceld23 merged 1 commit into
mainfrom
feat/mini-asteroid-variety
Aug 3, 2026
Merged

feat(space): mini-asteroids roll seeded sizes and mineral families, water ice included#689
marceld23 merged 1 commit into
mainfrom
feat/mini-asteroid-variety

Conversation

@marceld23

Copy link
Copy Markdown
Owner

Summary

Every mineable space rock was an identical clone: fixed r=2 voxel sphere, titanium core, iron/copper/stone shell, hardcoded loot. Rocks now roll seeded mineral families and sizes — including water-ice asteroids.

Closes #687. Builds on #686 (EVA mining hardness parity).

Changes

Server (GameServerSpaceStructure.cs, GameServerSpaceCombat.cs)

  • Families (weights): stony 40 % (iron veins in rock), metallic 25 % (the classic titanium-core rock), icy 20 % (hand-mineable water ice around a rocky heart), carbonaceous 10 %, crystalline 5 % — mirroring the landable asteroid families (Landable asteroids: every asteroid is the same crystal world — add asteroid families #515). All from existing blocks; zero new content.
  • Sizes: r=1 pebble (7 blocks, common) / r=2 classic (33) / r=3 boulder (123, rare); the core grows with the rock. Hull tracking, laser carving and the client renderer were already size-agnostic — no client change.
  • Shoot-down loot now matches family and size (boulders pay out more).
  • Pinned anchor: rock 0 of every field stays the classic metallic r=2, so each field guarantees one titanium core (mirrors the start-planet ring pin) and existing mining tests keep their target.
  • Determinism: a small xorshift seeded from WorldGenerator.StableHash(instance.Id) + world seed + spawn ordinal — integer state only: no Random, no string.GetHashCode (process-randomized), no trig-derived floats (Windows/Linux libm differ). Respawned rocks continue the ordinal sequence (3 + rotor).

Balance

With #686 in place the mining feel scales by material automatically: ice (hardness 0.8) pops in one bare-hand hit — an easy water harvest — while titanium keeps its tier-2 drill gate.

Tests

  • New SpaceAsteroids_RollSeededFamiliesAndSizes: pinned metallic anchor, legal sphere sizes, same world → identical rocks (restart-safe), different seeds → actual variety.
  • New test hook StructureCellForTest(structureId, x, y, z).
  • Local: full Release build 0 warnings, 1364 server tests green.

🤖 Generated with Claude Code

…ater ice included (#687)

Every mineable space rock was the same clone: a fixed r=2 sphere with a
titanium core and an iron/copper/stone shell, hardcoded loot, always 3.

Rocks now roll a seeded family (stony/metallic/icy/carbonaceous/
crystalline, mirroring the landable families from #515) and a size
(r=1 pebble / r=2 classic / r=3 boulder, cores growing with the rock);
icy rocks are water-ice deposits around a rocky heart, and shoot-down
loot matches family and size. Rock 0 of every field stays pinned to the
classic metallic r=2 so each field guarantees one titanium core
(mirrors the start-planet ring pin) and the mining tests keep their
anchor. Rolls use a deterministic xorshift over integer state only
(instance-id stable hash + world seed + spawn ordinal) so the same
world grows the same rocks across restarts and platforms.

closes #687

Co-Authored-By: Claude Fable 5 <[email protected]>
@marceld23
marceld23 merged commit b217fe9 into main Aug 3, 2026
11 checks passed
@marceld23
marceld23 deleted the feat/mini-asteroid-variety branch August 3, 2026 15:15
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.

Varied mini-asteroids in space: seeded sizes and mineral families, including water ice

1 participant