CoC Development Diary #4
|
Hello there. Welcome to this week’s development blog for Crown of Creation. By the way we are still finalizing the name for our game. The current team favorite is Stilia and the Crystal Trees (stilio is spider in Latin). We got this idea from Ori and the Blind Forest. Since we have our beta presentation on next Monday, the goal for this week is implementing everything we have made since Alpha and make sure the game runs as smoothly as possible. So my work of making sound effects continues this week. First thing I did this week was not implementing new stuff but fixing some old problems. Last week I mentioned that we had to limit player fire rate because the sound for shooting overlaps if the player ever tries to spam shooting. But I felt that it is not ideal to change the gameplay because of sound. So what I did to fix this problem was cutting the shooting sound in half and when implementing it, I limited the sound to play once every 0.3 seconds. This can be easily achieved by using an if statement. So first I declare a float called sound_time, then when the sound plays, I assign Time.time to this float, so now it records when the sound is last played. Then I add 0.3 seconds to sound_time. Now before playing the sound, the if statement checks if the current Time.time is greater than sound_time, so the sound only plays if it is later than 0.3 seconds since the last time it played. There is one thing about this that is a bit catchy. So if there are more than one sound effects associated to this object, the code that assigns Audioclip to Audiosource must be placed under the if statement, otherwise it will be replaced by the other sounds and doesn’t play correctly. After the fixing, it was implementing. I found a whole bunch of really nice sound effects from Sonniss.com. They are currently giving away high quality free sounds. And most importantly, all the sounds are royalty free. So take a look and have fun!
Will be back next week |

