Randomized min-distance spawns replace the mirrored spawn table - #264
Merged
Conversation
…able Tanks could spawn stuck inside each other: SpawnTable mirrored 2 declared points into 8 candidates, centre-ish spawns collapsed under mirroring, and the ring-search nudged duplicates onto ADJACENT cells. SpawnTable is now seeded random placement: pairwise Chebyshev separation targets 10 cells, relaxes one cell at a time to a floor of 3 on cramped maps, and below that farthest-point placement best-effort maximises separation - two tanks share a cell only when the field is smaller than the spawn count. Eligibility is the caller's predicate and must exclude deadly terrain: themed arenas allow floor only; the net scene predicate now also excludes lava explicitly (drivable but lethal; water already blocks movement). Deterministic per seed so peers agree: IArenaBuilder.Build takes the seed (solo passes GameSetup.ArenaSeed, net the shared lobby seed - terrain stays seed-independent), NetArena3DScene derives spawns from the match seed (the now-redundant post-hoc shuffle is gone), and ArenaGenerator seats its tank spawns through the same placement. Respawns still revive at the tank's assigned cell. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes tanks spawning stuck inside each other. SpawnTable rewritten: seeded random placement over eligible cells (open, non-lethal — lava/water excluded), pairwise Chebyshev separation targeting 10 cells and relaxing one cell at a time to a floor of 3; below the floor, farthest-point placement best-effort maximises separation. Deterministic per seed (GameSetup.ArenaSeed / shared lobby seed), so solo, host and generator paths all agree. Respawns keep the assigned cell.
All four xUnit suites + 195 headless GoDotTest green (verified independently by orchestrator).
🤖 Generated with Claude Code