Hot answers tagged

23

When you are asking for "all the rights", then you need to ask youself if you really need "all the rights". I don't know your long-term business plan, so I don't know which of these rights you actually need: Use the music for your current game (ok, that's obvious) Use the music for any future games Be the only one who is allowed to use the music for a game ...


16

Sure you can, it's just not trivial to get it sounding "nice". I don't know how to do it in Linux, but if you can play a PCM buffer, all you have to do is fill it with whatever you want. So supposing your buffer is set to play in monaural, signed 16-bit samples, at 44100 samples per second, creating a pure (sinusoidal) A4 sound (440 Hz) is as simple as ...


16

TV Tropes calls this Voice Grunting: Voice acting is ubiquitous in video games today, but in the old days, when budgets were smaller, sound hardware was more basic, and disk/cartridge space was limited, developers had to resort to text. In games where story was emphasized, they figured some of the drama was lost when a potentially emotional scene ...


14

From your question, it sounds as though you have no problem designin/acquiring sound effects, and just need to understand implementation approaches. How would you organize and use sound effects? There's one major principle you need to understand when it comes to game audio which is obvious in hindsight, but not everyone gets on their first approach: "...


9

In the Scene view, you will find a little toggle, near the 2D toggle, at the right of the lightning toggle (with a little sun icon). Try to uncheck it to mute the sound in the scene. Otherwise, in the Game window, you have a toggle called "Mute Audio", between "Maximize on play" and "Stats" toggles, just check it! If you want this toggle to be turned on ...


8

Found the answer myself :) Apparently you have to do this: SoundEffectInstance qwe = yourSound.CreateInstance(); qwe.State ... And that state will contain... well, the state of the sound. Also SoundEffectInstance countains bunch of other useful data.


8

Do playtesting and see how the testers react to it. Possible complains the testers could have: Unnecessary or even misleading voiceovers distract from the gameplay Bad or inappropriate voiceovers break immersion Voiceovers which are repeated multiple times become annoying. Important voiceovers aren't understood because the player is distracted when they ...


7

I decided to give this problem another try today and finally managed to load an OGG file at runtime into a SoundEffect object. Here's what I did! First download the library below which contains a class capable of decoding OGG files: Prerequisite - Download library http://oggsharp.codeplex.com/ The library already has an example, but it uses ...


7

There is a simpler way to do looping: alSourcei(source, AL_LOOPING, 1); enables it for a source and alSourcei(source, AL_LOOPING, 0); disables it.


6

I'm not familiar with SharpDX but I know a bit about the native xaudio C++ API. You can't call DestroyVoice() in a callback at least in the native API which I assume StreamEnd delegate is a just a thin wrapper for OnStreamEnd() callback in the native API. A workaround may be queuing the sourceVoice to a "deleteList" in the OnStreamEnd callback and deleting ...


6

In reality, our hearing is adaptable. Just like our vision adapts to different light conditions by becomming more or less sensitive, our hearing adapts to different noise coditions. Unfortunately this doesn't work as well for computer audio output. But you could simulate it. When the game gets particularly noisy, reduce the overall volume down to a bearable ...


6

In a game, music would be the a way to play background music and sound the way to play sound effects (ej. jumping, firing, etc). Music is a special streaming channel of the Mixer. This means the file is streamed from disk in small chuncks and not loaded at once. Pygame only supports one Music at a time but you can have several Sound objects playing at once,...


6

