I will honestly lie if I tell you that today was easy. For the second day of week 1, personally, it took me a while to figure it out.
Today's task was to create the spawn manager, where we need to control the spawning of the enemy and to optimize with an object pooling from the beginning.
Spawn Manager
Create start & end points on the map
Turn the SpawnManager into a Singleton
Spawn Enemies at the start position
Randomize enemy types
Assign target destination one spawned
The appropriate delay between spawns
Keep Environment tidy when spawning
Recycle Enemies not Destroyed
Wave System (Amount to spawn = 10 * currentWave)
Use Object Pooling
The spawn manager actually started very easy all you have to do is create the starting point and end point were the enemies going to walk the path and then you're going to create a spawn manager, turn into a Singleton and then randomize the enemy types; when I read about the Object pooling system that's when I dropped blank for at least 3 hours🤣.
In order to make the fully work I decided to take like a small break and then get back to it and then once I analyze what I need to do I create a simple pulling system in which at the beginning of the spawn I will Instantiate 10 enemy object and depending on the wave that number will either increase or will use the same 10 enemy and run it depending on the number of the wave.
2nd Day really put my brain to work. My goal for each week is to tackle any task in the first two day of the week and have the rest of the week to optimize or play around with ideas for these projects.
Next up will be to see how I can I Optimize or play around with the spawn manager and the EnemyAI.
Day 2 done
To be continued
Top comments (0)