Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

: Changing the sounds of Spacewar First of all, get sound working on your computer so that you can hear the Pop Framework sounds. (You

: Changing the sounds of Spacewar

First of all, get sound working on your computer so that you can hear the Pop Framework sounds. (You need to have a sound card with speakers, and the speakers need to be plugged in. If you double-click the little speaker icon on the upper right of your Windows taskbar, the Mute button needs to not be checked. Also don't forget to see if your speaker has a manual, physical control.) Now try removing the SND_ASYNC from the playSound calls in the gamespacewar.cpp. Rebuild the program and see how it sounds. See what happens if you OR in SND_LOOP

. Now find some other *.wav file and incorporate it into the program. Where to find a *.wav file? First you can use Start | Find to look for them on your hard disk. Second, it's pretty easy to search the web for sites that have *.wav files for download. When picking sounds for effects in a game, avoid long sounds. For instance, once a student wrote a game where every time you shot something the game said 'Hasta la vista, baby,' and although that was funny the first few dozen times, it then got really old.

So get the *.wav, put it in the res subdirectory and add it to the resources. Give it a name like, say, 'Newsound.'

Now change the code so that when you shoot an asteroid it will make the 'Newsound' sound if the radius is bigger than some value, and it will make a 'Ding' sound if the radius is smaller than some value. What value? Look for some value that separates the big from the small asteroids.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Design Operation And Evaluation Of Mobile Communications

Authors: Gavriel Salvendy ,June Wei

1st Edition

3030770249, 978-3030770242

More Books

Students also viewed these Programming questions