Day 44- Colorful

Day 44- Colorful

Quote of the Day: Nothing of real amusement value today

Music of the Day: In addition to The Witcher 3 Soundtrack (AGAIN), I was back to my standard metal/rock. Also listened to a big chunk of the MiniBotz soundtrack because I was testing the Music Manager. Not really my type of music, but it’s at least a lot more diverse now than the 5 songs it originally had.

I Started today by once again recreating the Music Manager, this time on the computer that would actually allow me to upload the changes, and adding a couple more small features/fixes to it, namely to stop it from playing songs on top of each other every time you tab out and back into the game. If you didn’t know, you can hit alt+tab to flip between windows (cmd+tab on mac I think. I don’t know why you wouldn’t know that, it’s a pretty basic feature, but if not then there you , you learned something new). Unfortunately, the way I was checking to see if a song was over was using Unity’s inbuilt isPlaying boolean. Unity also has a very nice (but in this case annoying) feature that automatically pauses your game, music included, whenever you tab out of it, which sets isPlaying to false. So every time you flip out of and back into the window it thinks that the song is no longer playing for a split second and chooses a new one, which is played on top of whatever is left of the old one. This isn’t really an issue for most people, because usually when you start up a game you plan to play it, not tab out and leave it, but it’s still a bug that needs fixing. The solution was to use another inbuilt Unity method, OnApplicationFocus. It does exactly what you think it would do, tells you when the application is the main window or a background one. I just tossed in an extra check to make sure that the window is in focus before choosing a new song, and voila, all done with that project. I made sure to push it to Git before I started working on everything else, just to be sure. Everything went exactly as it should.

Next on my list was a quality of life change for Timmy. Nothing about him was broken or anything, he was just able to receive more features, and this was a pretty simple one: randomizing his color. Basically, I added a random number generator that goes off when Timmy first spawns in to choose what color he’ll be, then make sure he has the matching remains for when he dies. And that’s it. He now comes in cherry, orange, lemon, lime, coconut, and his classic blueberry flavor. I also cleaned up his naming inside of Unity (previously he was called “GummyBearBoss_Blue.” Not very fitting anymore is it?), and organized all of the stuff to do with him into it’s own collection of folders. Cleanliness is very nice, and makes navigating the project that much easier. Then we messed around with Git for a little while and I hit the road.

If you’ve made it this far, congrats! I am very happy that I don’t have to worry about the stress of upcoming AP weeks this year.

 

 

Leave a comment