Source

is a 3D game engine created by in 2004, and is the successor to . The engine is well-known for its advancements in physics, AI, and graphics which made the games realistic for its time, while being scalable on older, less powerful hardware. One game, , earned several awards for it's graphics, which were made possible with Source. has been used by Valve, third-party companies, and (much like GoldSrc) countless community mods by people around the globe, with at least 100 games developed on Source. The engine also has several branches, each with new features added and improved graphical capabilities.
Despite the Source engine being 20 years old, and has been superseded by the engine for first-party usage since 2015, it's still being commonly used today by modders and some third-party companies due to the lack of some Source 2 documentation and was rarely licensed to third-party developers compared to Source, and it's still regularly being maintained with engine and security updates.
== Features ==
List of engine features and capabilities. Some new features listed here may not apply to previous or later Source branches, or third-party games/branch. 
For a list of Source branches (including third-party games) with their specific new features, see this category page.
=== Renderer ===
* Supports Shader Model 2.0 to 3.0
** Some third-party games can also support Shader Model 4.0, 5.0 and later by using Direct3D 11 and later, like and .
* Anti-aliasing support (MSAA, FXAA, MLAA, TAA, etc.)
** See the Anti-aliasing page for more information, and features & drawbacks with various anti-aliasing methods.
* More anisotropic and texture filtering options
** Anisotropic filtering allows textures on far distances to look sharper and less blurry.
** Compared to GoldSrc (prior to 2013) featuring only Bilinear or Trilinear texture filtering, features more texture filtering options, ranging from Bilinear, Trilinear, Anisotropic 2x up to 16x.
* Support for both forward and deferred rendering pipelines.
** Deferred rendering is a rendering technique that allows games to render as much lights with little performance impact. Deferred rendering is commonly used in most modern titles.
** up to uses forward renderer, while , aswell as some third-party Source games (, , etc.) uses deferred renderer (shading or lighting).
* Bump mapping and Normal mapping on models and the world
* Author shaders with HLSL
* Cube and environment mapping
** Cubemapping also supports Anisotropy 
* Phong shading for models
** Phong is also supported on world brushes 
* Dynamic lights, vertex lighting and lightmaps, many light types including flickering, pulsing etc.
* HDR and LDR (SDR) lighting
** LDR is deprecated since . This does not apply to some games such as the original release of , for example.
* Water with refraction, real-time world reflections and fresnel effects
** Water also supports flow mapping 
* Advanced particle systems that can emit sprites or models
* Render-to-texture shadows allow for a large number of characters per scene 
* Occluder entities for visibility blocking
* Indoor/Outdoor environments
** Deformable terrain
** 3D Skyboxes extend the horizon and add parallax on distant objects
** Dynamically rendered organics (grass, trees, etc.)
**Swaying trees 
* Subdivision surfaces, diffuse & specular bump maps
* Real-time radiosity lighting
* Real-time Cascaded Shadow Mapping that comes from the skybox 
* Effects include but are not limited to: particles, beams, volumetric smoke, sparks, blood, & environmental effects like fog and rain
* Scalability
* Screen Space Ambient Occlusion (SSAO) 
** A technique for efficiently approximating the ambient occlusion effect in real time.
* Widescreen display support
** is one of the earliest game engines to support Widescreen monitors natively (16:9 and 16:10 aspect ratio) without stretching the image, while most games from that era are usually designed for 4:3/5:4 displays only. Games such as support widescreen display at launch back in 2004, with horizontal FOV (field of view), allow you to see more details.
* Physically Based Rendering 
* Parallax Occlusion Mapping
* Support various graphics API (Direct3D, OpenGL, Vulkan)
* Direct3D versions
** Direct3D 9
*** On earlier version of Source ( up to ), it had a Hardware DirectX level system that allows older GPUs to run on DirectX 8.0, 8.1 (Pixel Shader 1.x) render path (disabling DX9 graphical features not available on previous card). Previous version of Source ( and ), aswell as (RTX Remix only), also had support for DirectX 7.0 and 6.0 render path. This can be changed using console command, or command line argument.
*** 
** Direct3D 9Ex - DX9 Windows Aero extensions, requires or later. User can enable/disable in Video Settings - Advanced (Windows Aero extensions), or through .
** Direct3D 11 
** Direct3D 12 
**
* OpenGL which is another graphics API used in Source games on and .
** is the OpenGL equivalent to DirectX 9 Shader Model 3 (D3D9.0c)
*Vulkan graphics API 
** A low-level API, successor to OpenGL. Vulkan can be used to workaround various graphical issues such as the Portal 2's projected textures, which does not render properly on newer graphics drivers (both NVIDIA and AMD). Enable Vulkan using launch options.
=== Materials System ===
* Instead of traditional textures, Source defines sets of materials that specify what the object is made from and the texture used for that object. A material specifies how an object will fracture when broken, what it will sound like when broken or dragged across another surface, and what that object's mass and buoyancy are. This system is much more flexible than other texture-only systems
* Materials can interact with objects or NPCs, such as mud or ice for vehicles to slide/lose traction on
=== Multiplayer Network Code ===
* Time- and gamer-tested by millions of gamers around the world
* Support for both LAN-based multiplayer and Internet-based multiplayer games
* Prediction analysis for interpolating collision/hit detection
* Optimizations for high-latency, high-packet-loss 56k connections
=== Advanced Characters ===
* Detailed and believable characters
* Realistic eyes
** Focus on player/object, not simply parallel views
** Proper eye bulge for realistic eye reflections
* Simulated musculature provides outstanding emotions, speech, and body language
* Language independent speech, characters can speak naturally in many languages
* Skeletal/bone system for animation
* Layered animation system can synthesize complex animations out of several pieces
===Physics===
* Uses Havok physics engine, licensed from Havok Group (now acquired by Microsoft)
* More responsive world with realistic interactions
* Sounds & graphics follow from physics
* AI characters can interact with physically simulated objects
* Ropes/cables, machines, constraint systems, ragdoll physics
* Can be controlled by level design
* Kinematic animated bone followers
* Custom procedural physics controllers
* Vehicles
** Wheels slip and skid
** Realistic suspensions with springs on each wheel
** Realistic leaning during acceleration/deceleration and turning
** Individually tunable parameters such as horsepower, gearing, max speed, shift speed, tire material, tire friction, spring tension/dampening, etc.
** Multiple players in a vehicle in multiplayer
** Hovercraft support for cheaper simulation
=== Advanced AI ===
* I/O system allows level designers to control AI
* Sophisticated navigation: characters that run, fly, jump, crouch, climb stairs and ladders, and burrow underground
* AI senses things using sight, sound, and smell
* AI relationships determine friend/foe status of other entities
* Battle AI allows squads of AI characters to operate together, know when to advance, retreat, lay cover fire, etc.
=== Sound System ===
* Use Miles Sound System middleware (except in some third-party games) or minimp3
* 7.1, 5.1 surround sound, 4 speaker surround
: 
: 
* High-quality 3D spatialization
* Custom software DSP
* Automatic DSP based on environmental geometry
* Microsoft ADPCM-compressed WAV files
* 16-bit 44.1 KHz (CD Quality), stereo wave data with all features
: 
* MP3 decompression (requires Miles license)
** Alternatively, minimp3 can be used instead.
* Support for audio streaming on any wave 
* Real-time wave file stitching 
* Pre-authored Doppler effect encoded waves
* Pre-authored distance variant encoded waves
* Commentary system
=== UI ===
* Server browser — Displays all active game servers and allows a player to choose which one to participate in. Players can filter and sort server lists to speed up the display and selection of a server.
* VGUI — Valve's custom GUI interface mimics most of the Windows controls but is rendered using the Source engine for both in game and out of game uniform UI display. Some features:
** Dynamic in-game HUD display
** Many widgets/controls (e.g., buttons, treeview, html control…)
** Themes/custom visualization allowed
** Platform independent
** Localized text (Unicode compliant)
** Gamepad UI ( version) — Since the release of (and its episodes) as well as updates in 2022, Valve have added a modern UI which is designed for consoles and handhelds like . With the new Gamepad UI, it was more scalable across any resolution (including 4K and higher), unlike the regular VGUI (which, the higher the resolution, the text and UI will become smaller). This UI can be also enabled manually by using command line argument (which will also enable Vulkan renderer that may not work on some older GPUs unless is used in combination of ).
* Scaleform (officially called Scaleform GFx) — Introduced with at launch until 2018, this is a vector graphics rendering engine used to display -based UI and HUD for games.
* Panorama — Introduced in 2018, replacing Scaleform, Valve's new Custom GUI interface that resembles modern web design and authoring (HTML5/CSS/JS). Using .XML and JavaScript files, developers can create dynamic and clean HUDs and menus and even high-quality in-game intractable panels.
=== Input ===
Source supports the following input and controller APIs:
* DirectInput - this method is supported in previous Source branch (, ).
* XInput - Introduced with , this allows the game to be controlled using Xbox 360, Xbox One & Series X/S controller. On some Source games this was superseded by Steam Input API, but can be re-enabled by disabling Steam Input API.
* Steam Input API - control the game using any controllers (Xbox, PlayStation, Nintendo, others). Many Valve's Source games have been updated to natively support them.
** For the list of games that natively support Steam Input API, see this page.
=== Programming ===
* Source natively support various CPU architectures, such as x86 (PC and 8th, 9th-gen Consoles), ARM (, ), PowerPC (, ), and more, with both 32 and 64-bit.
** Support for 64-bit architecture will allow Source to handle more than 2-4GB of RAM limit.
** Historically, had a 64-bit update in 2005, but it was later removed for unknown reasons. later received an 64-bit update in 2016 for Mac and Linux systems. On April 19, 2024, was upgraded to 64-bit on Windows and Linux.
* All code written in C/C++ using Visual Studio .NET 2003 and later. Easily and quickly derive new entities from existing base classes
** Source SDK 2013 code, by default, can be compiled on Visual Studio 2013 only. See Compiling under VS2022 if you want to compile Source 2013 with newer versions of Visual Studio.
** Linux version are compiled using GNU Compiler Collection.
* Internal context sensitive performance monitoring system
* Graphics performance measurement tools built into the engine
* Modular code design (via DLLs) allows swapping out of core components for easy upgrading or code replacement
* VScript scripting system allows using external coding languages, such as Squirrel and Lua, in maps to create more complex systems 
=== Tools ===
 
* 
** Facial expression tool used to craft speech and emotions
* 
** WYSIWYG World editor
** Create world brushes
** Terrain editor
** Place detailed world models and AI NPCs
** Set navigation points/paths for NPCs
** Place triggers, clip brushes, logic, etc.
** Allows level designer to hook up I/O between entities to control AI within the game
* 
** Full model previewer
** Rotate models in any direction
** Set up hit boxes
** View physics hull
** View normals
** Wireframe, shaded or textured view modes
* Studiomdl
** Model compiler
* VBSP, VRAD, VVIS, VMPI
** Map compilation tools (bsp, lighting and visibility)
** VMPI — distributed compilation tool allowing level compiles to be spread across many PCs greatly reducing compile times
* Exporters
** XSI, Max and Maya .smd exporters for exporting 3D models
== Branches ==
The Source engine has multiple branches, each of them adds new features and changes, while also making changes that will make it incompatible with previous branch. For example, (which includes ) does not have any new features that had, and maps (aswell as VTF 7.5 textures) made for (up to ) will refuse to load in , unless it is converted.
The latest version of Source engine branch is , which has three sub-branches: Singleplayer, Multiplayer, and , the Multiplayer branch has additional features not available on Singleplayer sub-branch. And Team Fortress 2 branch is the updated version of Multiplayer branch (used in and ), which adds more new features, but have incompatible ABIs, meaning that mods/tools compiled for will not work under without updating interfaces.
Games such as to also introduces many newer features and graphical improvements. Both (SP & MP, but not TF2 version) and engine code are publicly available.
Some third-party games may also have their own engine branches, with many new features that are not available with any official Source branch.
*For the list of Source engine branches (including third-party branches), see List of Source engine branches.
== Products using Source ==
This is the list of games that uses the engine.
=== Products made by Valve ===
 Click here to edit this list. 
=== Third-Party ===
Games, tool and mods made by third-party companies and mod teams.
==== Released ====
==== In development (Unreleased) ====
This section are for unreleased third-party games and tools that have been announced, and it is currently in development, not publicly released, is in Beta/Early Access, or planned to be released.
More Third-party Source Engine games
* More Source mods
== See also ==
* Wikipedia:Source (game engine)
* Source Engine Features
* Source SDK
* Source SDK Documentation
* Source SDK 2013
== External links ==
* Official Website (archived) - Official website about the Source engine
* Source Engine Tutorials https://www.sourcemodding.com/tutorials/source
* Tutorials for Source Engine https://gamebanana.com/tuts/games/35
* Tutorials - Source - Mod DB https://www.moddb.com/engines/source/tutorials
* GitHub Issues page - for engine bug reports.
Category:Game engines
Category:Valve
Category:Glossary