- Oct 14, 2005
- 9,711
- 6
- 76
LINK
Looks like Quad Core isn't just for video and audio buffs anymore
Valve finally settled on an approach they dub "hybrid threading." That simply means that the tasks use the appropriate technique as needed. In some cases, whole subsystems may be use a single core?the key example being the game's sound system. Some systems may be split internally, in a blend of fine and coarse techniques. Other tasks, such as large loops or matrix calculations, can be split across multiple cores. Valve believes that their hybrid approach yields good scalability in the foreseeable future, even beyond quad-core processors.
Valve's approach did involve modifying substantial sections of the Source engine. As we noted, multithreading is baked into the engine in a fundamental way. Valve chose not to use existing resources. For example, Windows itself is reasonably smart about threading. However, Windows isn't adept at real-time prioritization of threads. Using Windows APIs for threading involves understanding threading at a very low level, forcing programmers to solve threading problems rather than game problems.
Valve's techniques also involve the use of lock-free algorithms. The goal is to never leave a core idle and take advantage of the strengths of the CPU itself, rather than a black-box library.
In the end, the result is a game engine optimized for solving game problems, but heavily threaded under the hood in appropriate ways.
Users will see benefits in the near future, because of Valve's Steam online distribution system. Half-Life 2: Episode 1 will see frame rate increases when Valve begins streaming the new engine out to users. Half-Life 2: Episode 2 will take full advantage of the new threading model. While no date was forthcoming, Episode 2 is likely to arrive in the first half of 2007.
Looks like Quad Core isn't just for video and audio buffs anymore
