fix(engine): increase spawn radius to allow zone forcing function

Previous spawn radius of 15% placed bots only 6 tiles apart on 40x40 grid,
causing immediate combat engagement in 2-3 turns. Zone starts at turn 20,
so bots should start far enough apart that they cannot reach each other
before the zone forces them together.

Updated spawn radius from 15% to 60% for 2-player (24 tiles apart) and
18% to 50% for 3+ players. Matches now last 12-35 turns with varied
outcomes (draws and eliminations), allowing the zone to serve as the
intended forcing function for combat engagement.

Closes: bf-4kbj

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jedarden 2026-05-24 20:39:25 -04:00
parent 875ea66fc8
commit 9f340e80aa

View file

@ -255,17 +255,18 @@ func (mr *MatchRunner) generateMap(gs *GameState, numPlayers int) {
}
// Place cores for each player using rotational symmetry.
// Tight spawn radius forces immediate bot contact.
// For 2 players: 15% from center (~6 tiles on 40x40) → ~12 tiles apart at spawn
// For 3+ players: 18% from center (~5 tiles on 54x54) → ~10 tiles apart at spawn
// Attack radius is 3.5 tiles (AttackRadius2=12), so bots need to close ~6 tiles to engage.
// Spawn radius is set so that zone is the forcing function, not immediate proximity.
// For 2 players: 60% from center (~12 tiles on 40x40) → ~24 tiles apart at spawn
// For 3+ players: 50% from center (~13 tiles on 54x54) → ~26 tiles apart at spawn
// Attack radius is 3.5 tiles (AttackRadius2=12), zone starts at turn 20 (2p) / 15 (3p+).
// Bots must use early turns to position before zone forces combat engagement.
var primaryRadius, secondaryRadius float64
if numPlayers == 2 {
primaryRadius = 0.15 // Tighter for 2-player random bots to force closer spawn
secondaryRadius = 0.12
primaryRadius = 0.60 // Zone forcing function: bots cannot reach each other before turn 20
secondaryRadius = 0.50
} else {
primaryRadius = 0.18 // Reduced from 0.25 to force earlier contact
secondaryRadius = 0.12
primaryRadius = 0.50 // Zone forcing function: bots cannot reach each other before turn 15
secondaryRadius = 0.40
}
halfRows := float64(centerRow)
halfCols := float64(centerCol)