Thursday, September 19, 2013

The Source Engine...





The only Source of knowledge is experience

In 2004, the VALVE Corporation came out with a game engine that changed everything. The Source Engine was not only famous for its notable technology but also for the several popular titles that resulted from its design. With Counter Strike, Half-Life 2, Team Fortress and Portal among many more award-winning developments under their belt, Valve knew that the original Source Engine was just the beginning of a powerful legacy that would set standards for game engine design everywhere. 

This blog focuses on the Valve Corporation's Source Engine, some of it's more popular design elements, how it began, where it is now and what's in Valve's future. Information on this blog can be traced back to the Source Engine's Licensing Information Sheet found here






More than the sum of its parts

The Source Engine debuted with Counter Strike: Source which was a remake of the popular first-person shooter which pits a team of counter-terrorists against a team of terrorists in a series of deathmatch rounds where one team is crowned victorious when an objective is met or all members of the opposing team are no longer standing. The Source Engine has never had a meaningful version numbering scheme and is instead designed in constant incremental updates. Although the engine was initially created to power first-person shooters, it was later used to create everything from RPG to RTS games. 


Technology implemented within the Source Engine includes Direct3D for rendering on PC, XBox, XBox 360 and XBox One and OpenGL for rendering on Mac, Linux and PlayStation 3. High Dynamic Range Rendering is used for post-processing while a lag-compensated client-server is used as the networking model. The physics engine is derived from Havok in addition to being network-enabled and bandwidth-efficient. Source has scalable multiprocessor support with pre-computed radiosity lighting and dynamic shadow maps. Deferred lighting is supported on consoles and the facial animation system fashions auto-generated and localizable lip-syncing. Water flow effects, a blended skeletal animation system, inverse kinematics, dynamic 3D wounds, and cloth simulation are all supported among tons of other technology. The popularity of the Source Engine may be due to its significant source code access for mod teams as well as its distributed map compiler. 

Source distantly originates from the GoldSrc engine which itself is a heavily modified version of John D. Carmack's Quake Engine. Valve's development of Source has always been a mixture of licensed middleware and in-house developed code. In fact, John Carmack himself commented that

"There are still bits of early Quake code in Half-Life 2."






Man of few words, aren't you?


For the scope of the Source Engine's design, the developers at Valve were sure able to bring some very powerful technology to life. Areas of major enhancement include their character animation, advanced A.I., real-world physics, and shader-based rendering. With all this technical prowess it's not wonder that Source offers expressive characters that convey a message without having to say a word and can be both extremely capable allies and more than worthy foes. Furthermore, these characters populate beautifully rendered and physically simulated worlds that feature water refraction, HDR lighting and projected shadows which greatly enhance Source's visual fidelity. 

With robust networking code providing support for 32-player LAN and Internet games, the Source Engine is built for multiplayer mode. and includes a complete toolset for level design, character animation, and demo creation making it a modder's paradise. The Source Engine features state-of-the-art prediction analysis for interpolating collision and hit detection. The characters provide intelligent believable player interaction with simulated musculature for outstanding emotions, speech and body language. Skeletal/bone systems are present for animation and a layered animation system synthesizes complex animations out of several pieces. The worlds created are themselves more responsive with realistic interactions, sounds and graphics following from physics. NPCs can even interact with physically simulated objects and are structured with ragdoll physics. There are kinematic animated bone followers and custom procedural physics controllers. Vehicles built using the Source Engine have wheels that slip and skid, realistic suspensions, multiple player handling and tunable horsepower, gearing, max speed, shift speed, tire material, tire friction, spring tension and dampening. 






Now let's discuss the A.I., U.I. and sound within the Source Engine. Graphical entity placement allows level designers to quickly control the interactive gaming environment and sophisticated navigation allows for characters that run, fly, jump, crouch, climb stairs and ladders, and burrow underground. The characters are able to sense things using sight, sound and smell, as well as determine relationships such as friend/foe status of other entities. Battle capabilities allow squads of A.I. characters to operate together, knowing when to advance, retreat, lay cover fire, etc. The A.I. even provides for intelligent character interaction when not in combat. 

The Source Engine supports 5.1 surround sound for 4 speakers and high-quality 3D spatialization. There is custom software DSP as well as automatic DSP based on environmental geometry. There is support for audio streaming on any wave as well as real-time wave file stitching. There are even pre-authored Doppler effect and distance variant encoded waves.

The server browser displays all active game servers and allows players to select a server to join. Players may even filter and sort server lists in order to speed up the display and selection of a server. Players may use the instant messenger to chat with each other both in and out of games in addition to joining friends in existing games. Finally, Valve's GUI (VGUI) allows for both in-game and out-of-game user interface uniformity and is both platform independent and Unicode compliant. 

All code for Valve's Source Engine is written in C/C++ using Visual Studio 7.1 making it possible to quickly and easily derive new entities from existing base classes. Included is an internal context sensitive performance monitoring system and graphics performance measurement tools. DLLs allow for swapping out of core components for easy upgrading or code replacement through modular code design. Dx9 shaders are all written in HLSL as the engine allows for HLSL shaders. 







The future of Valve

One of Valve's largest projects to date is the development of new content authoring tools for Source. These will replace the currently outdated tools allowing speed and efficiency in content production. The Valve Corporation's fan site ValveTime revealed that Valve might be in development of a "Source 2" engine. This was based on coding from the Source Filmmaker that directed technology from the upcoming version. Gabe Newell, the head of the studio, has confirmed the development of this up and coming engine but remarks that Valve is waiting for a game to roll it out with. 

Although image-based rendering technology had been in development for Half-Life 2 it was cut from the engine before the game's release but was mentioned by Newell as a piece of technology he would like to add to Source in order to implement support for much larger scenes than are possible with strictly polygonal objects. 

Gabe Newell has also mentioned that he believes Linux is the future of gaming, often hinting to a gaming box built on the open-source operating environment. Since the launch of the company's online platform, developers have created 198 game on it. He hopes that this points to a future where games will be nodes in a connected economy where the vast majority of goods and services will be created by individuals not companies. 






In Conclusion

Valve's Source Engine is a remarkable feat for a large company that is revered for their modding community. The Source Engine's popularity stems from the tools which give power back to the player allowing them to being their own creativity to life in a sandbox controlled by the Valve Corporation. Not only do they sport a strong Game Engine, the foundation for great things to come, but with AAA titles in continuous release, it is no wonder that the Source Engine receives praise for its technical merit and ingenious design.









No comments:

Post a Comment