Game Engine Analysis 6

zhaozj2021-02-16  50

Game Engine Analysis 6

Original author: Jake Simpson Translator: to the sea Email: GameWorldChina@myway.com

Part 6 Sound System, Audio APIS

Sound system

Since people play games in kind and technological advances, sounds and music have gradually become important in the game in the game in recent years (sound is a playable feature of actual games, such as auditory tips in Thief and other similar games) . Nowadays, the four-channel surround system is affordable in the treasure house of the game player. Give space, noise disorders and occlusion, and dynamic music, now many games use these reactions to players, more attention is not surprising to invest in this area.

Now in the PC Arena, the game players actually have only one sound card to choose - Sound Blaster Live, PC Sound Card Manufacturers, Creative Labs! From the old time personal computer sound card manufacturer has creative center. Innovation companies have provided their EAX sound extensions for DirectX, and they are the founders of the new OpenAl Open Audio Library. Just like OpenGL is a graphic API, Openal, like it, is a sound system API. OpenAl is designed to support many features of most common sound cards, and a software replacement is provided when a particular hardware feature is not available.

In order to better define Openal, I asked the innovative company's Garin Hiebert asked its definition:

"A definition of our" Openal Specifications and Test "here:

Openal is a software interface for audio hardware and provides programmers to generate high quality multi-channel output capabilities. Openal is an important way to generate sound in analog three-dimensional environment. It wants to use it across platforms, similar to OpenGL in style and specification. Any programmer who is familiar with OpenGL will find OpenAl very familiar.

Openal API can be easily expanded to adapt to plug-in technology. Innovation companies have added EAX support to this API, programmers can use their sound environments to increase complicated responses, games and obstacles.

Like Jedi Knight II: Outcast, along with the Eagle World / Sound Feature Editor, Soldier Of Fortune II is characterized by this new system. What is EAGLE? Introducing this, let us discuss some other systems and define some sound terms.

Another system is a MILES sound system. Miles is a company that produces a plug-in for your code, how to take all the necessary sound cards (such as Sound Blaster Live! Series, or old A3D sound card) when fully utilizing each sound card (such as Sound Blaster Live! Series, or old A3D sound card). It is very like an API front end, bundled some extra characteristics inside. Miles in other things makes you access some things like MP3 decompression. It is a good solution, but like anything, it cost money and is your code and hardware. Although it is manufactured for fast sound systems, it is very useful, and they have time, so they are indeed proficient in their own business.

Sound term

Let us start barriers and occlusion. They sound like it, but not the case. Closure Basically, it is said that there is some closed obstacle between them when playing.

For example, in a screen lens in Nolf2, you hear the sound of bad guys in the house. You can hear them, but their voice is quite low and hoarse. Obstacles are similar, but the obstacles between you and the sound are not closed. A good example is a column between you and the sound source. Due to the echo in the room, you still hear this sound, but it is different from your voice to your ear. Of course, this really depends on what is the straight line between your ear and the sound source. And according to the size of the room, the sound source to your distance, etc., the required processing can become quite time consuming. Later, we will talk about tracking - foot can say that it is often a relatively slow frame rate. The A3D code in the Quake III has made these things, and these options typically improve the frame rate. TRIBE 2 is another victim of this disadvantage. Turning off 3D sound options, your frame rate is immediately improved, which is meaningful when you consider how much the TRIBES world can see how far you can see. Next, it is characteristic of sound substances. Most sound cards allow you to use a definable filter to fix the sound of the playback. For example, in water, or in a room covered in a fabric, or in a long hallway, or in the opera house, hearing is very different. It is quite good to change your sound according to your environment.

We return to Eagle ... This is an editor, allowing most of the first person shooting game map designer imports their map into this tool, then constructs a simplified geometry to generate a sound map for EAX code in the actual game engine. Its thinking is that you don't need a complex geometry of a real graphic map to simulate the sound environment. You can also assign sound substances to the generated simplified map, so that the sound environment can dynamically change. I have witnessed this demonstration on Soldier of Fortune and Unreal Tournament, which is indeed very eye-catching. I am in the wealth and the Unreal Tour and its soldiers are really eye-catching. When you jump into the water, he heard all the sound changes, this is a very immersive experience.

Ok, let's continue.

