#13 | 26-8-24 | Code Modularity
Hello!
Progress on this project has stagnated. I intend to change that while I'm still on summer vacation, only one more week.
Now, onto today's subject. I got stuck on the idea I should make my spawning script modular and was severely disheartened when my first attempts failed. I tried to use scripteable objects and separate scripts for each wave, which didn't work.
Now, I have found a solution that works: lists.
Lists are expandable and the size can be changed easily, with the click of a button. For each new wave I write into the wave spawner script, there will be a new item (variable) in each list for it. Example pictured below:
In order to create a new wave, all I have to do is copy-paste the coroutine, rename it, and add new items to the lists (wave[], enemyWaveQuantity[]) and change their variables.
Modularity and expandability is incredibly important in creating an organized game. I also like to be very organized (in contradiction to my room) when building games or sorting files.
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 Addendum69 days ago
- #15 | 11-09-24 | Postmortem72 days ago
- #14 | 06-09-24 | PSA77 days ago
- #12 | 24-08-24 | Larger Map90 days ago
- #11 | 20-08-24 | Beta Plan94 days ago
- #10 | 19-08-24 | Alpha Build95 days ago
- #9 | 18-08-24 | Wave System96 days ago
- #8 | 16-08-24 | Shop System98 days ago
- #7 | 15-08-24 | MVP Build & Planning99 days ago
Leave a comment
Log in with itch.io to leave a comment.