sfx

All posts tagged sfx

The specialization project was finished Friday 21/03/2014. That week I spent the first two days implementing the highscore list function and finishing the sound effects. I ended up with two different highscore lists, one for the cooperative game-mode and one for the versus game-mode. The difference between them being that in the cooperative list the names are made up by the first seven characters of each players name, instead of just one name per line in the versus highscore list. When a game is finished the highscore is sent by the host to the server keeping them. After it have updated the list (if it was necessary) the updated version is sent back to the host, who will forward it to all the clients.

The problem that I had with the sound effects that wouldn’t play was that I didn’t handle other things that a WAVE file could include like ‘fact’ about the media. After fixing this and actually reading the ‘data’ into the sound effect they played nicely. So I ended up with three different sounds for explosions, one laser sound, a thrusting sound, two sounds for the saucers and two for the background heart beat that’s playing like an background music/effect.

I’ve done loads of small fixes trying to get the game to be more stable, and then I finally set the version to 0.1.0, the first official beta!

Over all the project has gone well. I’ve succeeded with creating my Asteroids game and integrated a network solution with functions that reduces the feel of latency and increases the playability of the game. The game supports up to four players, have sound effects, text and highscore.

The downsides under this project have been that I was behind my schedule the last weeks, even though I somehow managed to fix everything before deadline. I feel that I stated that I would have too much done at the end of the project in my report, and what I stated was pretty specific too. I had pretty hard last weeks when I had to fix the sound effects and highscore, and would gladly have skipped the audio if I could. but I’m glad I didn’t, because I managed to implement it and it really brought the game to life.

Main Menu, first beta

Main Menu, first beta

Browsing servers in the server list

Browsing servers in the server list

Top 10 cooperative highscores.

Top 10 cooperative highscores.

Top 10 versus highscores.

Top 10 versus highscores.

Game Over screen.

Game Over screen.

Masteroids

Masteroids

And so on the second last week, the creator of Masteroids introduced death into his game. He saw that is was good and so he moved on to the next task.

This last week I’ve got a lot of work done. I implemented lives and that players can die, and get a Game Over screen. I implemented the saucers, one big that fires at random and one small that aims at the closest player. I limited the amount of bullets in the air (space) from the same player to 4, which is the same number as in the original Asteroids. Also the time to live on the bullets are much shorter, so you never feel ‘out of ammo’.

I had a huge bug in the game that slowly made my controls for the ship stop working, one after the other as the game was played. It only appeared when I spawned saucers, so I obviously thought that was the origin of the problem, but then I found out that my input manager thought that several buttons were pressed, starting with the first char and going upwards, until it said that I was pressing all the controls at once and the game then crashed. This was very hard to debug, since every single try that I made had to go on for 2-3 matches where I spawned a hell of a lot saucers. It showed up to be a problem with how I had implemented my input manager (I’ve had problems with it before, probably the same source of the problem, but I thought it fixed), the problem was how I stored the boolean array indicating which buttons were being pressed and not and how I used it. I ended up converting to the C++ way, using a vector instead of an array, and passing copies to everywhere instead. This ultimately solved my problem.

I’ve done lots of improvements and bug fixes as well. I fixed so every entity have width and height that they take into account before going over one edge and reappear at the other side of the screen. I tweaked the font a little so that smaller font looks better at original resolution, and started using it through out the game. I’ve implemented so the player(s) get an extra life per each 10.000 points they score. That smaller saucers appear more frequently until a score of 40.000 when only they appear.

I’ve also implemented sound effects, is really brings the game alive. I ended up using OpenAL after lots of effort spent on PortAudio that I just couldn’t get to work. Both of them are cross-platform and I find that important when selecting a library (so is LodePNG and FreeType that I use). I don’t have all the effects in the game yet, but that shouldn’t take long. I got hold of some of the original sfx from Asteroids that I’ll be using, but I’m currently having problems with the saucer sounds, they appear to be to short to play, ending up saying that they have no data on them. VLC can’t play them but Movie Player can.

I’ve started on the highscore synch and will complete it this final week. Same goes with the sound effects. Then there will be bug-fixes and play-test so that I can improve the game overall.