Audio changes…

I think I’ve mentioned this before, but as I’ve been writing this game, I only add features to the engine as I need them. In addition to that I generally write the simplest system to get the job done. This is good for development speed, but bad when the game out grows the simple systems.

When I wrote the audio code it was pretty simple. It played some uncompressed wave data at some volume, at some frequency. Then I needed some 3D audio, so I added some simple listener code to determine what sounds to play and attenuate the ambient environment sounds and the noises the people and animals make. This works great. But…

The amount of audio started growing as I continued development. Uncompressed audio is really big. Stereo audio runs about 10 megabytes per minute. The ambient sound data takes up a lot of space in memory, and I was loading entire music tracks into memory to play them.

So over the last two days I’ve fixed this. The audio is now preprocessed and shrunk to a format with around a 30:1 compression ratio. The data is then decompressed as it plays. I also added some streaming code to load the music on the fly. This nicely decreases both the disk and memory footprint of the game.

I also enhanced the music system to be more dynamic. Instead of playing random tracks, it now picks music based on the season of the game as well as the health and happiness of the citizens. I hope this system will give nice audio hints about the state of the town as the game is played.

33 Comments

    olus
    April 4, 2013 9:54 am

    I’d like to be pre alpha, alpha and beta tester :)

    sharpless512
    April 4, 2013 9:56 am

    Dude, I can’t wait until we can play this!

    Will
    April 4, 2013 9:57 am

    Sounds awesome! I honestly can’t wait to play this game! Keep up the great work!

    Xerotherm
    April 4, 2013 9:59 am

    THIS IS SO AWESOME!

    Jerry
    April 4, 2013 10:03 am

    Nice work Dukus. It sounds like a very elegant solution :)

    Tim
    April 4, 2013 10:04 am

    Count me as another excited gamer out there. This is worth waiting for.

    Nohjo
    April 4, 2013 10:04 am

    Great, I love it when games have this.

    Rick
    April 4, 2013 10:28 am

    I’d love to be a alpha/beta tester as well. I’m currently a tester for a couple other active titles. I have over 40 years as a computer game developer.

    Looking forward to this game.

    Jonas
    April 4, 2013 10:28 am

    Aaaaaaaaiiiiieeeeeeeeeee!!!!!

    Simen
    April 4, 2013 10:42 am

    Music plays based on season, mood and health of citizens? That is actually pretty damn brilliant.

    Andy
    April 4, 2013 11:04 am

    I cannot wait to try this game out. Ever since I stumbled on it I cannot wait for it to release. I hope there will be some sort of Alpha or Pre-Alpha pre-order initiative so those who want to play and support the game can.

    Keep up the good work!

    Drew
    April 4, 2013 11:08 am

    I really like hearing your updates about the development process! It is cool to hear what problems you have fixed and in such an intuitive way! Can’t wait to play this game 😀

    JP
    April 4, 2013 11:42 am

    Keep updating, man! And I love the idea for music changes based on seasons, the set up of the town, the happiness, etc. By the way, you should start some sort of either pre-order or download now system so we can support it now. Keep it up!

    Blake
    April 4, 2013 11:57 am

    Where and how can I give you money???

    JK
    April 4, 2013 12:07 pm

    I haven’t followed an upcoming game this closely in a very long time. I love the idea of music playing differently based on seasons… That’s fantastic!

    Jagaimo
    April 4, 2013 12:47 pm

    Sounds fantastic. I can’t wait to play.

    I know you mentioned combat in the Q and A but aside from person to person combat, will there be bears, wolves and such in the woods that will randomly devour my citizens? Well, until I arm them well enough to fend beasts off, of course.

    If possible, it would also be great to have animals wander into town from time to time. You could implement an Age of Empires-like town bell until the citizens were armed well enough to fend animals off. Random events like that can be so frustrating at times but they can also make games like this so much more fun.

    And, as numerous people have mentioned before: Kickstarter?

    Lofi
    April 4, 2013 12:49 pm

    The audio stuff sounds like great ambiente. I’m eager to read your blog. What I’m curious about is how your game would look with a tilt shift effect. And can you please take my money?

    pad11
    April 4, 2013 1:39 pm

    I would gladly GLADLY support this project financially in any way I can…just let us know, we’ll help in any way we can :)!

    ranu
    April 4, 2013 2:09 pm

    keep it up dude! next notch.

    Temeez
    April 4, 2013 2:10 pm

    Fantastic work there! As you know (I hope), music is one of the most important functionality for desired enjoyment in games. :)

    Temeez
    April 4, 2013 2:11 pm

    Forgot to add:

    I would suggest not to use Kickstarter, unleses you really need the money.

    Kevan Embleton
    April 4, 2013 2:59 pm

    can’t believe how througher you are being, as always its always the smallest things that make the most difference.

    Li0n
    April 4, 2013 3:00 pm

    Good work with that :)

    Bill
    April 4, 2013 6:02 pm

    Yeah love it keep us posted one of your many fans.

    Tom
    April 4, 2013 6:46 pm

    When people are unhappy the game should play justin beiber

    Eric
    April 4, 2013 7:59 pm

    Every update makes me that much more excited about this game.

    eido
    April 5, 2013 2:05 am

    Winter confirmed for having the best music tracks.

    DanielCoffey
    April 5, 2013 4:32 am

    It is nice to see you are continuing to make efficiency improvements too. This is the beauty of writing your own tools… you can make intricate use of available memory because you have the time to do so.

    Kenelm
    April 5, 2013 5:06 am

    If the music in your videos are a good preview (prehear, is it a word ? It should be a word) of the score of the full game, this is going to be awesome.
    If they are not, I bet it will still be awesome

    Daniel
    April 5, 2013 6:45 am

    Kickstarter. Right now! :)

    Foolishcake
    April 5, 2013 8:44 am

    Good idea, I think you’ve taken the best approach to working on it.

    PenguinInATuxedo
    April 5, 2013 10:25 am

    Keep up the good work, I would love this to be on steam greenlight so I can throw my money at you and help shape this already amazing looking game.

    Horasm
    April 8, 2013 7:55 am

    Sort of music depending of the citizen mood? Woaoo! what great idea!