#9 | 18-08-24 | Wave System
Hello!
The main task of the last two days has been creating the wave spawning system. I've been beating my head against this challenge relentlessly.
In order to create the wave spawning mechanic, I had to rewrite the script several times from scratch. Pictured below is the current version, it'll need to be rewritten when I add multiple enemy types.
In order to make sure that the next wave starts only after the last enemy is killed, incorporated checks to determine how many enemies were in the scene. If there were none present, the next wave would be able to start.
Each "wave" shares very similar code to the coroutine for wave one.
I've only shown a small portion of this script, the logic parts that make the waves spawn. Majority of the code (300 - 400 lines) is the spawning instructions for each individual wave. In the future, I plan to optimize it so that I can have many different waves with minimal code. This script is the longest and most complex I have written.
One idea that I've been thinking about is having multiple different maps the player can choose from. Because the amount of enemies spawned is proportional to the amount of spawn points, smaller maps with few spawn points will be easier to survive whereas larger maps with more spawn points will be tougher. That would add more depth to the game. I'll ponder the idea for a few days before committing to it.
Now that wave mechanics are done, the next task will be getting the game ready for the alpha build and gathering testers.
Thanks for reading!
Get Dead Alert
Dead Alert
Top down 2D survival shooter!
Status | Released |
Author | Ice Diamond Studio |
More posts
- #16 | 14-09-24 | Postmortem Addendum88 days ago
- #15 | 11-09-24 | Postmortem91 days ago
- #14 | 06-09-24 | PSA96 days ago
- #13 | 26-8-24 | Code ModularityAug 27, 2024
- #12 | 24-08-24 | Larger MapAug 24, 2024
- #11 | 20-08-24 | Beta PlanAug 20, 2024
- #10 | 19-08-24 | Alpha BuildAug 20, 2024
- #8 | 16-08-24 | Shop SystemAug 16, 2024
- #7 | 15-08-24 | MVP Build & PlanningAug 15, 2024
Leave a comment
Log in with itch.io to leave a comment.