0% found this document useful (0 votes)
12 views

Module - 1 - 3

Uploaded by

keshiba1238
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Module - 1 - 3

Uploaded by

keshiba1238
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 35

Game Engine Architecture

Chapter 1
Introduction

Dr. S. Graceline Jasmine, SCOPE

Vellore Institute of Technology, Chennai


Runtime Engine Architecture
• Consists of the tools suite and runtime
components
• Large
▫ Spans hardware to high-level application
• Designed in layers
▫ Avoids circular dependencies to maximize
reuse and testability
Runtime Engine
Runtime Engine
• Low level components
• 3rd Party SDKs
• Platform independence layer
• Core systems
• Resources manager
• Rendering engine
• Profiling/Debugging
• Collisions and Physics
• Animation
• Human Interface Devices
• Audio
• Gameplay foundation system
Low level components

• Hardware
▫ This is the system that the game is to run on
• Device Drivers
▫ Shield the OS and upper layers from low level
device communications details
• Operating System
▫ Handles the execution and interruption of
multiple programs on a single machine
▫ Very thin on a console
3rd Party SDKs
• Data Structure and Algorithms
▫ STL – C++ standard template library data structures, strings, stream-
based I/O
▫ Boost – powerful data structures and algorithms
● Boost libraries are intended to be widely useful, and usable across a broad
spectrum of applications. For example, they are helpful for handling large
numbers having range beyond the long long, long double data type (2 64) in
C++.
• Graphics
▫ OpenGL and DirectX
• Collisions and Physics
▫ Havok, PhysX, ODE, Bullet
• Character Animation
• Artificial Intelligence – Kynapse
Platform independence layer
• Allows the engine to be developed
without the concern of the
underlying platform
• Provides wrappers to common target
specific operations
• Include things like primitive types,
network, file systems, etc.
Core systems
• Assertions – error checking code
• Memory Management
• Math library – vector and matrix
math, numeric integrators
• Custom data structures
Resource manager
• Provides a unified interface for accessing assets
• The level of complexity is dictated by need
▫ Often the game programmers must do resource
loading directly
▫ Engines like UT do unpackaging and complex
manipulation of assets in the engine
Rendering engine
• Low-level
• Scene graph management
• Visual effects
• Front end
Rendering
• Modeling is the mathematical
specification of shape and appearance
properties in a way that can be stored on
the computer
• Rendering is creation of shaded images
from 3d computer models
• Animation is a technique to create an
illusion of motion through a sequence of
images. Handling time is a key issue in
animation
Graphics Objects
• Gameobjects- Anything to which components are attached
▫ Aggregation of other game objects

• Canvas – It is user interface which is normally the top most layer


displaying the game scores
• Layer – The various layers that hold gameobjects together
▫ Layer 0 has the full visibility
▫ Other layers may be occluded(hidden) based on the objects in other layers

• Sprite-are simple 2D objects that have graphical images (called textures)


on them. Whenever Unity makes a new sprite, it uses a texture. This
texture is then applied on a fresh GameObject, and a Sprite Renderer
component is attached to it.

• A renderer is what makes an object appear on the screen. Use this class
to access the renderer of any object, mesh or Particle
System. Renderers can be disabled to make objects invisible (see enabled)
Low-level Renderer
• Focuses on rendering primitives as quickly and richly as
possible
▫ Does not consider visibility
• Graphics Device Interface
▫ Access and enumerate the graphics devices
▫ Initialize the GD
▫ Setup buffering
• Others
▫ Representation of the geometric primitives
▫ Abstraction of the camera interface
▫ Material system
▫ Dynamic lighting system
▫ Text and fonts
Scene graph
• Limits the number of primitives submitted
for rendering
• Uses frustum culling – remove things
outside of the visible screen
• Spatial subdivision
▫ BSP, quadtree, octree, kd-tree
Visual effects
• Particle systems
• Decal systems
• Light mapping
• Dynamic shadows
• Full screen post effects
Front end
• HUD
• Menus
• GUI for character manipulation
• Full-motion video for cut scenes
Profiling/Debugging
• Code timing
• Display stats on the screen
• Dumping performance stats
• Determining memory usage
• Dumping memory usage
• Record and playback game events
• Print statement output control
Collisions and Physics
• Usually rigid body dynamics
• Physics engine creation is its own unique
undertaking
• Many companies use available libraries
▫ Havok
▫ PhysX
▫ ODE
▫ Bullet
Animation

• Five types of animation are used


▫ Sprite/texture animation
▫ Rigid body hierarchy animation
▫ Skeletal animation
▫ Vertex animation
▫ Morphing
• Skeletal animations still the most
popular
HID
• Keyboard and mouse
abstractions
• Joypads
• Specialized controllers
• Massages raw data into
useful information
Audio

• Often overlooked until the


end
• Varies in sophistication based
on need
• Many games use existing
tools
▫ XACT
▫ Scream
Multiplayer/networking
• Four main flavors
▫ Single screen – multiple players on the same
screen
▫ Split-screen multiplayer – multiple
perspectives on the same screen
▫ Networked multiplayer – multiple computers
networked together
▫ Massive multiplayer online games – run in a
central server
• Difficult to convert single to
multiplayer, easy to do the
opposite
Gameplay foundation system
• Most everything that makes the game a game
• World loading
• Game object model
• Static world elements
• Real-time agent simulations
Event system
• Objects need to communicate with one
another
• Easiest to handle this through a common
system
• Objects send messages that are routed to
the event handler
Scripting system
• Allows for the creation on new game logic
without recompiling
• Speeds software development
considerably
Artificial intelligence foundations
• Provides AI building blocks
▫ Path planning
▫ Nav mesh generation
▫ Object avoidance
• Autodesk has a middleware called
Gameware that provides many of these
features
Game-specific subsystems

• All of the specific stuff needed for a game


• This layer could be considered outside of
the game engine itself
Tools and the asset pipeline
Digital content creation
• Game engines deal with data in many forms
• The data has to be created somehow
▫ 3D Meshes
▫ Textures
▫ Sound
▫ Animations
• Often created using outside tools
▫ Maya/3ds Max
▫ Photoshop
▫ SoundForge
• DCC tools need to be easy to use and very reliable
Assets conditioning pipeline
• DCC tools produce a variety of file
formats that are not optimized for game
• Game engines usually store the data in an
easy to read and platform specific format
• The ACP does this translation
Conditioning assets
• 3D Model/Mesh data
▫ 3D Models – Must be properly tessellated
▫ Brush Geometry – A collection of convex hulls with
multiple planes
• Skeletal animation data
▫ Must be compressed and converted to properly work
• Audio data
▫ Should convert multiple formats to a single format for
the target system
• Particle system data
▫ Usually need a custom editing tool within the engine
Game world editor
• Usually integrated into the engine
• Essential to allow game designers to work
with the engine
• Many examples
▫ UnrealEd
▫ Hammer
▫ Radiant
Resource database
• Need a way to store and manage the vast
amounts of data
• Some companies use relational databases
▫ MySQL or Oracle
• Some companies use version control
software
▫ Subversion, Perforce, or GIT
• Still others use custom software
▫ Naughty Dog uses a custom GUI called
Builder
Approaches to Tool Architecture
Stand alone Integrated
Web-based tools
• Various uses
▫ Asset management
▫ Scheduling
▫ Bug management
• Easier to build
▫ Usually easier to build than a stand alone
application
▫ Easier to update without forcing a reinstall
• If it just needs to present tabular data and
have forms – use a web interface

You might also like