Threading Successes of Popular PC Games and Engines Paul Lindberg and Brad Werth Intel Corporation GDC 2008 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! 2 2 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! 3 3 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. 4 4 Let’s look at common threading themes for games • Task (on a thread) Task • Control Transition – Lock protecting shared data – Data copied to local data – Operation on local data 5 5 Render Split works well, but gains are limited Render The Rest • Copy data necessary for calls to rendering APIs • Make all rendering calls from the same thread • Render one frame behind the simulation 6 6 Work Crew or Pipeline moves a lot of data around Particles Particles Particles Particles Render Particles Render Animation Animation Animation Animation Physics Physics Physics Physics AI AI • Apply the Render Split concept everywhere 7 7 Operation Queue keeps data localized, and bandwidth down Physics AI Queue Render Service Animation • Keep the data in one place, but queue up operations on it • In a perfect world, reads are immediate, free, and consistent 8 8 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? 9 9
© Copyright 2025 Paperzz