Weapons - UQcsse3200/2024-studio-1 GitHub Wiki

Introduction

Weapons are a core component of the game, providing players with the means to engage enemies, overcome challenges, and progress through the game. This wiki page provides an overview of the weapon system, including types of weapons, key features, mechanics, and guidelines for adding or modifying weapons.

Weapon Types

Weapons in the game are categorized into 2 types:

  • Melee weapons: close-range weapons that require the player to be in proximity to the target. Deal high damage but have limited range.

  • Ranged weapons: Weapons designed for long-distance combat. For this project, this category only contains shotguns. Higher range, lower damage than melee, includes ammo management.

Weapon Features

1. Damage

  • Description: The amount of health a weapon can remove from an enemy.

2. Range

  • Description: The effective distance within which the weapon can hit a target.

3. Fire Rate

  • Description: The speed at which a weapon can be used or fired in rounds per second.

4. Ammo

  • Description: Only for ranged weapon, indicate how many shots the player can fire consecutively before reloading.

Weapon Mechanics

1. Weapon Equip

The player can only wield one weapon of each types at a time. Picking up a second weapon of that type will drop the first one.

2. Weapon Activation

  • Melee weapon can be activate using Space. Melee weapon will attack in the player current direction.
  • Range weapon can be activate by pressing any combination of the shoot buttons (←↑↓→ by default).
  • Activation rate can only be lower and equal to the maximum rate of that weapon.

3. Ammunition Management

Every ranged weapon has a specific maximum ammo capacity. With each shot, the ammo count decreases by one. When the ammo count reaches zero, the weapon will automatically reload. The weapon can only be fired again once the reloading process is complete.

References