For game consoles, due to static hardware, your various possibilities will be more restricted - although on PlayStation 2 and Xbox, hardware is quite good. I said the restriction, just referring to the expansion, not what it can do. I won't feel surprised to see the game on these game consoles quickly support Dolby Digital 5.1 (Dolby Digital 5.1) output. Xbox, due to its MCP audio processor, you can use this feature to use this feature without special coding. Dolby brings the ProLogic II to PS2 and cooperate with Factor 5 to achieve Prologic II for Gamecube games. Above Xbox, Halo, Madden 2002 and Project Gotham Racing have 5.1 Dolby Digital Audio Content. DTS has recently released SDK for PS2 game developers, bringing the game on this platform to reduce the bit rate DTS audio version.

Location sound - a complex world

There are now some very few sound spatial problems. I am talking about putting the sound in a real 3D world. There are four speakers around you a great beginning, but this is still just in the two-dimensional direction. There is no speaker above your top and below, you don't really get 3D sound. There are some sound modulated filters to try to solve this problem, but there is no replacement of real things. Of course, most games most games are only in two-dimensional direction, so this is still not too big.

One of the most important features of any sound system is to mix the sound. Depending on your location, the location of the sound in the space, the volume of each sound size, once you decide, you can actually hear the sound, then you have to mix these sounds. Usually, the sound card handles these, this is the first to the main cause of the sound card. However, there are some engines to determine the first 'pre-mixing' with software. It didn't really bring much significance until you look at a little history. There are many different mixing methods when the sound card is originally introduced. Some sound cards can mix 8 kinds of sounds, some units, some 32, and so on. If you always want to hear 16 possible sounds, but you don't know if the sound card can be handled, then you go back to the road to try and experiment - it is your own software. This is actually a work mode of the Quake III sound system, but one question: "Quake III is released for the A3D and Sound Blaster Live! Sound Card World, which is more standardized more, why do you do this?" This is a good problem. In fact, the Quake III's sound system is almost per line code and the sound system in the Quake II. And Quake I, or even DOOM is also the case. You want to think, upload until the A3D sound card and SB Live! Sound card, many years have not really changed. Two speakers, two-dimensional direction, simple volume decrease with distance. From Doom, until the Quake III did not change too much. And in the game industry, if it is not forced, don't pay attention to it.

Usually you will only use DirectSound to make a sound mix, because it can use the sound hardware, or turn on the software, many places are just like DirectX to 3D display cards. In the 90% sound case, there is no truly difference between the software mixing to your frame rate. When DirectSound is even still not a wireless light in some fanatic eyes, the Doom engine has already generated. It has never been updated because it never really need to update.

Of course, you can use SoundBlaster Live! Some smart features of the sound card, such as the echo characteristics of the room: a cave, or a hall, a giant, a football stadium, etc. And you really should use the mixer provided by the hardware, after all, that is the purpose it exists. One of this method is that the program itself cannot obtain a mixed result, because the mixing is completed inside the sound card instead of at the main memory. If you need to see the volume you need for some reason, you are lucky.

Music TRACKS in Games (track in the game)

We have not too much to talk about music generation in the game. There are two ways, one is a simple music. WAV file (or equivalent). It is prepared in advance, ready to run, and minimal busy. However, these are expensive in memory and playback time. The second way encodes the MIDI track with a preset sample. This time is often saved, but the disadvantage is that some sounds must be mixed together, thus using light channels.

Dynamic music is based on actions to vote on your game, such as exploring a slow-paced music, fighting with fast pace. A difficulty in pre-produced music is to take a shot, so you can get from a piece of music to another music, which is relatively easy for the MIDI track. Although you often fade enough, or a piece of music has disappeared before playing another music, you can be lucky.

Before we left this theme, it was worth mentioning that there are some companies that have a specific meaning for your game. Fatman (www.fatman.com) is a company. Music may be more easily outsourcing than other things, which is what they exist. Finally, the game now is naturally MP3 format, allowing huge 11: 1 sound sample compression, but only costs only CPU before sending a sound card. When I work in Rave Software, in Star Trek Voyager: Elite Force, we try to use MP3 to fully support three languages ​​on a CD, and still leave space for more graphics. Mainly, our MP3 is only used for non-player role (NPC) voice, because the game's audio effect MP3 stream and dynamic decompression exceeds hardware processing power, although this is certain in the future. Comparison of new formats, such as AAC from Dolby and WMA from Microsoft, which provides equal or higher audio quality (actually half of the bit rate), which may be applied to future games.

The above is the content of this chapter, the following will be the development of the network and connection gaming environments.

转载请注明原文地址:https://www.9cbs.com/read-22028.html

New Post(0)