
Many users have already discovered a phenomena where Play Music behaviors tend to trigger and process faster than the Play Sound behaviors. NOT RECOMMENDED TECHNIQUE 3: “Sound for Music” PROS: Organizes sound management in one central location high potential for performance gain.ĬONS:Time consuming to set up for some larger projects with lots of sound effects. This does not only apply to player characters – you can apply this technique to any and all sound effects that can be triggered off of game attributes, including enemies, environmental effects, and UI sounds. The benefit here is the sound manager actor will only have to process one sound call and no other complicated logic at the time the game attribute changes. So rather than the character triggering the Play Sound Behavior when game.jump is true, this sound manager actor would play the sound when game.jump was true. The alternative would be to have a single sound manager actor somewhere in your scene, most times hidden off camera, that is looking at those game attributes and only directing sounds to play. This is also traditionally where a jump sound behavior may be located. Then your character has logic in it to change its Linear Y Velocity to 500 when game.jump is true, resulting in the character leaping. For example, a jump button may trigger a BOOLEAN game attribute, “game.jump”, to true when pressed. For example, If you have a game with touch screen controls, or even invisible touch triggers for character actions, then you probably have game level attributes for each major action. Most major sounds in your game can probably be triggered by a game attribute.
#Question wrong sound effect code#
What this can lead to is poor code optimization and sound behaviors getting buried in the mix. The thing is, player characters usually have the most complicated logic compared to other on screen elements. If an actor runs or jumps or gets hit, all of those sound behaviors are typically placed inside that character actor.

The way a lot of folks implement sound is directly into the actor that makes sense. Basically, what a sound manager does is watch what is going on in any given scene and when an event happens it knows to play the corresponding sound. The core concept of this technique is to localize all of your major sound behaviors into one actor in each scene. If you still experience delays then you may need to do a little more work to address the problem.ĬONS: Potential for significant performance gains are low. This solution, though, is only a starting point. If you have really dense rules then this is a great way begin your optimization pass. Since GameSalad processes behaviors in the order they appear in the logic stack you can start processing sound before anything else if the Play Sound behavior exists first in the order of operations. This technique is an easy method to try first when experiencing sound delay. Every game is different and it really boils down to what makes sense for your situation.įor reference when we refer to “sounds” we literally mean sound effects, or more specifically sound that is not music. Please note, the following techniques are merely suggestions – not absolutes.
#Question wrong sound effect android#
While this post is aimed to alleviate some of the Android concerns, the practices we go over can apply to all platforms for varying degrees of sound performance gains. Check out for some background as to why GameSalad made the choice to support Nook and Kindle which use a modified version of Android’s OS notorious for sound delay. Many of our users have experienced sound latency issues from time to time, mostly apparent when playing games on Android devices.

He provides a set of best practices that can be applied to all platforms in order to improve sound performance. In today’s Question of the Week, Billy Garretsen of GameTeamOne explores the most commonly received questions (via the forums and customer support) surrounding the use of sound optimization methods when combating sound latency device issues. Resources include: webinar videos, Question of the Week answers, and Cookbook highlights. Salad Solutions is a compilation of educational resources developed by the GameSalad team. The GameSalad 2022 Video Game Creator Challenge: Rules and Guidelines.The 2022 GameSalad Video Game Creator Challenge.GameSalad 2020 Video Game Creator Challenge: Rules and Guidelines.GameSalad 2020 Video Game Creator Challenge.

