Files
client/overview/bots.md
T
anekdotin c0b5f421c5 Add in-game chat, bot fill for casual, and borderless fullscreen
- In-game chat: T=all, Y=team (race doubles as team), server-relayed and
  team-filtered via new ChatManager autoload; last 10 messages shown
  bottom-left (chat/chat_box.gd).
- Bot fill for casual (bots/): keeps each of the match's 2 offered races
  at a minimum of 7 total humans+bots, spawning/despawning reactively as
  players join/leave. Bots always fly their race's fighter and use
  negative peer_ids so they ride the existing networked-ship stack
  (spawning, loadout sync, health/position sync, bullet attribution) with
  no special-casing. Casual matchmaking now forms with just 1 real player
  queued instead of waiting for a second (matchmaking-api/).
- Borderless fullscreen with stretch scaling disabled instead of scaling
  the Steam-Deck-matched 1280x800 canvas up to fill PC monitors (which
  read as zoomed in) — PC monitors now reveal more world/HUD at native
  size instead. Reworked main_menu/team_select/chat_box to position via
  anchors relative to the real window instead of hardcoded coordinates.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-13 17:02:12 -04:00

39 lines
2.0 KiB
Markdown

# Bots — Casual Mode Fill
## Rules
- Each casual match picks **2 of the 3 races** at random
- Bots fill empty slots until the match reaches **7v7** (14 total)
- Once 7v7 is reached, **no more bots are added** — additional human players replace bots as they join
- Bots are removed when real players join their team slot
## Why 7v7 Minimum
- Ensures the match feels active even at low population
- Avoids the ghost-town feeling of a 25v25 map with 3 players
- Bots are not added beyond 7v7 so human players always dominate strategy
## Implementation Notes
- **`bots/bot_manager.gd`** (server-authoritative autoload) owns bot lifecycle. All
spawn/despawn decisions funnel through one function, `_reconcile_race(race_id)`,
triggered by `PlayerRegistry`'s existing `loadout_updated`/`player_removed`
signals (join/leave) and `World.decide_offered_races()` (match start) — no
polling. This is the one place to change for future tweaks (fill curve, per-map
team size, etc.)
- Bots get **negative peer_ids** (`-1, -2, ...`), assigned by `BotManager`. This
lets them reuse every existing networked-ship system for free — spawning
(`MultiplayerSpawner`), loadout replication/backfill (`PlayerRegistry`),
position/health/visibility sync, bullet damage attribution — none of which
cares whether a `peer_id` came from ENet or from `BotManager`
- Bots always fly **the race's fighter/Interceptor** (`race.ships[0]` in
`team_select.gd`'s `RACES` data)
- AI (`bots/bot_ai.gd`, `class_name BotAI`): thrust toward nearest living enemy,
turn to face it, shoot when roughly aimed and in range — simplified
seek-and-shoot, intentionally easy (casual bots are filler, not a challenge).
Fully isolated from `ship_movement.gd`'s networking code so future
difficulty/behavior tuning only ever touches this one file
- Bot names: `bots/bot_names.gd`, a flat pool of procedural callsigns
- Tunables live in `GameConfig` (`bot_min_team_size`, `bot_engage_range`,
`bot_stop_distance`, `bot_aim_tolerance_deg`)