Organizing sounds in the game
Developers implement sounds into Stencyl games in many different ways. For example, to implement our jumping sound effect, we could simply have added a new keyboard event in the Jump and Run Movement
behavior that reacted to the up
control being pressed, and then played the required special effect within that event.
There is nothing wrong with implementing sounds in this way, but it can make life difficult for the developer when modifying a game in the future. For example, if we had implemented 50 different sound effects in our game, and we later decided that we wanted to play them on a different sound channel, we would have to locate all 50 of the Play Sound
instruction blocks in our game. These blocks could be spread across several different behaviors and even in events that are attached directly to actors; locating them all would be a huge task which is time-consuming and error prone!
We have chosen to create a single behavior dedicated to managing sounds within...