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.



torsdag 20 februari 2014

Escape - Group 4 - Week 5 - Sound Manager

In an earlier meeting with the advising 3rd year student, it was suggested that I shift my focus off the main menu and start working on something with higher priority. "Sound manager" was on the list in the backlog and as lead sound designer, I chose to start work on it.

To make my job easier, I searched the internet for existing open source sound managers. There were only two existing managers, strange considering you'd find many open source managers for example: sprite-, object-, level- and so on.
The one I chose was apparently for an earlier version of SFML and I was having issues converting it to the current version. I posted a thread in SFML's official forums, later that evening I received my first answer:
"The functionality that you want to implement is already provided by SFML..."

His argument was that SFML was already designed in such a way that it wasn't necessary to have a sound manager. The day after, I solved the issues myself and got the manager to work. Was he right though? It took about a week to get manager to work, was it worth it?

Granted, now that the sound manager is in place, it's quicker to load sound files and requires less code. But it saves about 2 minutes of time comparing to loading sound files the usual way in SFML. In the long run, I may have wasted more time than saving it for the project. I could've focused on other elements or finished work on the main menu.

However, this may have allowed us to save disc memory when launching the game. Instead of having to load sound files in every separate state of the game, every same sound file can now be accessed in every state from the same source. This also makes our game's file size smaller. It may have helped  optimize the game.

It may have been a slight waste of time, but it also may have been worth it to make our game more functional and stable. What do you think?


Work on the main menu has been resumed and hopefully the options tab will be fully functional within the next week. So far, I've only worked on the visual functionality (such as working sliders to control sound-, music- and gamma-levels). Also need to consider to add a fullscreen option after seeing a certain "psychotic" person, react to the lack of that option in earlier projects...

Here's a demonstration of what I've accomplished so far (including sound manager):




torsdag 13 februari 2014

Escape - Group 4 - Week 4 - Start Menu State

This past week, I've been working on the main menu. The first state that the player runs into when the game starts. First and foremost, I've been working on the menu's visual function. Doing this first will make it easier for me to program the practical functions.


I decided to work on programming the main menu, because of my little experience with C++ and programming overall. Graphics was done by Henrik Forsman. The design is inspired by 1950s commercial light signs and film noir.


So far, I've managed to load:
  • Background image
  • Main Buttons
    - Lighting up when hovering mouse over them
          - Lit up permanently when selected (clicked on), until any other button is selected
  • Selection Arrows
    - Appearing left of the buttons when hovering mouse over them
          - Lit up and placed permanently when button is selected, until any other button is selected
  • Title logo
    - Randomly turns on and off every half second

  
Background Image

Drawn by Henrik Forsman. It's a picture of the room the player starts in the first level of the game.

Main Buttons & Selection Arrows

I think it's unnecessary that we need buttons that turns on and off as well as selection arrows. For selected buttons, it would be just fine if they were permanently lit up. The arrows are unnecessary in my opinion, I'm following Theodors and Henriks direction however.

Title Logo

It took a while to make its on and off cycle balanced. It easily got too sporadic or inactive. I've tried to implement a buzzing sound that plays while it's lit.

The idea behind the menu's design is that anyone who's watched 50s or noir films or anything inspired by them will immediately recognize the style and be put in the game's atmosphere, even before playing.

Comments

I'm starting work on the options tab and the sound manager. I'm not really happy with the amount of content I've managed to implement so far. My lack of experience is no excuse.
The rest of the team worked on the first playable version of the game, while my work isn't even one the main priorities of the project.

The sound manager will probably be easy to program considering how simple SFML is to work with. After I'm done with that and the main menu, it's uncertain what I'll work on when it comes to programming. Since I'm given the roles of level- and sound designer, it might be time I start acting them.