AnthonyDampier / dungeon-crawler

React JS Dungeon Crawler
https://dungeon-crawler-smoky.vercel.app
0 stars 0 forks source link

Define Game's State #1

Open AnthonyDampier opened 8 months ago

AnthonyDampier commented 8 months ago

As a Game Designer we need a game that provides an interesting Dungeon Crawling Game by defining the Prototype Game State for this application

AnthonyDampier commented 8 months ago

Game State Structure

  1. Player State: Contains all the information related to the player.

    • Position: The player's current location in the dungeon (e.g., x, y coordinates).
    • Health: The player's current health points.
    • Inventory: Items that the player has collected, including weapons, potions, and keys.
    • Stats: Player attributes like strength, agility, and intelligence.
  2. Dungeon State: Represents the dungeon layout and the visibility of its parts.

    • Tiles: A 2D array representing the dungeon, where each tile can be a wall, floor, door, etc. Each tile has properties like revealed (boolean), type (wall, floor, etc.), and content (enemy, item).
    • RevealedAreas: A subset of Tiles that the player has discovered. Initially, this might only include the tiles surrounding the player's starting position.
  3. Enemy State: Information about the enemies within the dungeon.

    • Positions: The locations of all enemies within the dungeon.
    • Statuses: Each enemy's health, status effects (e.g., poisoned, stunned), and whether they are alert or idle.
    • Behaviors: Defines how enemies behave (e.g., patrolling, chasing the player, attacking) based on the player's actions and their visibility.
  4. Game Progress: Tracks the overall progress of the game.

    • Level: The current dungeon level or depth the player has reached.
    • Score: Points accumulated by the player through defeating enemies and discovering treasures.
    • Objectives: Key objectives the player needs to complete to advance or win the game (e.g., defeat a certain enemy, find a specific item).

Handling Progressive Dungeon Revelation

Managing Enemy Encounters

Updating the Game State

The game state is dynamically updated in response to player actions and the unfolding game events: