This article relates to the game "Left 4 Dead". Click here for more information.
This article relates to the game "Left 4 Dead 2". Click here for more information.
This article's documentation is for anything that uses the Source engine. Click here for more information.

Left 4 Dead engine branch

From Valve Developer Community
Jump to navigation Jump to search
English (en)Português do Brasil (pt-br)中文 (zh)Translate (Translate)

Left 4 Dead engine branch
In-game screenshot of Left 4 Dead 2, running on Left 4 Dead engine branch, with one of it's new features, flowing water ↓, shown on this screenshot.
In-game screenshot of Left 4 Dead 2, running on Left 4 Dead engine branch, with one of it's new features, flowing water ↓, shown on this screenshot.
Developer(s)
Release date(s)
November 17, 2008
Status
Actively updated (as of 2026)
Platform(s)
SDK
Left 4 Dead Authoring Tools
Tools only, SDK Base & source code not available.
Predecessor
Orange Box branch Orange Box branch
(2007, 2009/MP)

The Left 4 Dead engine branch Left 4 Dead engine branch was released in 2008 with the launch of Left 4 Dead Left 4 Dead. It was maintained side-by-side with the Source 2007 & Source 2009 Orange Box branches, while subsequently updated in 2009 with Left 4 Dead 2 Left 4 Dead 2, adding additional features. It was ultimately succeeded with the release of the Alien Swarm engine branch Alien Swarm engine branch, being the successor of this branch.

