![]() In your code's setup section, create a variable representing the sound file you want to use: ouch = (os.path.join(s, 'ouch.ogg')) Trigger a sound ![]() To keep your compatibility high and your download size low, convert these to Ogg Vorbis with a tool like fre:ac or Miro.įor example, assume you have downloaded a sound file called ouch.ogg. When you download a sound file, it might be an MP3, WAVE, FLAC, or another audio format. Most video games use OGG sound files because the format provides high quality in small file sizes. The filename is completely arbitrary, and the simpler it is, the easier it is for you to type into your code. If the sound file has a complicated name with spaces or special characters, rename it. If it comes in a ZIP or TAR file, extract it and move the sounds into the sound folder in your game directory. When you find a sound that you like, download it. It's available on all major platforms and exports to Ogg Vorbis (OGG) audio format. The excellent LMMS audio workstation is easy to use and ships with lots of interesting sounds. You might also try making your own music. To give your sound sources credit, list the sounds that you use in a text file called CREDIT, and place the text file in your game folder. Read the conditions of use carefully before bundling any with your game! Musicians and sound designers work just as hard on their sounds as you work on your code, so it's nice to give them credit even when they don't require it. Some sound files are free to use only if you give the composer or sound designer credit.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |