torsdag 27 februari 2014

Escape - Group 4 - Week 6 - Audio Options & Credits

Progress on the main menu is going surprisingly smoothly. Not only did I finish visual functionality in one day, but practical functionality is almost finished as well.
Both music and sound can now be muted and the slider for lowering sound works like a charm. This however has been tested with only one sound file. There's still a lot of work to make this work for every sound file in the game.
Music and sound has to be dealt with individually, since they work differently. Sound-files are loaded into game process and can be played and affected directly in-game. Music however, are streamed separately from the game and aren't loaded. Because of this, coding a function that affects all music is a bit tricky. Thanks to the sound manager, sound-files can be collected into one single variable. In order to make the sliders work for music, there needs to be code that makes reference for each music-file instead.
Muting the sounds is done directly in the sound manager. If a certain boolean variable isn't set to "true", the sound files can't be played. The music unfortunately has to be coded individually to be lowered down to volume 0. This is a pain, considering that the music will still be running in the background taking up memory space.
Nowhere close to setting up gamma in the options yet, right now I'm focusing on the audio and credits.

The hardest part this week was to get the credits-tab to work, strangely enough. The problem was that apparently, deltatime hadn't been implemented in the template my fellow programmer had given me the first week. So instead, I tried to work around this by using SFML's timer-system instead. It's much harder than it sounds, over a hundred lines of code went into making a decently working credits-tab.

The finished work so far:


In fact, it isn't that surprising how I managed to get this much work done so quickly. Since I had a lot of help, too much help in fact. During all this time, I was pretty much coached by the other two experienced programmers on the team. It seems that I just transcribed most of the code right from their mouths. At times, they were the ones writing it down for me.

This gives me a bad conscience. It feels like I can't take any sort of credit for the work done during the past week. Although I did learn a lot thanks to their help, so far it feels as if I'm just in the way of their work.



1 kommentar:

  1. That main menu looks really well made and it's got a great theme.

    I have been working on the sound and sound related artefacts for the past week and I am still working on it.
    I never thought about having a mute option for the music I should add that in to my own game.
    But I can see how it will be a hard thing to do to actually mute all sound files individually.
    But I was wondering can't you add a function in the sound manager that just lowers the volume of the music or sound if the bool let's call it mute is true and then send the volume control through that every time a sound or music is played.

    What was the big problem with the credits tab?
    I mean you write that it's that deltatime hadn't been implemented in the template that your group mates had given you.
    But why were you implementing it in such an early version of the project and not grabbing the newest version and implementing the credits tab in that version?

    But I really like the addition of a video to show off the look of the main menu I think I'll do something similar for my next post.
    But great post and an interesting read.

    SvaraRadera