Blogs

2019 Part 2

Posted on 19 December 2019

The year is coming to an end, and I would like to share another update. I re-branded the website, finished another level in Messiah Quest II, and there is now a checklist for what is left to do to finish the game. As of this writing, there is one level left to develop, but I have decided to fix a core feature.

I’ve shared some videos of Messiah Quest II on the Facebook page over the years to show progress and interesting moments, and some may show the flaws in the sound design which I wish to fix. Mainly, the background music restarts when the player returns from combat, and I have decided this is a flaw. Many RPGs resume the background music when a battle is over so the player can hear the rest of the song rather than the intro over and over again. I have to rewrite a lot of code for the music, because my game is currently incapable of pausing and resuming the songs.

My current code uses the SoundPlayer object in the .NET framework to play music, and I have a Windows Media Player library added to play the sound effects. This is because the SoundPlayer can’t play overlapping sounds, but WMP can. I specifically kept using the SoundPlayer for music simply because it looped sounds slightly better than WMP. There is still an awkward pause, but I felt it was worse with WMP. This code sufficed until I got annoyed with the issues. The SoundPlayer has no methods for pausing sounds or even volume control while WMP does. I found another issue when I played with the sound mixer on computer while running the game. The volume slider can control the music, but has no effect on the sound effects.

Ever since I added sound effects to the game, I’ve been trying to solve all these issues. I wanted the benefits of WMP without losing the benefits of the SoundPlayer. The SoundPlayer looped better, but there was also a major benefit of how it loaded sound files. I’ve stated before that all art assets are embedded in a DLL file, and you can see an example in my screen saver tutorial. I was able to do the same for the music assets. The SoundPlayer can read the files I have embedded in a DLL file. WMP cannot, and must read files from a URL. Given the sound effects are played through WMP, the file structure of Messiah Quest II includes the necessary DLL files and a folder containing the WAV files of each sound effect. If I were to stop using the SoundPlayer, I would have to lose the DLL containing the music and keep those files in a folder like the sound effects. I only wanted the minimum amount of files exposed to keep the package concise and easy to retain. Ultimately, it’s something I’ve decided to sacrifice.

As for the looping, I have thrown together a quick demo using WMP with almost perfect looping. Instead of setting the object to loop the sound, I created two WMP objects loaded with the same song. Once the first player has almost finished, the second player starts. Since both players loaded the song around the same time, the second one can start without missing a beat. My goal is to encapsulate two players into a single player and add easy methods for musical transitions including fades. The new player object will fix all other issues. When the hero enters combat, the background music will pause (while battle music will play through a separate player in a separate scene). Once the battle is over, the background music will fade in and resume where it left off. I can also add a fade out when the hero enters a different level. Finally, I believe the issue of the sound mixer is due to the fact that my game uses both the SoundPlayer and WMP. In another demo I have found the sound mixer can control the volume for music and overlapping sound effects if all sounds use WMP exclusively.

That’s enough about code and Messiah Quest II. The fix shouldn’t take too long once I get the time. That leads me to my next announcement. I feel that I haven’t had enough time due to my job, which is one reason why I quit! I am leaving the retail industry! I will say it is a stupid easy way to make money, and that is the issue with it: it is stupid. There’s minimal effort for a minimal reward, and with my job I hardly ever worried about money. But it’s not about the money; it was never about the money. The job was just so easy to the point where it was annoying. It only got more annoying when others put in less than minimal effort. It made an easy job just slightly more difficult, and that’s when it gets stupid. Some people can deal with all those small annoyances: the customers, the bad co-workers, the entire corporation above not helping, but not me. I’m done with it. In short, I would recommend the retail industry if you need to pay the bills and survive, but get out as fast as you can. It can keep you afloat possibly forever, but just floating is no way to live. (also I’m a bad swimmer c:)

So I will be starting a career in construction and working with my father. It will be a much more difficult job, but a lot more rewarding. I won’t be doing the same thing every week just to have it undone in an hour. I’m not sure how this will affect my game development, but I’m feeling I will get large breaks between projects. Most importantly, I feel this massive change in my life will help fight depression. I’ve been working the night shift in my retail job, so five days of the week consist of sleeping until I have to go to work, working, then watching shows or streams until dawn. On my days off I try to go out and socialize to recover from the depressing cycle of work. I could’ve improved this schedule by working mornings (which is when I will be working at my new job), but I felt the night shift was the only tolerable shift for that job: less people, less problems. Now, none of that matters. My whole life is going to change, and I believe it will be for the better.