Chapter 3.6 Game Architecture. 2 Overall Architecture The code for modern games is highly complex With code bases exceeding a million lines of code, a.

Slides:



Advertisements
Similar presentations
CSCE 590E Spring 2007 Game Programming By Jijun Tang.
Advertisements

Approaches to EJB Replication. Overview J2EE architecture –EJB, components, services Replication –Clustering, container, application Conclusions –Advantages.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
2 Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how statecharts can be used to describe system behaviors  Use statecharts.
How do games work? Game Workshop July 4, Parts Sprites/pictures Map/background Music/sounds Player character Enemies Objects.
CSCE 590E Spring 2007 Game Architecture and Math By Jijun Tang.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Chapter 1 and 2 Computer System and Operating System Overview
Establishing the overall structure of a software system
Chapter 3.7 Memory and I/O Systems. 2 Memory Management Only applies to languages with explicit memory management (C or C++) Memory problems are one of.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Chapter 3.4 Programming Fundamentals. 2 Data Structures Arrays – Elements are adjacent in memory (great cache consistency) – They never grow or get reallocated.
Chapter 3.4 Game Architecture. Overall Architecture The code for modern games is highly complex With code bases exceeding a million lines of code, a well-defined.
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
CHAPTER 17 Creating an Interactive 3D Environment © 2008 Cengage Learning EMEA.
Event-Driven Architecture Team 4 – Idris Callins, Jestin Keaton, Bill Pegg, Steven Ng.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Dependency Injection and Model-View-Controller. Overview Inversion of Control Model-View-Controller.
PacMan by Midway, released 1980 CSE 380 – Computer Game Programming Real-Time Game Architecture.
Chapter Languages, Programming and Architecture.
Games Development 2 Entity / Architecture Review CO3301 Week
CSE 381 – Advanced Game Programming 3D Game Architecture.
The Design Discipline.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 13Slide 1 Architectural Design u Establishing the overall structure of a software system.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 10 Architectural Design.
Rethinking Game Architecture with Immutability Jacob Dufault Faculty Advisor: Dr. Phil Bernhard, Dept of Computer Science, Florida Institute of Technology.
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
CSCE 552 Spring 2011 Math By Jijun Tang. Layered.
Architectural Design To explain the advantages and disadvantages of different distributed systems architectures To discuss client-server and distributed.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
CSCE 552 Spring 2009 Programming Fundamentals By Jijun Tang.
Chapter 3.5 Memory and I/O Systems. 2 Memory Management Memory problems are one of the leading causes of bugs in programs (60-80%) MUCH worse in languages.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Systems Analysis and Design in a Changing World, 3rd Edition
Software Engineering CSC 342/Dr. Ghazy Assassa Chapter 10, Architectural Design “Sommerville +.. “ Slide 1 CSC 342 Semester II: H ( G)
 Repository Model  Client-Server Model  Layered Model  Modular decomposition styles  Object Models  Function Oriented Pipelining  Control Styles.
University of Windsor School of Computer Science Topics in Artificial Intelligence Fall 2008 Sept 11, 2008.
Games Development 2 Review & Revision Strategy CO3301 End of Semester 1.
“The perfect project plan is possible if one first documents a list of all the unknowns.” Bill Langley.
Games Development 2 Overview & Entity IDs and Communication CO3301 Week 1.
Games Development Game Architecture: Entities CO2301 Games Development 1 Week 22.
Chapter 3.6 Game Architecture. 2 Overall Architecture The code for modern games is highly complex (can easily exceed 1M LOC) The larger your program,
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 system architecture 1 after designing to meet functional requirements, design the system.
CSCE 552 Fall 2012 Language and Programming By Jijun Tang.
Object Oriented Database By Ashish Kaul References from Professor Lee’s presentations and the Web.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Games Development 1 Review / Revision CO2301 Games Development 1 Semester 2.
Mock Objects in Functional Testing Sven Rosvall. Dimension Data Cloud Business Unit.
CSCE 552 Fall 2012 Language and Programming By Jijun Tang.
CSCE 552 Spring 2011 Math By Jijun Tang. Languages C/C++ Java Script: Flash, Python, LISP, etc. C# XNA for PC and Xbox.
SYSTEM ANALYSIS AND DESIGN SAFAA S.Y. DALLOUL. DESIGN THE PROGRAM.
Slide 1 Chapter 8 Architectural Design. Slide 2 Topics covered l System structuring l Control models l Modular decomposition l Domain-specific architectures.
CSCE 552 Spring 2009 Game Architecture and Math By Jijun Tang.
1.3 Operating system services An operating system provide services to programs and to the users of the program. It provides an environment for the execution.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 5:Architectural Design l Establishing the overall structure of a software.
CSCE 552 Spring 2011 Language and Programming By Jijun Tang.
Language and Programming
Game Architecture Rabin is a good overview of everything to do with Games A lot of these slides come from the 1st edition CS 4455.
Task Scheduling for Multicore CPUs and NUMA Systems
TerraForm3D Plasma Works 3D Engine & USGS Terrain Modeler
Northbound API Dan Shmidt | January 2017
3D Game Development Time and game loop Jernej Vičič.
Games Development Game Architecture: Entities
Games Development 1 Review / Revision
Games Development 2 Entity / Architecture Review
Chapter 2: Building a System
Overview Problem Solution CPU vs Memory performance imbalance
Prof. Onur Mutlu Carnegie Mellon University
Presentation transcript:

Chapter 3.6 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