DemoProductions / shmup

3 stars 2 forks source link

Randomize LevelController wave instantiation #79

Closed flip40 closed 7 years ago

flip40 commented 8 years ago

At the moment, LevelController spawns each wave in its list incrementally. This should be changed.

  1. We should define the number of waves per level. We could either do this by designer choice (i.e. editor variable) or we could have this be a constant private value kept by LevelController so all levels have the same wave count. The former requires messing with the Editor code, but adds some flexibility to level design.
  2. Instead of spawning each wave in the list, we need to randomly select a wave from the list to spawn, until we reach the wave count.

Currently there is only a single option for background or middleground (fine for now), but we could potentially do this to them as well.

ghost commented 8 years ago

and maybe a max amount of times certain waves can spawn in a level in case the player gets lucky and gets the same wave a bunch of times straight

How is this going to work with regards to Wave positions? Or is there going to be say 3 different types of waves at select positions to choose from

flip40 commented 8 years ago

Currently wave positions are evenly spaced out at regular intervals defined by a variable in LevelController (visible in the inspector / editor). I am assuming that if you want more enemies in a particular area, that one would just create a new wave to serve this purpose.

Max spawns makes sense... I'll have to think a bit on how to best implement that in the editor... Simple solution is just to have a single variable define this for all waves. Best solution is to have a variable define this for each wave. Doing so and making it appear nice in the editor would be a bit of a pain though.