Continuing the sound implementation.
|
This week I have continued working on the sound implementation, the same thing that I have essantaly been working on for 2 weeks now, however last week I was doing alot of sound gathering of sound as well as sound testing, and almost no programing. this week however I had to focus almost single handedly on programing since most of the other stuff was done, and the beta was comming so all the sound had to be in the game. So basicly my task for the week was to implement alot of sound effects and theme music and make them play in the game at the correct time. At first I was just trying to get any sound playing in the game. and that was no major problem for me I did manage to figue out how to code it at an early stage. it was first when I needed to put that sound where its suppose to be it things got really hard to me, I had the code to make the sound play, and I knew where to put it, but still I could not make it work. the reson why was really becuse I made things kinda messy However eventually with some time and some help I managed to get a good structure going, where putting the sf::Sound and sf::Soundbuffer in the hpp files as well as having an servicelocator really helped. Now I could get the sound to play where I wanted it to with ease, and finished the movment sound shortly after. The next sound I was going to add was the theme music this was relativly simple but still a bit tricky since sf music dose not work the same as sf sound. after that I added a sound for when you take dmg as well as one for when you collect vegetables, this was not hard at all to implement with the new sound system. after that I added an delay on the This week I can say for sure that I did learn alot in programing, I learned more about classes and how they work and how you can comunitate between, them I learned about the hpp file and how to control it and so on. So basicly it was a good week for me got alot done that I do think is hard and learned thing along the way. |
and did not have that mutch structure with my code, my code was on the wrong places, I had bad to no pointers between classes and so on.
walk sound so that the sound starts 2 secounds in for the reson that there was an delay on the sound until is acuelly started to make any noise, this fixed the problem but it was not that easy to do and took me some time to manage. for the rest of my time I just contined adding sound into the game and have now managed to add 7 sounds with all the importaint once being there for the beta.