Project Rogue Dev Blog 2

October 12th, 2020 ~ October 25th, 2020

Wwise, AudioEvents, and Cleaning up Levels

Wwsise and AudioEvents

As I had not been able to work on the project much during the previous sprint, and many of the groundwork for the level generation system had been done, I spent some time reviewing the code for the level generation so I could begin working on it, as I was a member of the level pod. This took around 7 hours. As my first task was integrating Wwize events into the level generation structure, I familiarized myself with using Wwise in Unity with by going through a small tutorial and looking through the documentation. This took around 3 hours. I then began work on the task itself, which was the integration of a wwise event for regional music and causing it to be posted at the correct times throughout the game. This took around 6 hours.




Destroying Unwanted Prefabs

The next task I was assigned was implemented code for destroying any leftover collectible and weapon objects in a level when the level ended and the next one began. The current system used for finding and destroying any leftover prefabs was just using GameObject.FindGameObjectsWithTag, and iterating through the array and deleting every object. However, it is noted in comments that this is very inefficient and there should be a faster method of doing so. I spent some time going through the enemy code to figure out a way to index all their drops without manually searching for them, but due to the way it is done, it would be very difficult to do so, and since the DestroyUnwantedObjects function is only called at the end of the level, the inefficiency is acceptable. This took around 7 hours.

Limitations and Future Tasks

I spent a significant amount of time trying to find a way to find all the enemy drops without manually searching for them. This was because using FindGameObjectsWithTag was very inefficient and is even mentioned in the comments of the code that destroys enemy bodies. After reviewing the code, I should have realized that it would not be feasible to do so without significantly altering the enemy code, and the inefficiency would be ok since the function itself would only be called at the end of a level, but I spent far too much time trying to find a workaround, and ended up giving up in the end. I learned that I should quickly try to figure out if a specific aspect of a task is worth spending time on before using so much time on something that only slightly affects the game.