Do it via events. Spell begin is an event. Start playing the sound for that event. Enemy getting hit by spell is also an event. If the enemy is further away and you Throw a dart, for example, you only play the second sound (dart hitting) once the dart reaches the target (if you consider Throw as a spell). If you need to tie it to a frame (so for example,...


6

This is a line-of-sight problem in disguise, and if your walls are vector based you can apply mechanics typically used for realistic lighting to it. If not, you can vectorize them and apply the same algorithms. You have sound sources and listeners, and you can think of walls as casting "sound shadows." For refractive sound (around corners, down halls) ...


6

When you say 'synthesis' do you mean pure analog/additive/FM synthesis from scratch, or would a sample-based approach be acceptable? If you can't use combinations of real-world audio samples then this is more complicated process. Trying to generate truly realistic sounds through synthesis isn't the standard way that most game/virtual instruments/sound ...


6

Looking at the documentation of PlaySound() on MSDN it states: The SND_ASYNC flag causes PlaySound to return immediately without waiting for the sound to finish playing. The conclusion from this information, although not explicitly stated there, is that PlaySound() waits for the sound to finish playing, if the SND_ASYNC flag is not specified. Therefore ...


5

You can access any object in your hierarchy by searching for it: GameObject soundObject = GameObject.Find("BackgroundSoundObjectName"); Then you're likely going to want to access the AudioSource component: AudioSource audioSource = soundObject.GetComponent<AudioSource>(); Then you can use the Pause() and Play() methods of the audio source to ...


5

I'm pretty new to LibGDX but I don't think it would be too hard to implement your own version of a "master volume" - just have a float variable called master volume and then use it whenever you play your music and edit it how you please. For example: public static float mastervol = 1f; //playing your sounds sound1.play(mastervol); sound2.play(mastervol); ...


5

As mentioned by Philipp, The Microphone class is indeed what you want to use. The AudioClip that it produces is your audio buffer. When you call the Microphone.Start() method, you are opening the connection to the physical microphone, and the AudioClip is where the input is stored for you to access the sounds. The Microphone.Start() method has a parameter ...


4

That's a really great question. I used to wonder the same thing which is one of the inspirations of my webpage: Game Creation Tools Its lists a variety of DIY tools to help in the game creation process plus they are all free! (Including Texture creators, 3D modelling tools, sound effect generators, skybox creators and more.) Now to answer your question ...


4

For chiptune sound effects, there's one definite answer: sfxr. It's a standalone application that you can use to generate samples, but the source code is also available should you want to integrate it to your code.


4

This problem is usually a sound design problem, not a coding problem. These problems occur mostly because of insufficient use of random variations in sound samples. You should first make sure you are using a pool of different recordings of the same sound and play a random one each time you fire a bullet, or make small random variations of the pitch on the ...


4

Harmonizing the soundscape is another level of polish you can apply to your game, and it works like this: If you're going to be playing a lot of the same sounds over and over, and most action games need to, you don't want it to get annoying. So you fine tune the sounds so that they don't clash but still sound pleasant, or even musical, when played together. ...


4

The problem with stock audio is that they are often overused. It can be very confusing for a player when they hear a piece of music in your game which they recognize from media related to a different IP. This can be a real immersion-breaker, because they will immediately wonder "where did I hear this before?" instead of staying concentrated on your game. ...


4

I found the reason for this. It is a setting called Doppler Level. After setting it to 0 it sounds normal even if the audio listener is moving very fast.


4

Unity provides you with Collision.relativeVelocity https://docs.unity3d.com/ScriptReference/Collision-relativeVelocity.html The basic example inside the documentation already solves one of your problems: Don't play a sound, when the collision occured with a low velocity by using a threshold. This prevents small unwanted turbulence inside the physics engine ...


3

Almost all sound libraries (DirectSound, XACT, XAudio2, OpenAL, Core Audio, etc.) support changing the playback rate of your sounds. By doing this, you will effectively be changing the sound pitch, so you can use this for example, to make car engines sound higher programmatically as they move faster. Also, many libraries support more advanced sound effects. ...


3

To be fair, there are a lot of resources I've seen on various game development websites; the forums at gamedev.net come to mind, and there is a list of other websites available here. Generally speaking, you either put together a resume and portfolio, and let people come to you, or you go asking around at specific companies, which is riskier and brings on ...


Only top voted, non community-wiki answers of a minimum length are eligible