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 Twenty One - Background music
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 Twenty One - Background music
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 FMod to play background music. This week I'll be talking about putting sound effects in, and a little bit about the plans for loading screens. Another short post this week, as it's another long weekend here.
Sound Effects
Easily got these implemented this week, in a very similar manner to how the background music plays, although because multiple sound effects could be played at once, I had to do make sure I took this into account. Sounds in FMod are played by loading the sound into a Sound object, and then playing that sound over a Channel, which is also its own object. The Channel object is used to pausing, and otherwise altering the sound while it is being played. So for the background music, it is fine to simply have one of each, and reload the Sound object when I want to play different background music. But for sound effects, as there are multiple sounds, I need a Sound and Channel object for each different sound effect.
I'd been avoiding using STL, or Standard Template Library in other parts of the project, as I didn't feel I needed any part of it. Everywhere else I know how many of each object I need, and so did not feel like I needed to use any part of STL, I could just use fixed size arrays instead of the STL containers.
I could have done something similar for sound effects, but decided it was faster and a more efficient use of my time to just use a couple STL maps, with the path to the sound effect acting as the key, and the Sound or Channel object as values. At this point in the project I only have three weeks left, so I just need to get the last few things working, and not worry about trying to do things optimally, getting things working is more important.
The sound effects are also pre-loaded during the levels load, to remove any lag from trying to play them the first time. Obviously though, if they have already been loaded, then nothing happens as the Sound and Channel objects for that sound effect already exist, so they're ready for use.
Loading Screens
The current plan for loading screens is to simply render a static image that says loading, perhaps randomising what image is displayed. I could use existing concept art as these background images for loading screens, or look at getting a few pieces quickly done for each area of the game. If I had more time, or had maybe planned things out a bit better, I would have like to use threading, to display some animated sprites on the loading screen while things are loaded in the background, or have a simple game for people to play while they wait for the level to load.
What's next?
Over the next week I'll get loading screens working, and think a bit about how to do a level selection screen. Overall I'm feeling pretty good about things, as once these two items are done, it just comes down to making the rest of the levels (easily done in the editor), and polishing the game up before the final hand in date.
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.