O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adjusting Volume

When two ships crash in your game, do you want the sound to be an earthshattering roar? When players are talking behind enemy lines, should their voices be barely heard? You can easily adjust the volume of your sound effects by using the SoundVolume command in Blitz3D. You can even manipulate the volume of a sound so that it changes in relation to an object. For example, let’s say you have an object far off in the distance. You can have the sound get louder and louder as it approaches your player. Let’s start by adjusting the volume of a non-moving object and then get a bit fancier by adjusting the volume of a moving object.

Start by opening the file called demo12-02.bb. It is the same file we used in the last section that has ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required