SlideShare a Scribd company logo
1 of 43
Threading Game Engines -   QUAKE 4 & Enemy Territory QUAKE Wars Anu  Kalra   - Intel Corporation Jan Paul van Waveren   -   id Software Feb 21, 2006
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Legal Disclaimer ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Concurrency In Games ,[object Object],[object Object],[object Object],[object Object]
QUAKE 4 Engine ,[object Object],[object Object],[object Object],[object Object]
QUAKE 4 Analysis ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Constraints ,[object Object],[object Object],[object Object],[object Object]
Threading ,[object Object],[object Object],[object Object],[object Object],Frontend Backend Thread 1 Thread 2 Cmd Queue Backend
Threading ,[object Object],[object Object],[object Object],[object Object],[object Object]
Synchronization Front End Backend Frame n Frame n-1 Frame n Frame n+1 Frame n+2 Frame n+1
Issues with Threading ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Performance Improvements ,[object Object]
Multi-Threaded Drivers Driver Thread Driver FIFO Sound Thread Game Engine Loop OpenGL/D3D Main Thread  Graphics Driver Front End 3D HW
Current Performance
Renderer Threading with ETQW ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ETQW
Quake III Arena ,[object Object],[object Object]
DOOM III ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ETQW Threading overview Game Logic Bot AI Sound Engine Renderer Sound Driver Graphics Driver MegaTexture Transcoding MegaTexture Streaming
Mega Texture Streaming Game Logic Bot AI Sound Engine Renderer Sound Driver Graphics Driver MegaTexture Transcoding MegaTexture Streaming
Mega Texture Streaming ,[object Object],[object Object],[object Object],[object Object]
Mega Texture Transcoding Game Logic Bot AI Sound Engine Renderer Sound Driver Graphics Driver MegaTexture Transcoding MegaTexture Streaming
Mega Texture Transcoding ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sound Engine Game Logic Bot AI Sound Engine Renderer Sound Driver Graphics Driver MegaTexture Transcoding MegaTexture Streaming
Sound Engine ,[object Object],[object Object],[object Object]
Game Logic Game Logic Bot AI Sound Engine Renderer Sound Driver Graphics Driver MegaTexture Transcoding MegaTexture Streaming
Game Logic ,[object Object],[object Object],[object Object],[object Object]
Bot AI Game Logic Bot AI Sound Engine Renderer Sound Driver Graphics Driver MegaTexture Transcoding MegaTexture Streaming
Bot AI ,[object Object],[object Object],[object Object]
Bot AI ,[object Object],[object Object],[object Object],[object Object]
Bot AI ,[object Object],[object Object],[object Object],[object Object]
Bot AI static const int MIN_FRAME_DELAY = 0; static const int MAX_FRAME_DELAY = 4; HANDLE gameSignal; HANDLE aiSignal; Int gameFrameNum; int lastAIGameFrameNum; void GameThread() { for ( ; ; ) { SetCurrentGameOutputState(); AdvanceWorld(); SetCurrentGameWorldState(); gameFrameNum++ // let the AI thread know there's another game frame ::SetEvent( gameSignal ); // wait if the AI thread is falling too far behind while( lastAIGameFrameNum < gameFrameNum - MAX_FRAME_DELAY ) { ::SignalObjectAndWait( gameSignal, aiSignal, INFINITE, FALSE ); } } }
Bot AI void AIThread() { for ( ; ; ) { // let the game thread know another AI frame has started ::SetEvent( aiSignal ); // never run more AI frames than game frames while( lastAIGameFrameNum >= gameFrameNum - MIN_FRAME_DELAY ) { ::SignalObjectAndWait( aiSignal, gameSignal, INFINITE, FALSE ); } lastAIGameFrameNum = gameFrameNum; SetCurrentAIWorldState(); AdvanceAI(); SetCurrentAIOutputState(); } }
Bot AI ,[object Object],[object Object],[object Object]
Threading On/Off ,[object Object],[object Object],[object Object]
Common Issues ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Scalability ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Alternate Threading Paradigms ,[object Object],AI AI AI AI Physics Physics Physics Physics Renderer
Alternate Threading Paradigms ,[object Object],Frame AI Physics Render FE Render BE AI Physics Render FE Task Stealing T 0 T 1
Design with threading in mind ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object]
Contact Info ,[object Object]
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars

More Related Content

What's hot

Robotics and Machine Learning: Working with NVIDIA Jetson Kits
Robotics and Machine Learning: Working with NVIDIA Jetson KitsRobotics and Machine Learning: Working with NVIDIA Jetson Kits
Robotics and Machine Learning: Working with NVIDIA Jetson Kits
Data Works MD
 

What's hot (20)

Streamed Cloud Gaming Solutions for Android* and PC Games
Streamed Cloud Gaming Solutions for Android* and PC GamesStreamed Cloud Gaming Solutions for Android* and PC Games
Streamed Cloud Gaming Solutions for Android* and PC Games
 
Accelerate Large-Scale Inverse Kinematics with the Intel® Distribution of Ope...
Accelerate Large-Scale Inverse Kinematics with the Intel® Distribution of Ope...Accelerate Large-Scale Inverse Kinematics with the Intel® Distribution of Ope...
Accelerate Large-Scale Inverse Kinematics with the Intel® Distribution of Ope...
 
HITBSecConf 2016-Create Your Own Bad Usb
HITBSecConf 2016-Create Your Own Bad UsbHITBSecConf 2016-Create Your Own Bad Usb
HITBSecConf 2016-Create Your Own Bad Usb
 
Multiple Cores, Multiple Pipes, Multiple Threads – Do we have more Parallelis...
Multiple Cores, Multiple Pipes, Multiple Threads – Do we have more Parallelis...Multiple Cores, Multiple Pipes, Multiple Threads – Do we have more Parallelis...
Multiple Cores, Multiple Pipes, Multiple Threads – Do we have more Parallelis...
 
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
 
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning AccelerationclCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
 
HITBSecConf 2017-Shadow-Box-the Practical and Omnipotent Sandbox
HITBSecConf 2017-Shadow-Box-the Practical and Omnipotent SandboxHITBSecConf 2017-Shadow-Box-the Practical and Omnipotent Sandbox
HITBSecConf 2017-Shadow-Box-the Practical and Omnipotent Sandbox
 
BlackHat Asia 2017-Myth and Truth about Hypervisor-Based Kernel Protector
BlackHat Asia 2017-Myth and Truth about Hypervisor-Based Kernel ProtectorBlackHat Asia 2017-Myth and Truth about Hypervisor-Based Kernel Protector
BlackHat Asia 2017-Myth and Truth about Hypervisor-Based Kernel Protector
 
Masked Occlusion Culling
Masked Occlusion CullingMasked Occlusion Culling
Masked Occlusion Culling
 
It Doesn't Have to Be Hard: How to Fix Your Performance Woes
It Doesn't Have to Be Hard: How to Fix Your Performance WoesIt Doesn't Have to Be Hard: How to Fix Your Performance Woes
It Doesn't Have to Be Hard: How to Fix Your Performance Woes
 
Getting the maximum performance in distributed clusters Intel Cluster Studio XE
Getting the maximum performance in distributed clusters Intel Cluster Studio XEGetting the maximum performance in distributed clusters Intel Cluster Studio XE
Getting the maximum performance in distributed clusters Intel Cluster Studio XE
 
Ray Tracing with Intel® Embree and Intel® OSPRay: Use Cases and Updates | SIG...
Ray Tracing with Intel® Embree and Intel® OSPRay: Use Cases and Updates | SIG...Ray Tracing with Intel® Embree and Intel® OSPRay: Use Cases and Updates | SIG...
Ray Tracing with Intel® Embree and Intel® OSPRay: Use Cases and Updates | SIG...
 
Ultra HD Video Scaling: Low-Power HW FF vs. CNN-based Super-Resolution
Ultra HD Video Scaling: Low-Power HW FF vs. CNN-based Super-ResolutionUltra HD Video Scaling: Low-Power HW FF vs. CNN-based Super-Resolution
Ultra HD Video Scaling: Low-Power HW FF vs. CNN-based Super-Resolution
 
Methods and practices to analyze the performance of your application with Int...
Methods and practices to analyze the performance of your application with Int...Methods and practices to analyze the performance of your application with Int...
Methods and practices to analyze the performance of your application with Int...
 
Getting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® GraphicsGetting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® Graphics
 
Early Benchmarking Results for Neuromorphic Computing
Early Benchmarking Results for Neuromorphic ComputingEarly Benchmarking Results for Neuromorphic Computing
Early Benchmarking Results for Neuromorphic Computing
 
Robotics and Machine Learning: Working with NVIDIA Jetson Kits
Robotics and Machine Learning: Working with NVIDIA Jetson KitsRobotics and Machine Learning: Working with NVIDIA Jetson Kits
Robotics and Machine Learning: Working with NVIDIA Jetson Kits
 
Asus Tinker Board
Asus Tinker BoardAsus Tinker Board
Asus Tinker Board
 
Intel Edison: Beyond the Breadboard
Intel Edison: Beyond the BreadboardIntel Edison: Beyond the Breadboard
Intel Edison: Beyond the Breadboard
 
Intel® Open Image Denoise: Optimized CPU Denoising | SIGGRAPH 2019 Technical ...
Intel® Open Image Denoise: Optimized CPU Denoising | SIGGRAPH 2019 Technical ...Intel® Open Image Denoise: Optimized CPU Denoising | SIGGRAPH 2019 Technical ...
Intel® Open Image Denoise: Optimized CPU Denoising | SIGGRAPH 2019 Technical ...
 

Viewers also liked

BSPTreesGameEngines-2
BSPTreesGameEngines-2BSPTreesGameEngines-2
BSPTreesGameEngines-2
Jason Calvert
 
BSPTreesGameEngines-1
BSPTreesGameEngines-1BSPTreesGameEngines-1
BSPTreesGameEngines-1
Jason Calvert
 
GPS en verplaatsingsgedrag
GPS en verplaatsingsgedrag GPS en verplaatsingsgedrag
GPS en verplaatsingsgedrag
Kantar TNS
 
Shadow Techniques for Real-Time and Interactive Applications
Shadow Techniques for Real-Time and Interactive ApplicationsShadow Techniques for Real-Time and Interactive Applications
Shadow Techniques for Real-Time and Interactive Applications
stefan_b
 
Hageman id software project
Hageman id software projectHageman id software project
Hageman id software project
Adam Hageman
 
map projections
map projectionsmap projections
map projections
om290979
 

Viewers also liked (15)

Beyond GPS - Neogeograpy Data Collection
Beyond GPS - Neogeograpy Data CollectionBeyond GPS - Neogeograpy Data Collection
Beyond GPS - Neogeograpy Data Collection
 
BSPTreesGameEngines-2
BSPTreesGameEngines-2BSPTreesGameEngines-2
BSPTreesGameEngines-2
 
BSPTreesGameEngines-1
BSPTreesGameEngines-1BSPTreesGameEngines-1
BSPTreesGameEngines-1
 
GPS en verplaatsingsgedrag
GPS en verplaatsingsgedrag GPS en verplaatsingsgedrag
GPS en verplaatsingsgedrag
 
Doom3
Doom3Doom3
Doom3
 
Shadow Techniques for Real-Time and Interactive Applications
Shadow Techniques for Real-Time and Interactive ApplicationsShadow Techniques for Real-Time and Interactive Applications
Shadow Techniques for Real-Time and Interactive Applications
 
Implementing Server Side Data Synchronization for Mobile Apps
Implementing Server Side Data Synchronization for Mobile AppsImplementing Server Side Data Synchronization for Mobile Apps
Implementing Server Side Data Synchronization for Mobile Apps
 
Hageman id software project
Hageman id software projectHageman id software project
Hageman id software project
 
Introduction to MAPS,Coordinate System and Projection System
Introduction to MAPS,Coordinate System and Projection SystemIntroduction to MAPS,Coordinate System and Projection System
Introduction to MAPS,Coordinate System and Projection System
 
Geographic coordinate system & map projection
Geographic coordinate system & map projectionGeographic coordinate system & map projection
Geographic coordinate system & map projection
 
map projections
map projectionsmap projections
map projections
 
Understanding Coordinate Systems and Projections for ArcGIS
Understanding Coordinate Systems and Projections for ArcGISUnderstanding Coordinate Systems and Projections for ArcGIS
Understanding Coordinate Systems and Projections for ArcGIS
 
Map Projections
Map ProjectionsMap Projections
Map Projections
 
Gps ppt
Gps pptGps ppt
Gps ppt
 
GPS ppt.
GPS ppt. GPS ppt.
GPS ppt.
 

Similar to Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars

Threading Successes 01 Intro
Threading Successes 01   IntroThreading Successes 01   Intro
Threading Successes 01 Intro
guest40fc7cd
 
Threading Successes 06 Allegorithmic
Threading Successes 06   AllegorithmicThreading Successes 06   Allegorithmic
Threading Successes 06 Allegorithmic
guest40fc7cd
 
Architectural Analysis of Game Machines
Architectural Analysis of Game MachinesArchitectural Analysis of Game Machines
Architectural Analysis of Game Machines
Praveen AP
 

Similar to Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars (20)

DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet Processing
 
Unleashing Data Intelligence with Intel and Apache Spark with Michael Greene
Unleashing Data Intelligence with Intel and Apache Spark with Michael GreeneUnleashing Data Intelligence with Intel and Apache Spark with Michael Greene
Unleashing Data Intelligence with Intel and Apache Spark with Michael Greene
 
Threading Successes 01 Intro
Threading Successes 01   IntroThreading Successes 01   Intro
Threading Successes 01 Intro
 
Optimization Deep Dive: Unreal Engine 4 on Intel
Optimization Deep Dive: Unreal Engine 4 on IntelOptimization Deep Dive: Unreal Engine 4 on Intel
Optimization Deep Dive: Unreal Engine 4 on Intel
 
The Architecture of Intel Processor Graphics: Gen 11
The Architecture of Intel Processor Graphics: Gen 11The Architecture of Intel Processor Graphics: Gen 11
The Architecture of Intel Processor Graphics: Gen 11
 
No[1][1]
No[1][1]No[1][1]
No[1][1]
 
Optimizing Direct X On Multi Core Architectures
Optimizing Direct X On Multi Core ArchitecturesOptimizing Direct X On Multi Core Architectures
Optimizing Direct X On Multi Core Architectures
 
Ivy bridge vs Sandy bridge Micro-architecture.
Ivy bridge vs Sandy bridge Micro-architecture.Ivy bridge vs Sandy bridge Micro-architecture.
Ivy bridge vs Sandy bridge Micro-architecture.
 
Threading Successes 06 Allegorithmic
Threading Successes 06   AllegorithmicThreading Successes 06   Allegorithmic
Threading Successes 06 Allegorithmic
 
FPGA_prototyping proccesing with conclusion
FPGA_prototyping proccesing with conclusionFPGA_prototyping proccesing with conclusion
FPGA_prototyping proccesing with conclusion
 
Gpu and The Brick Wall
Gpu and The Brick WallGpu and The Brick Wall
Gpu and The Brick Wall
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & Components
 
Trends in Systems and How to Get Efficient Performance
Trends in Systems and How to Get Efficient PerformanceTrends in Systems and How to Get Efficient Performance
Trends in Systems and How to Get Efficient Performance
 
GPU Architecture NVIDIA (GTX GeForce 480)
GPU Architecture NVIDIA (GTX GeForce 480)GPU Architecture NVIDIA (GTX GeForce 480)
GPU Architecture NVIDIA (GTX GeForce 480)
 
Intel ndk - a few Benchmarks
Intel ndk - a few BenchmarksIntel ndk - a few Benchmarks
Intel ndk - a few Benchmarks
 
UplinQ - qualcomm® snapdragon™ processors a super gaming platform
UplinQ - qualcomm® snapdragon™ processors a super gaming platformUplinQ - qualcomm® snapdragon™ processors a super gaming platform
UplinQ - qualcomm® snapdragon™ processors a super gaming platform
 
Qualcomm Snapdragon Processors: A Super Gaming Platform
Qualcomm Snapdragon Processors: A Super Gaming Platform Qualcomm Snapdragon Processors: A Super Gaming Platform
Qualcomm Snapdragon Processors: A Super Gaming Platform
 
Architectural Analysis of Game Machines
Architectural Analysis of Game MachinesArchitectural Analysis of Game Machines
Architectural Analysis of Game Machines
 
Pedal to the Metal: Accelerating Spark with Silicon Innovation
Pedal to the Metal: Accelerating Spark with Silicon InnovationPedal to the Metal: Accelerating Spark with Silicon Innovation
Pedal to the Metal: Accelerating Spark with Silicon Innovation
 
Introduction to Programmable Networks by Clarence Anslem, Intel
Introduction to Programmable Networks by Clarence Anslem, IntelIntroduction to Programmable Networks by Clarence Anslem, Intel
Introduction to Programmable Networks by Clarence Anslem, Intel
 

Recently uploaded

Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...
Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...
Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...
lizamodels9
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
amitlee9823
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
dlhescort
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
lizamodels9
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Sheetaleventcompany
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
daisycvs
 

Recently uploaded (20)

Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...
Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...
Russian Call Girls In Rajiv Chowk Gurgaon ❤️8448577510 ⊹Best Escorts Service ...
 
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
 
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLBAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentation
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
Malegaon Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Malegaon Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort ServiceMalegaon Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Malegaon Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceEluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
 
Falcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business Growth
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 

Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars

  • 1. Threading Game Engines - QUAKE 4 & Enemy Territory QUAKE Wars Anu Kalra - Intel Corporation Jan Paul van Waveren - id Software Feb 21, 2006
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. Synchronization Front End Backend Frame n Frame n-1 Frame n Frame n+1 Frame n+2 Frame n+1
  • 11.
  • 12.
  • 13. Multi-Threaded Drivers Driver Thread Driver FIFO Sound Thread Game Engine Loop OpenGL/D3D Main Thread Graphics Driver Front End 3D HW
  • 15.
  • 16. ETQW
  • 17.
  • 18.
  • 19. ETQW Threading overview Game Logic Bot AI Sound Engine Renderer Sound Driver Graphics Driver MegaTexture Transcoding MegaTexture Streaming
  • 20. Mega Texture Streaming Game Logic Bot AI Sound Engine Renderer Sound Driver Graphics Driver MegaTexture Transcoding MegaTexture Streaming
  • 21.
  • 22. Mega Texture Transcoding Game Logic Bot AI Sound Engine Renderer Sound Driver Graphics Driver MegaTexture Transcoding MegaTexture Streaming
  • 23.
  • 24. Sound Engine Game Logic Bot AI Sound Engine Renderer Sound Driver Graphics Driver MegaTexture Transcoding MegaTexture Streaming
  • 25.
  • 26. Game Logic Game Logic Bot AI Sound Engine Renderer Sound Driver Graphics Driver MegaTexture Transcoding MegaTexture Streaming
  • 27.
  • 28. Bot AI Game Logic Bot AI Sound Engine Renderer Sound Driver Graphics Driver MegaTexture Transcoding MegaTexture Streaming
  • 29.
  • 30.
  • 31.
  • 32. Bot AI static const int MIN_FRAME_DELAY = 0; static const int MAX_FRAME_DELAY = 4; HANDLE gameSignal; HANDLE aiSignal; Int gameFrameNum; int lastAIGameFrameNum; void GameThread() { for ( ; ; ) { SetCurrentGameOutputState(); AdvanceWorld(); SetCurrentGameWorldState(); gameFrameNum++ // let the AI thread know there's another game frame ::SetEvent( gameSignal ); // wait if the AI thread is falling too far behind while( lastAIGameFrameNum < gameFrameNum - MAX_FRAME_DELAY ) { ::SignalObjectAndWait( gameSignal, aiSignal, INFINITE, FALSE ); } } }
  • 33. Bot AI void AIThread() { for ( ; ; ) { // let the game thread know another AI frame has started ::SetEvent( aiSignal ); // never run more AI frames than game frames while( lastAIGameFrameNum >= gameFrameNum - MIN_FRAME_DELAY ) { ::SignalObjectAndWait( aiSignal, gameSignal, INFINITE, FALSE ); } lastAIGameFrameNum = gameFrameNum; SetCurrentAIWorldState(); AdvanceAI(); SetCurrentAIOutputState(); } }
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.