SlideShare a Scribd company logo
1 of 20
Chapter 3.4
Game Architecture
2
Overall Architecture
 The code for modern games is highly
complex
 With code bases exceeding a million
lines of code, a well-defined
architecture is essential
3
Overall Architecture
 Main structure
 Game-specific code
 Game-engine code
 Both types of code are often split into
modules, which can be static libraries, DLLs,
or just subdirectories
4
Overall Architecture
 Architecture types
 Ad-hoc (everything accesses everything)
 Modular
 DAG (directed acyclic graph)
 Layered
5
Overall Architecture
 Options for integrating tools into the
architecture
 Separate code bases (if there's no need to
share functionality)
 Partial use of game-engine functionality
 Full integration
6
Overview:
Initialization/Shutdown
 The initialization step prepares
everything that is necessary to start a
part of the game
 The shutdown step undoes everything
the initialization step did, but in reverse
order
7
Overview:
Initialization/Shutdown
 Resource Acquisition Is Initialization
 A useful rule to minimalize mismatch errors
in the initialization and shutdown steps
 Means that creating an object acquires and
initializes all the necessary resources, and
destroying it destroys and shuts down all
those resources
8
Overview:
Initialization/Shutdown
 Optimizations
 Fast shutdown
 Warm reboot
9
Overview:
Main Game Loop
 Games are driven by a game loop that
performs a series of tasks every frame
 Some games have separate loops for
the front and and the game itself
 Other games have a unified main loop
10
Overview:
Main Game Loop
 Tasks
 Handling time
 Gathering player input
 Networking
 Simulation
 Collision detection and response
 Object updates
 Rendering
 Other miscellaneous tasks
11
Overview:
Main Game Loop
 Structure
 Hard-coded loops
 Multiple game loops

For each major game state
 Consider steps as tasks to be iterated
through
12
Overview:
Main Game Loop
 Coupling
 Can decouple the rendering step from
simulation and update steps
 Results in higher frame rate, smoother
animation, and greater responsiveness
 Implementation is tricky and can be error-
prone
13
Overview:
Main Game Loop
 Execution order
 Most of the time it doesn't matter
 In some situations, execution order is
important
 Can help keep player interaction seamless
 Can maximize parallelism
 Exact ordering depends on hardware
14
Game Entities
 What are game entities?
 Basically anything in a game world that can
be interacted with
 More precisely, a self-contained piece of
logical interactive content
 Only things we will interact with should
become game entities
15
Game Entities
 Organization
 Simple list
 Multiple databases
 Logical tree
 Spatial database
16
Game Entities
 Updating
 Updating each entity once per frame can be
too expensive
 Can use a tree structure to impose a
hierarchy for updating
 Can use a priority queue to decide which
entities to update every frame
17
Game Entities
 Object creation
 Basic object factories
 Extensible object factories
 Using automatic registration
 Using explicit registration
18
Game Entities
 Level instantiation
 Loading a level involves loading both assets
and the game state
 It is necessary to create the game entities
and set the correct state for them
 Using instance data vs. template data
19
Game Entities
 Identification
 Strings
 Pointers
 Unique IDs or handles
20
Game Entities
 Communication
 Simplest method is function calls
 Many games use a full messaging system
 Need to be careful about passing and
allocating messages

More Related Content

Viewers also liked

В.М. ЛЕХАН круглий стіл нмапо
В.М. ЛЕХАН круглий стіл нмапоВ.М. ЛЕХАН круглий стіл нмапо
В.М. ЛЕХАН круглий стіл нмапоIgor Naida
 
Drawing final project studio unit living_march 2015
Drawing final project studio unit living_march 2015Drawing final project studio unit living_march 2015
Drawing final project studio unit living_march 2015gjj97
 
16.03.02 Presentation Talkative Graffiti at Centro Negra AADK
16.03.02 Presentation Talkative Graffiti at Centro Negra AADK16.03.02 Presentation Talkative Graffiti at Centro Negra AADK
16.03.02 Presentation Talkative Graffiti at Centro Negra AADKLorenza Manfredi
 
My recent documents submits @ slideshare user name deepakss02m.
My recent documents submits @ slideshare user name  deepakss02m.My recent documents submits @ slideshare user name  deepakss02m.
My recent documents submits @ slideshare user name deepakss02m.Deepak Somajee-Sawant
 
Hellenistic religion with astrology and magic .
Hellenistic religion with astrology and magic .Hellenistic religion with astrology and magic .
Hellenistic religion with astrology and magic .Deepak Somajee-Sawant
 
Theatre powerpoint
Theatre powerpointTheatre powerpoint
Theatre powerpointtrungtdo1
 
Security Evaluation of Z-Wave_WP
Security Evaluation of Z-Wave_WPSecurity Evaluation of Z-Wave_WP
Security Evaluation of Z-Wave_WPBehrang Fouladi
 
Metode Pengembangan Fisik - Modul 1 dan 2
Metode Pengembangan Fisik - Modul 1 dan 2Metode Pengembangan Fisik - Modul 1 dan 2
Metode Pengembangan Fisik - Modul 1 dan 2Mira Sumirah
 

Viewers also liked (13)

В.М. ЛЕХАН круглий стіл нмапо
В.М. ЛЕХАН круглий стіл нмапоВ.М. ЛЕХАН круглий стіл нмапо
В.М. ЛЕХАН круглий стіл нмапо
 
Mariuxi anzules
Mariuxi anzulesMariuxi anzules
Mariuxi anzules
 
Indigenous cosmic golden re (ray)
 Indigenous cosmic golden re (ray) Indigenous cosmic golden re (ray)
Indigenous cosmic golden re (ray)
 
Drawing final project studio unit living_march 2015
Drawing final project studio unit living_march 2015Drawing final project studio unit living_march 2015
Drawing final project studio unit living_march 2015
 
Promotion
PromotionPromotion
Promotion
 
16.03.02 Presentation Talkative Graffiti at Centro Negra AADK
16.03.02 Presentation Talkative Graffiti at Centro Negra AADK16.03.02 Presentation Talkative Graffiti at Centro Negra AADK
16.03.02 Presentation Talkative Graffiti at Centro Negra AADK
 
My recent documents submits @ slideshare user name deepakss02m.
My recent documents submits @ slideshare user name  deepakss02m.My recent documents submits @ slideshare user name  deepakss02m.
My recent documents submits @ slideshare user name deepakss02m.
 
Wooster IS Project
Wooster IS ProjectWooster IS Project
Wooster IS Project
 
Aprende a destruir a tu competencia
Aprende a destruir a tu competencia Aprende a destruir a tu competencia
Aprende a destruir a tu competencia
 
Hellenistic religion with astrology and magic .
Hellenistic religion with astrology and magic .Hellenistic religion with astrology and magic .
Hellenistic religion with astrology and magic .
 
Theatre powerpoint
Theatre powerpointTheatre powerpoint
Theatre powerpoint
 
Security Evaluation of Z-Wave_WP
Security Evaluation of Z-Wave_WPSecurity Evaluation of Z-Wave_WP
Security Evaluation of Z-Wave_WP
 
Metode Pengembangan Fisik - Modul 1 dan 2
Metode Pengembangan Fisik - Modul 1 dan 2Metode Pengembangan Fisik - Modul 1 dan 2
Metode Pengembangan Fisik - Modul 1 dan 2
 

Similar to 3.4 game architecture

Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)noorcon
 
Game Models - A Different Approach
Game Models - A Different ApproachGame Models - A Different Approach
Game Models - A Different ApproachNick Pruehs
 
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE WarsThreading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE Warspsteinb
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsLuca Galli
 
Building Multiplayer Games (w/ Unity)
Building Multiplayer Games (w/ Unity)Building Multiplayer Games (w/ Unity)
Building Multiplayer Games (w/ Unity)Noam Gat
 
Beat Your Mom At Solitaire—Reverse Engineering of Computer Games
Beat Your Mom At Solitaire—Reverse Engineering of Computer GamesBeat Your Mom At Solitaire—Reverse Engineering of Computer Games
Beat Your Mom At Solitaire—Reverse Engineering of Computer GamesChristoph Matthies
 
Forts and Fights Scaling Performance on Unreal Engine*
Forts and Fights Scaling Performance on Unreal Engine*Forts and Fights Scaling Performance on Unreal Engine*
Forts and Fights Scaling Performance on Unreal Engine*Intel® Software
 
Coding for multiple cores
Coding for multiple coresCoding for multiple cores
Coding for multiple coresLee Hanxue
 
Parallelizing Conqueror's Blade
Parallelizing Conqueror's BladeParallelizing Conqueror's Blade
Parallelizing Conqueror's BladeIntel® Software
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node jsAkshay Mathur
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsPouya Pournasir
 
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)David Salz
 
Module 1 embedded software essentials
Module 1 embedded software essentialsModule 1 embedded software essentials
Module 1 embedded software essentialsSaad Elkheety
 
Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - IntroductionFrancis Seriña
 
Intro to Massively Multiplayer Online Game (MMOG) Design
Intro to Massively Multiplayer Online Game (MMOG) DesignIntro to Massively Multiplayer Online Game (MMOG) Design
Intro to Massively Multiplayer Online Game (MMOG) DesignChristopher Mohritz
 
What does OOP stand for?
What does OOP stand for?What does OOP stand for?
What does OOP stand for?Colin Riley
 
Less code More fun
Less code More funLess code More fun
Less code More funAmos Laber
 

Similar to 3.4 game architecture (20)

Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
 
Game Models - A Different Approach
Game Models - A Different ApproachGame Models - A Different Approach
Game Models - A Different Approach
 
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE WarsThreading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars
 
HTML5 Game Development frameworks overview
HTML5 Game Development frameworks overviewHTML5 Game Development frameworks overview
HTML5 Game Development frameworks overview
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact js
 
Building Multiplayer Games (w/ Unity)
Building Multiplayer Games (w/ Unity)Building Multiplayer Games (w/ Unity)
Building Multiplayer Games (w/ Unity)
 
Beat Your Mom At Solitaire—Reverse Engineering of Computer Games
Beat Your Mom At Solitaire—Reverse Engineering of Computer GamesBeat Your Mom At Solitaire—Reverse Engineering of Computer Games
Beat Your Mom At Solitaire—Reverse Engineering of Computer Games
 
Forts and Fights Scaling Performance on Unreal Engine*
Forts and Fights Scaling Performance on Unreal Engine*Forts and Fights Scaling Performance on Unreal Engine*
Forts and Fights Scaling Performance on Unreal Engine*
 
Coding for multiple cores
Coding for multiple coresCoding for multiple cores
Coding for multiple cores
 
Parallelizing Conqueror's Blade
Parallelizing Conqueror's BladeParallelizing Conqueror's Blade
Parallelizing Conqueror's Blade
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & Components
 
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
Albion Online - Software Architecture of an MMO (talk at Quo Vadis 2016, Berlin)
 
Module 1 embedded software essentials
Module 1 embedded software essentialsModule 1 embedded software essentials
Module 1 embedded software essentials
 
Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - Introduction
 
Intro to Massively Multiplayer Online Game (MMOG) Design
Intro to Massively Multiplayer Online Game (MMOG) DesignIntro to Massively Multiplayer Online Game (MMOG) Design
Intro to Massively Multiplayer Online Game (MMOG) Design
 
What does OOP stand for?
What does OOP stand for?What does OOP stand for?
What does OOP stand for?
 
Less code More fun
Less code More funLess code More fun
Less code More fun
 
