Skip to content

Functional Design

WarlockGames12 edited this page Apr 15, 2024 · 95 revisions

Core Gameplay

Top-down/Isometric horde survival game In this game players need to defend a central base from waves of enemy hordes. Enemies continue to spawn in waves until the base is destroyed. The players need to keep defeating all the enemies until it becomes too difficult to keep up. If the base is destroyed the match will automatically reset after a short loss screen.

Player

When the player first joins the game they will be prompted with a class selection menu. The classes all have different weapons and skills/spells The player can move along the x/z axis using WASD and can look and aim in a 360 degree radius using the mouse. Attacks can be performed with left mouse button. The executed attack depends on the player's selected class, weapon and projectile type. There are melee and ranged weapon type attacks. Players can also place structures on predetermined locations. These structures will help players defend from the hordes. Players can non-verbally communicate with each other trough emotes (social) and pings (tactical). If a player dies they will respawn after a short time.

Enemies

Enemies will spawn at predetermined spawn points on the map and move towards the base, if a player gets close enough to them they will move to attack them instead. There will be several enemy types, some melee and some ranged. Ranged enemies are significantly less common, otherwise the game would become a total bullet hell. Only the weakest enemies will spawn in the early waves but as the game progresses stronger enemies will begin to spawn.

Shop

The unlocked weapons and projectiles/spells need to be bought in a shop during gameplay. The players start with no money on wave 1 and will gain money by killing enemies. When a player leaves or the game is lost and resets they will lose all bought items and money.

Structures

Players can build structures such as ballistas in order to help them hold back the horde. These structures will need to be built on pre-determined locations on the map. These structures can also be destroyed by enemies that get too close.

Features

When you create functional design for a feature you should add it here

Player Functions

The player has to obey within the few rules it has with the following features is needed:

  • Movement
  • Attacking
  • Buying in shop
  • Emoting
  • Building
  • Gaining Damage
  • Getting Currency
  • Inventory
  • Classes
  • Minimap

Enemy wave spawning

At a determined distance of the base in each direction there will be enemies spawned. Then on each spawner location there will be an area where the enemies are allowed to spawn. In that area the enemies will be generated either randomly or strictly in a row depending on what we the developers want. The spawners will have access to all the enemies and with logic it'll spawn which enemy for which wave. After every enemy has been killed a new wave will occur. In the new wave there will be more enemies and the enemies themselves will have some extra health

SpawningVS

In this visual sheet you can see the zones and the base(The distance between them and the zone size are not on the same scale as the image). In the green zones/the spawn zones the zombies are allowed to spawn in that region they are allowed to pick any range which is inside of the zone or every enemies will spawn in a row and drop down every collumn. They player isn't allowed to go inside of the enemy spawn zones.

Enemy Features:

The enemy has 4 main things to follow, like:

  • Targeting
  • Movement
  • Attacking
  • Dying

targetEnemy

Targeting: The Enemy will target the nearest structure to attack, if the player is in range, despite the structure being the nearest target, the enemy will constantly follow the player and attack the player, because the player has the highest priority point to attack.

Movement: The Enemy is able to walk towards the target to attack them, which can be either the players or a structure. If they target the player, they will stop for nothing to catch the player, if the enemy is going for a structure instead, it will target and go to the nearest structure to destroy it.

Attacking: The enemy is able to attack the structure or player it's targeting, until the player or structure has 0 health which results in either killing the player or destroying the structure.

Dying: The enemy is able to die after the health of the enemy reaches 0 after the player or the structure that is attacking the enemy has shot them with a gun/ranged weapon or attacked them with a sword.

Dynamic Player Spawning:

The player can spawn at any point which we desire. It will be flexible so it's adjustable to the map.

Universal Health

Health Features:

• Healing

• Setting max health

• Death

The universal health script has 3 main functions:

1: Setting the max health for objects which use the Universal Health script. The objects can differentiate in health so its required that we can set the health value via the inspector.

2: The amount of healing an object which uses the Universal Health script receives can differentiate per object and changes according to the healing source.

3: When an object reaches 0 health, the Death function will be called which causes the object with 0 health to die and either destroy or respawn depending on if its and enemy/structure or a player/structure.

Structure Placement

Lmao

Clone this wiki locally