This branch, aswell as Left 4 Dead and Left 4 Dead 2, is still being actively updated (as of 2026) and maintained in order to fix security issues and other bugs, as well as adding new contents (such as Left 4 Dead 2's Last Stand update back in 2021), and features such as Steam Input API support.

Unlike other branches (with the exception of some third-party games), Left 4 Dead (and subsequent branches released after it) no longer requires Half-Life 2 content to be present in order to run. It stands entirely alone.

Aside from branching off to the Alien Swarm branch, L4D's branch also branched off to create the Portal 2 engine branch Portal 2 engine branch (forked between L4D & L4D2), CS:GO engine branch CS:GO engine branch and the Dota 2 engine branch Dota 2 engine branch[2] (all of which implemented features from newer branches since Alien Swarm onward).

Features

Added

New since the Source 2007 Orange Box engine branch is:

VPK files and add-ons
A new archive format for easy content distribution, replacing the old GCF format used in Source 2009 Source 2009 and earlier. VPK was later eventually backported to Orange Box branches during the transition to the new SteamPipe content distribution system and the release of Source 2013 (which have native implementation of VPK). Additionally Source 2007, Source 2006 and earlier branches also received VPK mounting support via Steam2 / Steam.dll wrapper.
Left 4 Dead branch and subsequent branches after that until CS:GO & Source 2013 (which switches to VPK version 2), uses VPK version 1.
Improved multithreading support (also in Source 2009)
Multi-thread support was expanded, allowing for features like split screen multiplayer, additional post-processing effects, event scripting with Squirrel, and the highly-dynamic AI Director.
The improved multi-threaded support in Left 4 Dead branch was later backported to titles running on Source 2009 engine (part of Orange Box branch).
NextBot AI
Source's original AI routines appear to have been completely replaced by the NextBot, the successor to Mike Booth's Counter-Strike bot. As well as unknown changes to code structure, the old nodegraph system has been superseded by polygonal navigation meshes that are automatically generated by the engine.
AI director
A "gamemaster" for the entire game which controls NPC spawning, music, weather effects, map layout, and more.
Rewritten speech response system
The speech response system has been rewritten, with several new features and improved performance. Details here and here.
Split-screen
Up to two players can play on the same screen at once. While this system is present on PC, it is difficult to access outside of Xbox 360 (check out this guide for help using split-screen).
Subtitles for intro movies and other Bink-based videos
Allows subtitles (including custom ones) to be put on timelines for when they should show.
The difference between Left 4 Dead branch's RTT shadows (shadows facing away from light) and old dynamic shadows in Source 2007 and earlier (shadows directly under entities).
Lag compensated props
prop_physics entities can be selectively lag compensated.
Shader and effect detail options
New options that allow for better performance on low-end machines, entirely replacing the old DirectX level system.
New post-processing effects
More post-processing effects have been added, such as film grain and vignette.
Radial fog (also in Mapbase, Half-Life 2 20th, Half-Life: Source, Portal, Team Fortress 2 branch)[Note] and fog volumes
Radial fog replaces the previous planar-based fog, and multiple fog controllers can now be used within defined volumes.
Local light shadows
Render-to-texture shadows can now be calculated per-entity, and their direction determined by the closest light source.
Per-texel color tint masking for models
Models can now use the alpha channel of their base textures to define areas to tint with a specific color.
HDR rendering is now required.
LDR rendering support has mostly been dropped and deprecated with the option to disable compiling HDR lighting being absent, meaning the only way to have LDR is to compile the map with VRAD -ldr syntax. Games on this branch will also default to HDR by default and will fallback to LDR if the map lighting is only compiled in LDR. The command that was associated with switching LDR/HDR rendering still exists but has been hidden (marked as launcher-only), and cannot be changed normally via Developer Console without having SourceMod installed, using VScript or add +mat_hdr_level 0/1/2 on launch options.
DirectX 10 hardware feature level on Direct3D 9 (dxlevel 100) (also in Dota 2) (not in Portal 2Counter-Strike: Global Offensive)
All games since L4D branch (including Alien Swarm, SFM) runs on dxlevel 100, except Portal 2 and CS:GO. This is likely used to force sRGB behavior on DirectX 10 graphics card like Nvidia GeForce 8 series to match the behavior seen in previous DirectX 9 graphics card (Nvidia GeForce 7, and AMD equivalent or earlier), aswell tell the engine to load the -dx10 version of the assets (often used by tool textures). Textures that are marked as -dx10 would also have the sRGB flag. The game will still render in Direct3D 9, though.
Note.pngNote: In L4D2 and Alien Swarm, mat_dxlevel 100 can be only seen using SourceMod (sm_cvar mat_dxlevel).
Raw mouse input (also in all games since Source Multiplayer and Source 2013)
Directly taking unchanged data from mouse drivers before it goes through operating system enhancements, meaning that mouse input will be exactly 1 to 1.
macOS Mac OS X support
This engine branch can now run on Mac after October 5, 2010 (for Left 4 Dead 2), and October 27, 2010 (for Left 4 Dead). However, Mac support outside of official games may be spotty.
However with the release of macOS since 10.15 (Catalina), it drops support for all 32-bit apps and games in general (which also includes every single Source engine games that are complied for 32-bit only).

Since Left 4 Dead 2

Swaying trees
A material parameter that gives the effect of trees swaying in the wind.
VScript (in all games since Left 4 Dead 2)
A powerful new scripting system primarily using Squirrel Squirrel.
Water flow maps (in all games since Left 4 Dead 2) (also in Garry's Mod)
Water can now flow using flow maps, and water fog can now receive lightmaps.
BSP version 21
New BSP version, with modified lumps.
Linux Linux support
The engine can now run on Linux. However, support for these OS outside of official games may be spotty.

Changed

Protocol versions
Since Left 4 Dead March 11, 2009 update, protocol version are now tied to PatchVersion on steam.inf. Additionally later in Left 4 Dead 2 (but not later games like Portal 2), it is tied to NetworkVersion. This meant that old demos are no longer viewable unless downgrading the game to older version, or edit steam.inf (and change PatchVersion to "37" for example, to view demos from protocol version 37), doing this will prevent you from connecting to any servers not matching your game version.
VPhysics optimization
In Left 4 Dead engine branch and subsequent branches (later backported to Orange Box-based branch under Team Fortress 2 branch), it features optimization to VPhysics (compiled using floats instead of doubles), meant to improve performance on console and lower end hardware, and possibly avoid network prediction errors & CPU load on servers. However this leads to unreliable collision detection due to reduced physics precision.[1] This means in some cases props and other physics objects will briefly glitch through map geometry, other props or other physics objects.[1]

Removed

Features that have been removed in this branch are:

Half-Life 2 assets
Starting with the Left 4 Dead engine branch Left 4 Dead engine branch and later engine branches, HL2 content is no longer required in order to run the game, through the game may still come with some Half-Life 2 Half-Life 2 assets (such as skyboxes).
DirectX compatibility levels support, mat_dxlevel-related commands.
DirectX compatibility levels (and support for GPUs made for DirectX 8.x), including all dxlevel console command and command line, has been removed. Left 4 Dead engine branch also requires GPUs with DirectX 9 with Shader Model 2.0.

Availability and usage

The following titles run on the Left 4 Dead engine branch:

Valve

Third-Party

Source code and SDK Base for this branch is not publicly available. However, server plugins are possible, and authoring tools exist for custom content:

History and changes

November 18, 2008: Left 4 Dead was released, running on it's own branch. Unlike other Source engine branches and games, Left 4 Dead does not require Half-Life 2 assets to operate.
Early 2009: At some point, the Left 4 Dead branch was forked to create the Portal 2 engine branch, with the early Portal 2 build (as far back as earliest found July 2009 build) features protocol version "37", matching the release build of Left 4 Dead. The Portal 2 branch around July 2009 (or much earlier) would eventually feature VScript, VTF 7.5 along with new features as the Left 4 Dead 2 code (Portal 2 and L4D2 are being developed side-by-side until the Nov 2009 release of L4D2), followed by some Alien Swarm code were later upstreamed to the then in-development Portal 2 branch. At the same time, the Portal 2 July 2009 build also contains FGD files from Dota 2 (dota.fgd), Alien Swarm (infested.fgd, infested_base.fgd) and cancelled Half-Life 2: Episode Three (ep3.fgd), which contains the weapon entity name for the Weaponizer (the model of the Weaponizer would later be re-used for the cut Paint Gun during Portal 2 development). As Dota 2 FGD files were included in Portal 2 2009 build along with a build of Dota 2 from 2010, in the same Steam2 Teraleak, the Dota 2 branch was likely also forked from the Left 4 Dead branch, or the very early version of the Portal 2 branch during it's development.
November 17, 2009: Left 4 Dead 2 was released, which runs on updated version of the Left 4 Dead branch (this is also referred as the L4D2 branch). The Left 4 Dead 2 version of the branch appears to contain few leftover source code from the scrapped F-Stop & 2 Bots 1 Wrench (codenamed Zion), based on the leak from LunchHouse Software (who later develops "PUNT" and "Exposure" in 2020s, the latter used some of the code from F-Stop).

References

2. Confirmed by the Steam2 content delivery leak in August 30, 2026. The unfinished Portal 2 build (aka Corehub build) from Jul 28, 2009, which was before the release of Left 4 Dead 2, was built on modified Left 4 Dead branch (L4D version) with Portal + few Half-Life 2 gamecode. The early Portal 2 build has protocol version 37. As Left 4 Dead in Jan 2009 later get's the protocol version updated from "37" to "38", it is assumed that the fork was occurred between the Left 4 Dead release (or before it's release) in 2008 up to Jan 2009. The Portal 2 Corehub build also contains FGDs file from Alien Swarm (infested.fgd, infestedbase.fgd), Dota 2 (dota.fgd). Later Portal 2 build from 2010 shipped with L4D2 GameUI menu, replacing the stock Source engine menu from Half-Life 2/Portal 1. Similarly, for Counter-Strike: Global Offensive (even with March 23, 2011 build, predating Portal 2 release by almost a month, but already has Portal 2 icon for the hl2.exe executable, and comes with assets from L4D2) and Dota 2 (also having a 2010 build leaked, launched right after Alien Swarm released few days ago), both CS:GO & Dota 2 started on L4D branch aswell, then later various code from Alien Swarm, Portal 2 were later ported (upstreamed) into these branches. Also mentioning DirectX 10 feature level (dxlevel 100), CS:GO branch, despite forked from L4D, it is the only branch to not support this version at all (as opposed to Alien Swarm, Portal 2 and Dota 2), or atleast didn't run on this dxlevel version by default on first launch. All of this proves that Portal 2, CS:GO, Dota 2, Alien Swarm are being developed side-by-side, with each released title having it's features & code upstreamed to the in-development game/branch.

Navigation