Skip to content

Implement base placement system (random positioning)

Objective

Create a system for randomly placing player and AI bases on the map with appropriate spacing and validation for MVP gameplay.

Requirements

  • Random Placement: Generate random but valid base positions
  • Spacing Rules: Ensure bases are "a close walk" apart but not too close
  • Collision Detection: Prevent base placement on obstacles
  • Validation: Ensure bases have clear paths and access to resources

Technical Details

  • Implement base placement algorithm with distance constraints
  • Add collision detection for base footprint
  • Validate pathfinding accessibility between bases
  • Ensure resource node accessibility from base locations
  • Handle placement retry logic for invalid positions
  • Create base data structure with ownership and state

Acceptance Criteria

  • Bases are placed randomly but consistently spaced
  • No bases overlap with obstacles or each other
  • Clear pathfinding routes exist between all bases
  • Base placement is fast and reliable
  • Placement algorithm handles edge cases gracefully

Milestone Relation

Critical for MVP multiplayer setup. Required for establishing player vs AI combat scenarios and validating map generation.