game engine architecture

Post on 26-May-2015

1.233 Views

Category:

Technology

4 Downloads

Preview:

Click to see full reader

DESCRIPTION

Use a game engine to create a video game. Its reusable components provide the general functionality. Define resources and building blocks. What are the key elements of a game engine?

TRANSCRIPT

GAME ENGINE ARCHITECTURE

MAIN CLASSES

VIEW CONTROLLER, VIEW

• Update loop

• Render loop

• Events

SCENE MANAGER

• On update and render cycle

• Swaps scenes

• Handles events

SCENE

• Content into scenes

• Nodes to be rendered

• Per-frame processing

NODE

• Basic elements

• Tree hierarchy

• Selected properties are applied from parent

RESOURCES

TEXTURES

• Graphical data

• Avoid from multiple memory usage

• Preloading

FONTS

• Image, or

• Pre-generated bitmapfrom vector font

SOUNDS

• Short sound effects

• Instant play

• Simultaneous play

• Uncompressed data

• Preloading

SHADERS

• Programs for GPUs

• Visual effects

• Less CPU usage

MATERIALS

• Lighting properties

• Shader Program selection

• Used by Buffer Nodes

VERTEX AND INDEX BUFFER

• Vertex data

• Index data

• Points, lines, or triangles

• Owned by Buffer Nodes

NODES

BUFFER NODE

• Draws a Vertex Buffer

• Index Buffer is optional

SPRITE NODE

• Textured sprite

• Rectangular 2D image

• Clipping

LABEL NODE

• Draws a string

• Uses Font resource

• Align modes

• Word-wrap

• Clipping

EMITTER NODE

• Particle systems

• Visual effects

• Own coordinate-system

• Source of particles

CAMERA NODE

• Represents the viewer’s point of view

• Used by the Render Pipeline

LIGHT NODE

• Ambient, directional, point source

• Lighting is enabled by the used Material

• Limited count

SOUND NODE

• Plays a sound

• 3D or stereo sound effect by its position

• Attach to graphical representation

MUSIC NODE

• Plays the background music

• Single

• Compressed data

• Buffered play

• Looping

RENDER PIPELINE

RENDER PIPELINE

• Executed on render cycle

• For the presented scene

• Single or multiple steps

RENDER STEP

• Selects destination buffer

• Specifies root source node (generally the scene)

• Uses a camera for the point of view

OTHER COMPONENTS

GAME RELATED

• 2D or 3D physics simulation

• Game Center or similar gaming network

MONETIZATION, MEDIA

• In-app purchases

• Advertising

• Social media interactions

by Attila Jenei

!http://www.attilajenei.com

Game Engine Architecture

top related