Software Architecture Planning for "Harmony's Last Stand" in Unreal Engine 5

This section provides an outline for the architecture of "Harmony's Last Stand," detailing key Unreal Engine 5 components such as GameState, GameMode, GameInstance, and GameManager.

GameState

Purpose

Key Responsibilities

  1. Track the game timer (7 minutes per game session).
  2. Store and update the Harmony Core's health.
  3. Keep track of the current wave and round.
  4. Maintain the global and local scores.

Implementation Steps

  1. Create a new GameState class, either via Blueprints or C++.
  2. Implement variables and functions for the above responsibilities.
  3. Ensure GameState variables are replicated for multiplayer functionality.

GameMode

Purpose

Key Responsibilities

  1. Spawn player characters and manage respawns.
  2. Start and end the game based on conditions (e.g., timer reaching zero or Harmony Core's health dropping to zero).
  3. Handle transitions between different game states (e.g., from gameplay to game over screen).

Implementation Steps

  1. Create a new GameMode class.
  2. Configure player spawning and game over conditions.
  3. Implement the game rules defined in the Game Design Document.

GameInstance

Purpose

Key Responsibilities

  1. Store player profile information.
  2. Maintain leaderboard data.
  3. Save and load player preferences and settings.

Implementation Steps

  1. Create a new GameInstance class.
  2. Implement variables and functions for the above responsibilities.
  3. Use save-game mechanisms to ensure data persistence.

GameManager

Purpose

Key Responsibilities

  1. Manage enemy spawning and behavior.
  2. Calculate scores based on the Points Allocation Rubric.
  3. Manage local tournaments logic.
  4. Coordinate between GameState, GameMode, and other classes to ensure smooth gameplay.

Implementation Steps

  1. Create a GameManager class (Blueprint or C++) that operates under the GameState.
  2. Link the GameManager with other components like AI controllers for enemies.
  3. Implement key game mechanics like score calculation and enemy behavior as functions in GameManager.