I have been studying Harvard’s CS50’s Introduction to Game Development course on EDX, and as part of this I have to submit a game I’ve created as my final project. This series covers my progress while completing this project.
- Game Dev Blog #0
- Game Dev Blog #1: “Final Project” Approach
- Game Dev Blog #2: “Final Project” Prototyping
- Game Dev Blog #3: Prototyping continued
- Game Dev Blog #4: Clinging on for life
- Game Dev Blog #5: Prototyping almost complete
- Game Dev Blog #6: Prototyping to Production
- Game Dev Blog #7: Animations!
- Game Dev Blog #8: Sound!
- Game Dev Blog #9: More component libraries!
- Game Dev Blog #10: Enemies and backgrounds
- Game Dev Blog #11: The Pareto Principle
- Game Dev Blog #12: Game and course complete!
Three Achievements, Two Things Learned, One Thing Coming Up.
Three Achievements
- Sound Manager. I’d been thinking about how I want to manage sound in my game. My approach has been to create an abstract SoundManager component, that can be game agnostic (usable in other games I make) with a tagging system, when loading in sounds. Which let’s me add sounds like this:
SoundManager:loadSound(“hurt”, {“assets/sounds/hurt0.wav”, “assets/sounds/hurt1.wav”}, {“pitchable”, “sfx”})
Which I can then use like:
- Adjust the volume of all sfx sounds setVolumeForTag(“sfx”, 0.5)
- Play a variation of a sound, e.g, SoundManager:playTaggedSound(“hurt”)
- Pitch the player sounds for different characters: SoundManager:setPitchForTag(“pitchable”, 1.7)
- Sounds added! With the sound manager in place, I’ve now got sounds added for player walking (on dirt and stone), digging, jumping, getting hurt, death, pulling themselves up, and whistling when idle.
- Background music and ambience! I thought it’d be cool to have sounds of birds when the game starts, but as you go underground, the ambience changes to cave sounds like dripping water.
Two Things Learned
- OpenGameArt is great! I’ve been able to find a lot of sound effects on this website, which I will credit in my game. At some point in the future I will likely swap them out for custom sounds.
- Sometimes you have to make your own libraries. I did wonder if there was a sound manager library that already existed. A saw a couple but they were either not maintained or didn’t do what I wanted. Sometimes you’re better off just making your own component library, which gives you the added bonus of being able to customise it to your needs.
One Thing Coming Up
- Build 0.1.0.9 will contain sounds to go with the animations added in 0.1.0.8 – it’s starting to feel like a real game. Next job will either be to make the health bar tween when taking damage, and then working on customisation options to let the player decide how they want the game to function. I already have a config.ini file in my projec to store the version number. I’ll probably create another abstract game-agnostic ConfigManager component that works for this game, but can be re-used in other projects.

No responses yet