henrywangzh / Xinshen

Xinshen [SRS23]
3 stars 1 forks source link

[Programming:World] Enemy Spawning (Open World) #21

Open henrywangzh opened 1 year ago

henrywangzh commented 1 year ago

The design for our open world enemy spawning will be as follows:

We will have a prefab called "Enemy Group" as well as associated scripts. It will have a few parameters for the number of each type of enemy and the type of reward chest it comes with. When instantiated/created, it will generate all the enemies specified into the location it is provided with. The scripts will also keep track of how many of the enemies in the group are alive. When all enemies die, spawn the reward chest.

We will then:

  1. set up locations across the world where enemy groups can spawn
  2. create a script that loads X amount of enemy groups into random locations whenever we load into the main world
  3. when the number of alive enemy groups drops below a certain number Y, generate new enemy groups