Thursday, 27 February 2014

Unit 73 Sound for Computer Games

We're privileged to live in an age where a sound isn't limited to its initial output, we can alter them with ease through the use of computer software which allows us to take a simple noise and turn it into what ever we within reason want.

The screenshots below should hopefully go some ways to making a point of how quickly and easily you can alter a sound recording.


This screenshot shows how the original sound file can be quickly cut to remove any unnecessary gaps in audio. This makes for a much more concise audio segment which then requires no queueing and can be played


Here you can see how the all the processes you've used to alter the audio are listed in a table which allows you to easily rearrange and toggle them on or off.


This image showcases the interface for one of the reverb functions, PlatinumVerb. This interface allows you to play your audio sequence whilst altering all the settings, thus letting you hear every individual alteration without having to replay the clip a hundred billion times to try and pin down what the difference between one play-through and the other is.


The above 2 images show how equalising a segment of audio changes the waveform. The first wave is how the audio looked before equalising and the second one is post equalisation, as you can see there is a much smaller difference between the peaks and troughs. This means that the loudest and quietest parts of the clip have less of a range between them, reducing the chance of eardrums being burst by unexpectedly loud noises.


Sound in Interactive Media

The world of interactive media is constantly evolving and changing in pretty much every aspect. To use video games as an example, graphics are improving as polygon counts go up, the quality of the average game is going up as the computers that produce games are ever upgrading and evolving. You’d be forgiven for thinking that the sound aspect of games and interactive media on the whole is remaining the same or stagnating, though it definitely isn’t.

As we surge forward with advances to our computers the sound industry also benefits as the tools they use to produce audio also evolve and progress. Sounds needn’t at your finger tips in order for you to be able to record them anymore, today’s technology allows us to synthesize any noise through the use of audio-altering software such as Audacity or Logic Pro. These programs allow us to take a tone from a built in sample library or use a recording and apply a seemingly endless amount of downloadable or preinstalled filters, distortions, reverbs etc to it. Simply put, if you have the required proficiency with such software you can take one sound and manufacture it into what ever sound you require.

With all this talk of digital sound advancing and evolving you could mistakingly think that the world of authentic, organic sound is dead on the water and doomed to be left behind, though that’s far from true. If the specific sound an interactive media developer requires exists in the realms of our normal word and he/she has access to a decent Foley artist then there’s a good chance that sound will be produced au naturel. A Foley artist, if you didn’t know, is a person responsible for recording sounds to be used in media when that sound would be difficult to obtain at the clarity and volume required by the director. For example, if there’s a scene where a man on horseback rides onscreen then odds are you’re not hearing the actual sound made by that horse as it moves, it’ll be a man or woman in a soundproof room messing about with two halves of a coconut and some chains respectively, these sounds will then be placed over one another. Once you start thinking about how often Foley is used it’s difficult to ever see films or TV series the same way again, you’ll begin to notice that the sound of that man sipping his coffee or the sound of that raven squawking overhead are all made post filming. Unfortunately for me it’s seeming quite hard to disregard this knowledge and some magic has definitely been lost.

Stepping away from the doom and gloom of ignorance lost, interactive medias such as games often make very good use of voiceovers. These voiceovers help to set a narrative and without them the game could well be much less immersive in that the characters around you would be without a voice and as a result will almost always be less relatable. Just like a good Foley artist will be able to recreate the sound of a horse riding through down a cobble road or a good sound engineer will be able to fabricate sounds of explosions, a good voice actor can give life to a character and instantly and quite literally set the tone for how that character will be received. If you were to go back and rerecord the iconic voices of certain characters it would instantly change the feel of the game, think Duke Nukem with a high-pitched child’s voice. The tone of the game would instantly be set very differently.


In conclusion I feel like I’ve gone some way to explaining just how vital sound is in interactive media by explaining just some of the ways it’s produced and used. It’s hard to imagine what things would be like if we still were constricted by the limitations of sound production in the past, change from one year to the next is subtle and so it’s hard to notice them but when you look back at films such as the original Star Wars and imagine that the sound of the blasters was the pinnacle of audio production today as it was all those years ago then it’s plain to see how far we’ve come and how far we’ll likely go in another 37 years. If nothing else, it all sounds pretty decent to me.

Thursday, 9 January 2014

Unit 67 Computer Game Engines

The term game engine refers to software framework specifically designed to create video games for consoles, mobile devices and personal computers. Functions provided by game engines include rendering 2D and 3D graphics, a physics engine for collision detection and response, AI, sound, scripting, streaming, networking, memory management, threading and localisation support. Game development can generally be sped up by adapting or reusing the same engine to create multiple games or make it easier to port a game to multiple platforms.





The Unreal Engine

The Unreal Engine is a game engine developed by Epic Games and initially illustrated in the 1998 FPS Unreal. Though the engine was primarily developed with FPSs in mind, it has since been successfully used in a variety of genres, including RPGS, MMORPGS and stealth games. 

The code for the Unreal Engine was written in C++ and features a high degree of portability. As a result, the Unreal Engine is a valuable tool used by many game developers today.

The Unreal Engine has had 4 generations to date:

The Unreal Engine 1 - The first engine produced by Epic Games integrated rendering, collision detection, AI, visibility, networking, scripting and file system management into one complete package. The Engine became popular due to the modular engine architecture and the inclusion of a scripting language which in turn made it easy to mod including full conversions of games such as Tactical Ops, a port of Unreal Tournament which was rewarded with its own retail release.

