task 11 sound in game maker files

3
Sound in Unit 70 GameMaker Project For the GameMaker Project we created, sounds were incorporated into the game itself, as to add the proper feel a game should give. To start off, we had to pick the correct and corresponding sounds that would fit for the pieces we intended them for, and as such I chose a select few sounds, renaming them for their purposes and placing them in my GameMaker file- as shown below. With these sounds, I then opened GameMaker and my project itself within the GM software, and selected the files that I wanted to use. Once done, I then imported them into the system through the GM’s Sound Uploading. Once done, they show up as a menu tool in the GM main menu. Once that issue was sorted, I next, instead of incorporating them into an invisible object as so many others had done, scripted them directly into the game itself,

Upload: rwbybomb21

Post on 02-Aug-2015

27 views

Category:

Internet


0 download

TRANSCRIPT

Sound in Unit 70 GameMaker Project

For the GameMaker Project we created, sounds were incorporated into the game itself, as to add the proper feel a game should give.

To start off, we had to pick the correct and corresponding sounds that would fit for the pieces we intended them for, and as such I chose a select few sounds, renaming them for their purposes and placing them in my GameMaker file- as shown below.

With these sounds, I then opened GameMaker and my project itself within the GM software, and selected the files that I wanted to use. Once done, I then imported them into the system through the GM’s Sound Uploading.

Once done, they show up as a menu tool in the GM main menu.

Once that issue was sorted, I next, instead of incorporating them into an invisible object as so many others had done, scripted them directly into the game itself, therefore showing complexity, but also diversity from others’ solutions, in installing sound into the game.

The sounds I placed into the script were used as an executable piece of coding, which would activate as soon as the game started. With the executable code being able to happen instantaneously once

the game starts, it provides a seamless transition from- if you do- death to revival with the music restarting itself just as seamless.

This is the finalised coding for the background noises that were inserted into the game. Though this is only the music that was placed into the game, the principal is much the same, with each enemy and player character that has sound effects tied with them; below are the correspoding pieces of coding within the

characters and their effects themselves.

On the left is the sound that is hwne the player is hit with a standard shot, and to the right is the sound of the enemy object being fired.

This simple principal follows through with each sound incorporated into every object, each line of coding looking similar, if not near identical to this one.

Each piece of coding means that the sound will play once the enemy fires a bullet, and ,for example, if that bullet misses, the sound is continued until it reaches the end of the Room, of which will destroy and recycle said object. If said object hits the player, the player’s noise will cancel out the object’s one. This means that multiple objects can be fired from multiple sources without overlapping noises.