Sound and Music


How do I enclude sound and music?

So using my own framework "MonoEngine" on top of MonoGame which is built on top of XNA as far as I know, I prepared myself two handy service classes. The so called MediaPlayerService and the SoundService. Using the MonoGame Content editor, which is built in my VS Code, I can then import sound files. 
Importing sound files is appearantly less trivial than I thought. When I created the project way back in the beginning it was appearantly set to WindowsDX which is capable of running sound files for music on Windows. So far so good. But when I added my song files, I prefered them to be in the ogg file format, as this was supposed to be runnable on any device rather than just Windows. So even though my Content Editor could import the files, build them and set them as Song Files using the ogg pipe, it ran into an issue when actually building the project. That is because WindowsDX projects cannot build ogg files appearantly and so the binary directory actually containted I believe wav files. Sooo it came to a loading issue when running the game. Thanks to AI, I was not stuck for a while trying to figure out that I just need to change my project dependency from WindowsDX to DesktopGL. I am sure this will make it lesss optimized for Windows, but this game is a farming game and no competitive racing or shooter game. Interestingly, none of the above applied to non-music sound files. Because these very short sounds for navigating a menu for example are actually loaded into memory and handled differently appearantly because of it.

How did I get my music and sound files?

I made them myself! :)
Actually, that is not entirely true. I got some of my sound files for background bird chirping and crickets from Pixabay. I also encluded a background song from Pixabay as well. BUT - I also went to my local park and recorded a bunch of different stepsounds and "bush sounds". Initially it was a bit too realistic for the game but I got familiar with it very fast. I also play the bass so I plan on giving each future NPC kind of like a bass melody which the player may associate with the character. Doing that was a lot of fun and I was looking forward for that day for quite a while now.
One of the songs I use, which may or may not make it to the game is this one.

Anything else finished or worked on?

Yep. I finished a very small and humble "DayStateService" which exists only to feed a GUI widget to show day information to the player later. I wish it was more but...

...the current progress on my roadplan.

According to my smart little textfile containing my plans on development I have one week left to implement some GUI things like basic windows and notifications which may be used all over the place. Technically they also need logic for handling mouse input and stuff. However, I also realized that this is all way too much to do in one week. I already finished the music week and I know I need more songfiles and a little rework later on that road. So doing all of the GUI work will end up badly as well. So I decided to finish this phase of development early and add a whole new phase just for UI elements. So I gained 1 week of progress but added approximately 8 weeks of development. I am sure this will be healthy for the game overall so it is likely going to be worth it.

Mini post-mortem

Looking back at the work I did I am fairly happy. I managed to be back in time, although sound and music is not quite finished yet :/
I am very happy about the collision system and my refactor of the entities, which was a lot of work, went well too. This feels a bit like when I was finishing the scene handlers. It is just a very profound and robust system I can rely on. What would I have done differently? I don't overestimate vacations anymore. Also, even though I paid for some character graphics it feels like money very well spent. This is likely a dangerous pitfall but no investing may not be right as well. Next post-mortem will be more interesting as I hopefully share about my experience of adding a whole phase just for UI and if it was worth it.

What is next?

As I mentioned earlier in this post, I am going to work on the UI. But having 8 weeks dedicated for this allows me to really take this serious and set things in a way that I hopefully never need to touch ever again. Specifically I want the widget for day data like time and weather and stuff to be final. Also, I have ideas about windows which are going to be used for saving data, customizing the character and displaying carried items. This already assumes I add some specific features in the future, but they seem very basicso I go with it. Hopefully, I can show you then the menus :)

Get Slime Breeder (prototype)

Leave a comment

Log in with itch.io to leave a comment.