The Unreal Engine 2 - The second version of the Unreal engine made its debut in 2002 alongside America's Army. The new generation of Unreal Engine saw the core code and rendering engine completely re-written. Additionally, UE2 featured UnrealEd 2, a map editor tool, which was followed shortly after by UnrealEd 3.

Among the final builds of the UE2 were the UE2.5 builds. These later engines included improvements to rendering performance and added vehicle physics, a particle system editor for UnrealEd, and 64-bit support in Unreal Tournament 2004.

The Unreal Engine 3  - The third generation of the Unreal Engine was designed for DirectX as well as systems using OpenGL, including PS3, OS X, iOS, Android, Stage 3D for Adobe Flash Player 11, JavaScript/WebGL, PlayStation Vita and Wii U. With the use of an advanced renderer the engine supported many advanced techniques, such as HDRR, per-pixel lighting, and dynamic shadows whilst also building on the tools available in previous versions. 

As well as being used as part of the games industry, UE3 has also seen adoption by many non-gaming projects like Lazy Town (during filming to generate virtual sets infront of a green screen), the animation software 'Muvizu Play', and in March 2012 the FBI licensed the Unreal Development Kit to use in a simulator for training.

The Unreal Engine 4 - The fourth in the Unreal Engine series was targeted at the eighth generation of PC hardware and consoles (Xbox One, PS4 etc). one of the major features of UE4 is real-time global illumination using voxel cone tracing, eliminating pre-computed lighting. UE4 also showcases new features aimed at developers to reduce iteration time and allow for direct updating of C++ code. There are also new features for a visual scripting engine called 'Kismet', these new features allow for developers to directly visualise code whilst testing. This then allows for the developer to jump to the source code and edit it, elements in the game can also be clicked on directly to change more easily whilst in the game world. These features result in a reduced time to compile code and allows game creators to tweak settings in real time.



The Frostbite Engine

Frostbite is a game engine developed by EA Digital Illusions. The Engine is currently designed for use on current and next gen consoles and has been adapted for a range of game genres. The engine was first used to create first-person shooters but it has since expanded to include various other genres such as racing and real-time strategy games. 

The first generation of engine was used for DICE's in-house games Battlefield: Bad Company, Battlefield  1943 and Battlefield: Bad Company 2. The engine launched with the release of Battlefield: Bad Company and subsequent titles employed an updated version referred to as Frostbite 1.5

Frostbite 1.0 - First debuted in 2008 with Bad Company. It features HDR Audio, which adjusts different types of sounds volume and lets players hear important sounds clearly even if other noises are being simultaneously generated (for example a gunshot being louder than the in-game music due to the volume of the music being lowered whilst gunshot noises are being generated). It also featured Destruction 1.0, which allowed for certain objects, like walls, to be destroyed in real time.

Frostbite 1.5 - Debuted with Battlefield 1943 in 2009, Frostbite 1.5 improved the in-game destruction capabilities with Destruction 2.0, allowing players to destroy entire buildings instead of just walls.

Frostbite 2 - Debuted in Battlefield 3 in 2011, Frostbite 2 took advantage of the DirectX 11 API and 64-bit processors yet didn't support DirectX 9 and therefore Windows XP. The Destruction feature was upgraded to 3.0, creating more refined physics than it's predecessor and quasi-realtime radiosity using Geomerics' Enlighten technology.

DICE gave several presentations on advances in their rendering technology, primarily focusing on animation, 
destruction, scale, rendering and audio.


-SIGGRAPH 2010:
"Tile-based deferred shading acceleration" via DirectCompute. This is being ported to the PlayStation 3'sSPUs.
Morphological Anti-Aliasing (MLAA), again implemented with DirectCompute, for bandwidth conservation.
Quasi-realtime radiosity using Enlighten from Geomerics.
-GDC 2011:
Improved environmental destruction.
-SIGGRAPH 2011:
Realtime approximated subsurface scattering.
Separable bokeh depth of field
Tile-based deferred shading on Xbox 360
-GeForce LAN 6:
Temporally stable screen space ambient occlusion (SSAO)
-Other:
DICE's lead graphics guru, Johan Andersson, presents an in-depth examination of Battlefield 3's game engine and visuals.
Streaming data from disc to memory: "We can have 512 megs every hundred metres if we wanted to."

Frostbite 3 - Frostbite 3 is the current Frostbite engine designed for use alongside Battlefield 4, Need for Speed: Rivals and the upcoming sequel/prequels Star Wars: Battlefront and Mirror's Edge. The new engine has several upgrades including improved tessellation technology and Destruction 4.0, which enhances the in-game destruction.

Torque 2D - Torque 2D is a powerful, flexible and fast open source engine specifically dedicated to 2D game development on OS X, Windows and iOS devices. Torquescript is a fast and easy to use C++ like scripting language that ties all of the various elements of a project together. It supports a large complement of functions including math, object manipulation, fileIO, and more. 
Features of Torquescript include:
-Object-oriented programming
-Transparent interconnection with external C++ objects
-Built-in fast 2D math (vectors, matrices, and quaternions with all corresponding functions)
-Well-documented standard library (hundreds of functions out-of-the box)
Most game functions can be programmed in Torquescript, and engine additions such as physics or intense AI coded in C++ are called from script.
This engine also uses a physics system along side it, which is done through Box2D. This allows you to simulate rigid bodies inside the 2D environments.
In terms of sound Torque uses the OpenAL sound library that features:
- SFX/Music driver
- 2D sound support for panning, volume, Doppler, cones
- Multi-channel prioritized manager