Part One - It begins
Part Two - Technical Foundation
Part Three - Game Design
Part Four - Input and Physics
Part Five - More Physics Things
Part Six - Even More Physics
Part Seven - User Interface
Part Eight - UI and the Editor
Part Nine - Editor Progress
Part Ten - Progress, and videos
Part Eleven - Fixing the Physics
Part Twelve - Unproductive
Part Thirteen - Context menu + enemies
Part Fourteen - Enemies and Problems
Part Fifteen - Play testing
Part Sixteen - Editor and Art
Part Seventeen - Video!
Part Eighteen - Layers and Music
Part Nineteen - Water and Enemies
Part Twenty - Score and decisions
Part Two - Technical Foundation
Part Three - Game Design
Part Four - Input and Physics
Part Five - More Physics Things
Part Six - Even More Physics
Part Seven - User Interface
Part Eight - UI and the Editor
Part Nine - Editor Progress
Part Ten - Progress, and videos
Part Eleven - Fixing the Physics
Part Twelve - Unproductive
Part Thirteen - Context menu + enemies
Part Fourteen - Enemies and Problems
Part Fifteen - Play testing
Part Sixteen - Editor and Art
Part Seventeen - Video!
Part Eighteen - Layers and Music
Part Nineteen - Water and Enemies
Part Twenty - Score and decisions
This Week
Hello again TeamLiquid! Welcome back to my blog about the development of The Adventures of Sam the Pirate, the 2D platformer I'm creating as the final game project for my Bachelor of Software Engineering degree. Last week I talked about implementing the score and displaying it. I'll also talk about a decision I made regarding the number of levels, and have another new piece of music. This week I'll be talking about implementing FModto play background music. Bit of a shorter blog this week, as I've been looking for a new place to live, and shifting into some temporary accommodation in the mean time. So not as much time to work on the game as I would like, but that's real life for you I suppose. It's also Easter weekend!
Background Music
Integrating FMods low level api turned out to be really easy. Once it had been installed, I shifted the header, library, and dll files over into my project, so if I was to rebuild it on a different machine it will all just work, and took a look at the included example files on how to play sounds. Initializing FMod was only a few lines of code.
FMOD::System* system = 0;
FMOD::System_Create(&system);
UInt32 version = 0;
system->getVersion(&version);
if (version < FMOD_VERSION)
{
// incompatible version, throw an error
}
void* extraDriverData = 0;
system->init(32, FMOD_INIT_NORMAL, extraDriverData);
Once that was done, I could start playing sounds with only a couple more lines of code. There's some further error checking being done, but I've left it out of this example block of code. The function calls return an FMOD_RESULT, which can be checked to see if it is ok, and if not, there is another function to get what the error is.
Playing background music is similarly easy. Create the sound in FMod, then play the sound. Rather than load the music directly into memory, the file is being streamed as it is played.
Music
New piece of music this week, a piece I'm considering for the cave area of the game.
If you're interested in more music from the artist, he has a website over at Eternal Vibration that you can check out.
What's next?
Next week I'll get sound effects working, and start on a level selection screen. Next week is a short week as well, two public holidays!
Keep up to date!
Be sure to follow me on Twitter, and like the Facebook page to stay up to date on future content and blog posts when they happen. If you have any questions don't hesitate to ask, either through Twitter or Facebook! You can also check out the blog, previous posts, screenshots and videos over at my site.