Initiative While developing Treva's Adventure I had to figure out a way to handle multiple music tracks and sound effects in a clean manner or suffer horribly. What was going to help me achieve a simple solution was taking all the different sounds and centralizing them in a single class in order to black box them. Any other code trying to play a sound wouldn't even know the sound file's name. All code trying to play a music track would reference a enum that defines all the track names. Defining The Class Creating The Enum When I first started defining types in my enumeration, I was naming the types to be exactly like the file name. For a scary sound effect I had found a file named "ghost breath". So around my code would be scattered lines like SoundManager.Play(SoundEffectType.GhostBreath); This was fine until I found a sound that better fit the situation it was being used in, and decided to use "ghost breath" for a different s
Some of you may think, "Dang, that's a clean looking tree." And in fact, like this, it looks pretty clean. And some of you if you drew a tree like this would sign it off as done and ready for some game action. However, if you take a closer look (About 200%) Oh wait, those colors are still inside the lines! I guess it really is read- WAIT. LOOK CLOSER. (In other words, add a black background) Filthy, filthy tree. Tree is not ready for the game. So, now that you can see where all your little pesky errors are, you can whip that tree into shape Which means you need your handy dandy eraser. HOWEVER! Before we start erasing, we are first going to select the black outline and copy it, and for those who don't know how to do so, this is how: That is your magic wand, you want to select it. Then you click on the black outline (note: this is for if your outline and and colors are on the same layer, if they are not (e.g. your outline is