2D Shooter Dev Diary - 10 MAY
4 MAY 2020
New week, more work. Got the door asset fully implemented into the game, which means it also requires the crew to be rescued before opening and completes its animation before the player can step through. Lesson learned, RigidBodies are automatically set to “sleep” when not being used, meaning the player couldn’t trigger anything while idle, because they didn’t technically “collide” with anything. Setting that to never sleep fixed my issues.
*****Build version of the game was SUPER broken because objects were only being called on awake, and while the editor knows what I was looking for, the builder unloads “unused” assets. Had to make sure that every time the level loads it re-looks for all the objects it is associated to.*******
7 MAY 2020
After realizing how poorly I was creating audio, which was to instantiate an invisible object that had the audio source on it then delete it after 3 seconds, I realized it was important to start over and make an audio manager. Not only was there no way to control all audio at the same time, but that it was just a sloppy method altogether. So, after hours of tutorials and guesswork, the AudioManager was implemented and even mutable via the Pause screen!
8 MAY 2020
A lot of time and effort was put into making sure the main menu has the mute buttons for audio and music always visible, while then disappearing in game until paused. Originally the buttons were attached to the pause menu, which made it hard to have them active while the main canvas was inactive. After trials and errors, I detached them and gave them their own logic. Also, I don’t understand coding well enough to have an intuitive system that detects how many rescuable crew members I put into the scene and then populate a list under the player’s health with greyed out symbols of each one of them that fill in when you collect them through clever coding.. So they’re all just going to be pre-generated game objects with swapping sprites. Oh well!
9 MAY 2020
Got the lives counter working, and finally got around to fixing the enemy death. Originally, they were directly translated through script to go backwards then die. This was.. unideal, as it seemed to change based on the aspect ratio. Instead, I went back and made their collider not disappear, but instead move them to a new layer so that the player couldn’t interact with them. This project really has been teaching me better practices that would save time and make things work better.
![](https://static.wixstatic.com/media/c9293c_2fe5f0ee3f254b04a205a687bb4a7d3f~mv2.png/v1/fill/w_26,h_22,al_c,q_85,enc_auto/c9293c_2fe5f0ee3f254b04a205a687bb4a7d3f~mv2.png)
Comments