Wednesday, August 25, 2010

Week Seven / Day Three

Genesis 1:3 "And the Lord said, let there be sound"

Perhaps I have the biblical scripture slightly skewed, but I believe it is something to that effect. Sound implementation today went swimmingly, and is fully operational within Chromovis. Just as I had planned I was able to implement it as an extension of the resource manager. I can load and play sounds and background music through one line calls in the application engine and everything is handled via the resource manager. While I don't have a full set of tools just yet, such as being able to fade sounds in and out, or stopping play altogether, the basic framework is there and I've got placeholder sound effects for each item in the game that requires them.

Thanks to the developer of Tactica I learned about thefreesoundproject, a very cleanly interfaced database of sound clips released under the Creative Commons Sampling License, or in English stuff I can use without licensing nonsense. I hope one day I can contribute free (as in beer) technologies or materials in a similar manner as so many have provided me over the years.

I got quite lucky in my implementation of sound with Chromovis. Actually, I shouldn't say I got lucky, as the 'luck' came from a good modular application design. Because the gamestate and rendering engines make their connections via the application engine, any event that takes place in my game passes through the application engine. While most of the work of the resource manager is given by the rendering engine, the application engine also has access. This means that any event requiring a sound has some point of existence within the application engine, which already has easy access to the resource manager. Adding the sound effects was a simple a matter of adding a single line of code for each sound in the right spot.

I will still say I got lucky though, as this has been another learning experience in terms of the wrong way to do things. While the conditionals for different events exist in the application engine, they shouldn't exist in such a hard format. An event handling engine on the backend applied to each separate module would allow for cleaner, more abstract overall engine work flow. More on this later. In the meantime, I believe tomorrow might be time for some good old fashioned Windows development, as I need to start porting the engine over to Windows to build the level builder. Not only is this easiest in terms of OpenGL, as I can just reuse the old OpenGL framework from the game's original implementation, but in the event I release the level builder I believe this will appeal to the largest audience initially. That is, until (if?) the Linux and Mac ports get done.

Side note, I just found out today an Atlas Shrugged movie is already in post-production and slated for release next year. Yes

No comments:

Post a Comment