Hey Guys,
I’m stuck to find a good solution about spawning enemies. Think of it as a tower defense game.
What I’m trying to do is;
- Create keypoints for enemy types and spawnrates, as
Wave0 >> Enemy_0 - 1.0
Wave5 >> Enemy_0 - 0.5 // Enemy_1 - 0.5
Wave10 >> Enemy_1 - 0.5 // Enemy_2 - 0.5 - Interpolate these values and spawn enemies so that Wave3 would be Enemy0 - 0.7 // Enemy1 - 0.3
As an extra I would like to interpolate number of enemies for each wave, calculate number of each enemy type for each wave.
I have created a class for keypoints containing following information;
- (int) Wave number
- (int) Enemy type[ ]
- (float) Enemy rate[ ]
- (int) Number of enemies
and the level would be created with an array of these keypoints. I’m trying to end up with a multidimensional array of int, representing enemy types and waves. I have tried numerous ways to find a good way of achieving it and still trying.
I would really appreciate if you have any tips or advices.
Thanks
Koray