Hacker bootcamp
Hacker bootcampHacker bootcamp
Hacker bootcamp
 
MongoDB Sharding
MongoDB ShardingMongoDB Sharding
MongoDB Sharding
 

More from Sayed Ahmed

Workplace, Data Analytics, and Ethics
Workplace, Data Analytics, and EthicsWorkplace, Data Analytics, and Ethics
Workplace, Data Analytics, and EthicsSayed Ahmed
 
Python py charm anaconda jupyter installation and basic commands
Python py charm anaconda jupyter   installation and basic commandsPython py charm anaconda jupyter   installation and basic commands
Python py charm anaconda jupyter installation and basic commandsSayed Ahmed
 
[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic framework[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic frameworkSayed Ahmed
 
Sap hana-ide-overview-nodev
Sap hana-ide-overview-nodevSap hana-ide-overview-nodev
Sap hana-ide-overview-nodevSayed Ahmed
 
Will be an introduction to
Will be an introduction toWill be an introduction to
Will be an introduction toSayed Ahmed
 
Whm and cpanel overview hosting control panel overview
Whm and cpanel overview   hosting control panel overviewWhm and cpanel overview   hosting control panel overview
Whm and cpanel overview hosting control panel overviewSayed Ahmed
 
Web application development using zend framework
Web application development using zend frameworkWeb application development using zend framework
Web application development using zend frameworkSayed Ahmed
 
Web design and_html_part_3
Web design and_html_part_3Web design and_html_part_3
Web design and_html_part_3Sayed Ahmed
 
Web design and_html_part_2
Web design and_html_part_2Web design and_html_part_2
Web design and_html_part_2Sayed Ahmed
 
Web design and_html
Web design and_htmlWeb design and_html
Web design and_htmlSayed Ahmed
 
Visual studio ide shortcuts
Visual studio ide shortcutsVisual studio ide shortcuts
Visual studio ide shortcutsSayed Ahmed
 
Unit tests in_symfony
Unit tests in_symfonyUnit tests in_symfony
Unit tests in_symfonySayed Ahmed
 
Telerik this is sayed
Telerik this is sayedTelerik this is sayed
Telerik this is sayedSayed Ahmed
 
System analysis and_design
System analysis and_designSystem analysis and_design
System analysis and_designSayed Ahmed
 
Story telling and_narrative
Story telling and_narrativeStory telling and_narrative
Story telling and_narrativeSayed Ahmed
 

More from Sayed Ahmed (20)

Workplace, Data Analytics, and Ethics
Workplace, Data Analytics, and EthicsWorkplace, Data Analytics, and Ethics
Workplace, Data Analytics, and Ethics
 
Python py charm anaconda jupyter installation and basic commands
Python py charm anaconda jupyter   installation and basic commandsPython py charm anaconda jupyter   installation and basic commands
Python py charm anaconda jupyter installation and basic commands
 
[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic framework[not edited] Demo on mobile app development using ionic framework
[not edited] Demo on mobile app development using ionic framework
 
Sap hana-ide-overview-nodev
Sap hana-ide-overview-nodevSap hana-ide-overview-nodev
Sap hana-ide-overview-nodev
 
Invest wisely
Invest wiselyInvest wisely
Invest wisely
 
Will be an introduction to
Will be an introduction toWill be an introduction to
Will be an introduction to
 
Whm and cpanel overview hosting control panel overview
Whm and cpanel overview   hosting control panel overviewWhm and cpanel overview   hosting control panel overview
Whm and cpanel overview hosting control panel overview
 
Web application development using zend framework
Web application development using zend frameworkWeb application development using zend framework
Web application development using zend framework
 
Web design and_html_part_3
Web design and_html_part_3Web design and_html_part_3
Web design and_html_part_3
 
Web design and_html_part_2
Web design and_html_part_2Web design and_html_part_2
Web design and_html_part_2
 
Web design and_html
Web design and_htmlWeb design and_html
Web design and_html
 
Visual studio ide shortcuts
Visual studio ide shortcutsVisual studio ide shortcuts
Visual studio ide shortcuts
 
Virtualization
VirtualizationVirtualization
Virtualization
 
User interfaces
User interfacesUser interfaces
User interfaces
 
Unreal
UnrealUnreal
Unreal
 
Unit tests in_symfony
Unit tests in_symfonyUnit tests in_symfony
Unit tests in_symfony
 
Telerik this is sayed
Telerik this is sayedTelerik this is sayed
Telerik this is sayed
 
System analysis and_design
System analysis and_designSystem analysis and_design
System analysis and_design
 
Symfony 2
Symfony 2Symfony 2
Symfony 2
 
Story telling and_narrative
Story telling and_narrativeStory telling and_narrative
Story telling and_narrative
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

3.4 game architecture

  • 2. 2 Overall Architecture  The code for modern games is highly complex  With code bases exceeding a million lines of code, a well-defined architecture is essential
  • 3. 3 Overall Architecture  Main structure  Game-specific code  Game-engine code  Both types of code are often split into modules, which can be static libraries, DLLs, or just subdirectories
  • 4. 4 Overall Architecture  Architecture types  Ad-hoc (everything accesses everything)  Modular  DAG (directed acyclic graph)  Layered
  • 5. 5 Overall Architecture  Options for integrating tools into the architecture  Separate code bases (if there's no need to share functionality)  Partial use of game-engine functionality  Full integration
  • 6. 6 Overview: Initialization/Shutdown  The initialization step prepares everything that is necessary to start a part of the game  The shutdown step undoes everything the initialization step did, but in reverse order
  • 7. 7 Overview: Initialization/Shutdown  Resource Acquisition Is Initialization  A useful rule to minimalize mismatch errors in the initialization and shutdown steps  Means that creating an object acquires and initializes all the necessary resources, and destroying it destroys and shuts down all those resources
  • 9. 9 Overview: Main Game Loop  Games are driven by a game loop that performs a series of tasks every frame  Some games have separate loops for the front and and the game itself  Other games have a unified main loop
  • 10. 10 Overview: Main Game Loop  Tasks  Handling time  Gathering player input  Networking  Simulation  Collision detection and response  Object updates  Rendering  Other miscellaneous tasks
  • 11. 11 Overview: Main Game Loop  Structure  Hard-coded loops  Multiple game loops  For each major game state  Consider steps as tasks to be iterated through
  • 12. 12 Overview: Main Game Loop  Coupling  Can decouple the rendering step from simulation and update steps  Results in higher frame rate, smoother animation, and greater responsiveness  Implementation is tricky and can be error- prone
  • 13. 13 Overview: Main Game Loop  Execution order  Most of the time it doesn't matter  In some situations, execution order is important  Can help keep player interaction seamless  Can maximize parallelism  Exact ordering depends on hardware
  • 14. 14 Game Entities  What are game entities?  Basically anything in a game world that can be interacted with  More precisely, a self-contained piece of logical interactive content  Only things we will interact with should become game entities
  • 15. 15 Game Entities  Organization  Simple list  Multiple databases  Logical tree  Spatial database
  • 16. 16 Game Entities  Updating  Updating each entity once per frame can be too expensive  Can use a tree structure to impose a hierarchy for updating  Can use a priority queue to decide which entities to update every frame
  • 17. 17 Game Entities  Object creation  Basic object factories  Extensible object factories  Using automatic registration  Using explicit registration
  • 18. 18 Game Entities  Level instantiation  Loading a level involves loading both assets and the game state  It is necessary to create the game entities and set the correct state for them  Using instance data vs. template data
  • 19. 19 Game Entities  Identification  Strings  Pointers  Unique IDs or handles
  • 20. 20 Game Entities  Communication  Simplest method is function calls  Many games use a full messaging system  Need to be careful about passing and allocating messages