Upload
jeffery-nelson
View
212
Download
0
Embed Size (px)
Citation preview
Threading Successes of Popular PC Games and
Engines
Paul Lindberg and Brad WerthIntel Corporation
GDC 2008
22
What’s this all about?
•Last year we had a great turnout for our hands-on tutorial on game threading.
•This year we want to focus on current commercial products and future pathfinding efforts.
•We’ll cover performance and feature enhancements from threading.
•This is a half day tutorial!
33
What we’ll hit today
•Introduction•Supreme Commander•Gamebryo Element Engine•Hellgate: London
– Break!
•Intel’s n-core engine experiment•Allegorithmic’s Substance•Wrap-up
– Food!
44
Why threading?
•GHz era – so over.•Multi-core is ubiquitous in gaming platforms.•Consumers demand validation of their purchase.
•Threading is still an unsolved problem for games.
55
Let’s look at common threading themes for games
•Task (on a thread)
•Control Transition– Lock protecting shared data– Data copied to local data– Operation on local data
Task
66
Render Split works well, but gains are limited
•Copy data necessary for calls to rendering APIs•Make all rendering calls from the same thread•Render one frame behind the simulation
Render
The Rest
77
Work Crew or Pipeline moves a lot of data around
•Apply the Render Split concept everywhere
Render
Physics
Particles
Animation
Render
Physics
Particles Particles Particles Particles
Physics Physics
Animation
AI
Animation Animation
AI
88
Operation Queue keeps data localized, and bandwidth down
•Keep the data in one place, but queue up operations on it• In a perfect world, reads are immediate, free, and consistent
QueueAI
Service
Animation
Physics
Render
99
How are games today targeting multi-core?•Thread for performance
– Framerate– Load times– Easier path to smooth framerates, compared to time-slicing– Now very common
•Thread for features– Many possible CPU-intensive effects– Just starting to appear
•Use threaded middleware– Does whatever it does, and scales it out– Common, but how well do they work together?