sneakblock / starfall

A 3rd-person action shooter created for Georgia Tech's VGDEV Club in Fall 2022
2 stars 30 forks source link

Added despawn delay for dead enemies, rehauled AI Manager with spawn zones, and added difficulty scaling via LevelData #59

Closed skar32 closed 2 years ago

skar32 commented 2 years ago

--- Dead enemies despawn 15 seconds after being killed --- AI Manager has been refitted with spawn zones; spawn points and respawn points are now obsolete

--- Added two new variables to "LevelData" prefab: "enemyNumSpawns" and "enemyIncrementMaxAlive"

--- Added difficulty scaling that increases the max amount of enemies that can be alive at once

--- New AI Manager Logic: (1) Upon level start, AI Manager selects a random 3D transform within a random spawn zone, and spawns an enemy there if the transform does not intersect with another game object (2) AI Manager calculates the number of each enemy type that is alive, and if it is less than their corresponding max alive count, respawns instances of that enemy type until the number of alive instances is equal to their max alive count (3) AI Manager detects optimal spawn zones to use for enemy respawning; spawn zones that are more than 100 units away from the player and not currently visible are optimal

--- Best Practices: