Script related postmortem
Some script related postmortem:
Setting up the character selection drove me crazy because it broke almost all of the scripts provided for the lesson. I had to go in and modify a bunch of scripts.
When testing the game, I encountered a bug where every ship used the same sprite. I messed with some things and ended up spawning two ships. This would have been fine, but that confused the health script a bit too much and was hard to control. I eventually realized I had the wrong spritesheet on the player prefabs (Since each character has a bunch of differences in terms of control and attack, I used prefabs to make it easier to change).
After fixing that, I then had an issue with the boss because I accidentally (unconsciously) added... 0s to the attack count. (2100 bullets is a lot more than 210 bullets and even more so when compared to 21). Oops, this isn't supposed to be a danmaku game. I didn't add a graze mechanic here. Then, I had another bug because the game would make duplicates of an important script when you returned to the main menu and would use the later instances of the script, so I had to make that script destroy duplicates and add a new script that re-added the functionality to the buttons more dynamically. I then had a bug where the wrong character was spawning because I had messed with the spawner to test something and forgot to change it back.
I didn't manage to include a full story in the game, but I do have the start of one. Unfortunately, the system I'm developing is still not ready to be implemented yet.
To a certain extent, in hindsight, it would probably have been easier on me if I had just rewritten a lot of the scripts from scratch. Trying to adjust someone else's script to make it work for what I wanted probably just made things harder for me.
I also didn't have time to write good comments, if any. While I did try to name things sanely, I do need to get into a better comment writing habit.
There were some bugs that I never did manage to fix. The console gave me some error that I couldn't figure out with what I know about Unity.
I also ended up having to sort of force some scripts to work using workarounds instead of properly fixing them. Unfortunately, I'm still learning how Unity with C# works
Leave a comment
Log in with itch.io to leave a comment.