What goes where?

Inspired by this Reddit post:

GameMode BP

GameMode should govern the overall game rules and settings.

  • Variables/Settings:
    • Match time
    • Game type (e.g., Deathmatch, Capture the Flag)
    • Score limits
    • Respawn settings
  • Considerations: Ensure this only runs on the server to maintain authoritative control over the game rules.

GameState BP

GameState should manage game-wide information that should be visible to all players.

  • Variables/Settings:
    • Current match time
    • Global score or objectives status
    • Active players list
    • Game phase (e.g., Waiting, In Progress, Completed)
  • Considerations: This should replicate relevant information to all clients to keep everyone updated on the game’s state.

PlayerState BP

PlayerState tracks information for each player that should be visible to others.

  • Variables/Settings:
    • Player score
    • Player team
    • Player status (e.g., Alive, Dead, Respawning)
    • Player’s display name
  • Considerations: Ensure relevant player information is replicated so it can be displayed on leaderboards and other players’ HUDs.

PlayerController BP

PlayerController manages input and player-specific actions that are not visible to others.

  • Variables/Settings:
    • Player input handling
    • Camera controls
    • UI interactions (menus, inventory)
    • Player-specific settings (e.g., sensitivity, keybindings)
  • Considerations: This is where you handle all client-side interactions that don’t need to be replicated to other clients.

Character BP

Character manages the player’s in-game avatar and its actions that should be visible to everyone.

  • Variables/Settings:
    • Health and stamina
    • Position and movement
    • Actions (e.g., attacking, jumping)
    • Animation states
  • Considerations: Ensure that actions and states relevant to gameplay are replicated so other players can see what this player is doing.