• No results found

Master Game Dev - Game Engine

N/A
N/A
Protected

Academic year: 2021

Share "Master Game Dev - Game Engine"

Copied!
9
0
0

Loading.... (view fulltext now)

Full text

(1)

Master Game Dev

Verona, 2016

Game Engines

Marco Tarini

General info

Marco Tarini

Google for “marco tarini”, 1

st

link

Follow “teaching”

(bottom)

Follow “Master Computer game dev 2016”:

pagina del corso: materiale, lucidi, links.

Follow “contact”

(bottom)

Mail, tel, etc…

This Course

this course

Possibili testi di rifemento

(1/2)

Mathematics

for 3D Game Progr. and C.G.

(3za ed)

Eric Lengyel

Copre bene il lato + tecnico: 3D math, CG pipeline, geometry + transforms, raytracing, visibility, physic sims, semplice geom processing…

Game Engine

Architecture

Jason Gregory

Abb. completo (con cenni di:

software tools, software eng., AI prog, CG prog, math, game design...)

(2)

Possibili testi di rifemento

(2/2)

Game

Coding

Complete

(4ta ed)

Mike McShaffry,David Graham

Visione pratica (attenzione a osolescenza) Accento su coding, software eng (es memory managment).

Introduction to

3D

Game Programming

with DirectX 11

Frank Luna

Rendering / GPU (in pratica, copre il corso di CG)

Dev-Teams

Tecnici

Artisti

Game Dev

Task comuni affrontati

Rendering

Real time transofrm + lighting

Phyisics

Newtonian physical simulations Collision detection + response

Networking

Sound rendering

Input management

Program structure

Loop di gestione degli eventi

reuse!

+Animations

scripted or computed

Game Engine

Solutions to «common» tasks

of a game-development

Base:

Main applcation structure

events. main loop, multithreads…

Math / geometry support

Modules to address core sub-tasks,

as…

(3)

Game Engine

GRAPHICS

PHYSICS

GUI + INTERFACES

SOUND

NETWORKING

. . .

ARTIFICIAL INTELLIGENCE

ASSET MANAGEMENT

SCRIPTING

Game Engine: modules

Renderer

Real time transofrm + lighting Models, materials …

Physics engine

(soft real-time) newtonian physical simulations Collision detection + response

Networking

(LAN – es using UTP, or TPC)

Sound mixer e “sound-renderer” Unified management of HCI devices Assets management

Import

Memory management

Artificial intelligence module

Solutions to common sub-tasks, e.g. routing

Script interpreter

Supporting functions for: interaction with other modules, and math/geometry, … Ad-hoc languages, or generic (LUA, C#, JavaScript)

GUIs (e.g. HUDs)

Animations

scripted or computed

Other services provided by a

Game Engine:

Deployment

Multi-platform

Integration with

GPU APIs

GPU drivers

GPU

Localization support

(translation tools)

Game-tools integration

Game

Dev-Teams

Tecnici

Artisti

game

engine

game

tools

sviluppano customizzano integrano

(4)

Dev-Teams

Tecnici

Artisti

(

aka

contents)

3D data models textures materials shaders animations collision objects scenes etc audio music sound fxs ambient sounds voice overs etc video

cut-scenes, intros, etc

2D art

screen splashes backgrounds GUI / HUD elements [ sprites & tile-sets ? ] fonts etc text dialogues trees messages translations etc etc: scripts stats levels etc

game

assets

Assets in

Game Development

game

game

tools

digital artists

game

MOD

assets

digression:

Game

[MOD]

Development

game

(public)

game

tools

game fans!

MOD

(5)

game

assets

Game Tools

game

game

engine

game

tools

digital artists

game

assets

Game Engine

GRAPHICS

PHYSICS

GUI + INTERFACES

SOUND

NETWORKING

. . .

ARTIFICIAL INTELLIGENCE

ASSET MANAGEMENT

SCRIPTING

Game Engine

GRAPHICS

PHYSICS

GUI + INTERFACES

SOUND

NETWORKING

. . .

ARTIFICIAL INTELLIGENCE

SCRIPTING

A

S

S

E T

S

ASSET MANAGEMENT

A

S

S

E T

S

Game assets!

(

aka

game contents)

3D data models textures materials shaders animations collision objects scenes etc audio music sound fxs ambient sounds voice overs etc video

bakedcut-scenes, intros, etc

2D art

screen splashes backgrounds GUI / HUD elements [ sprites & tile-sets ? ] fonts etc text dialogues trees messages translations etc etc: scripts stats levels etc

(6)

3D Models

i.e. tri-meshes with:

per vertex attrib

normals, color, AO, …

LODs “uv-mapping” keyframes cyclic animations face-morphs, … “skinning” Materials

lighting model stats / flags textures RGB maps normal maps alpha maps … shaders vertex, fragments, …

game assets

Animations blend shapes skeletal animations kinematic animations geometry caches skeletons (rigs) Geometric proxies hit-boxes bounding objects AI-meshes Particle systems Environments 3d scenes (scene-graph) skydomes env. maps scene props

A Game Engine

GRAPHICS

PHYSICS

GUI + INTERFACES

SOUND

NETWORKING

. . .

ARTIFICIAL INTELLIGENCE

SCRIPTING

A

S

S

E T

S

ASSET MANAGEMENT

A

S

S

E T

S

An central asset,

bridging most modules:

The 3D SCENE structure

“scene graph”

Game engine programming:

basics

Can be:

a library,

an IDE (e.g. integrating several game tools)

Various level of specializations

Genre specific, or generic

3D only / 2D only / both

Dev Language: C++

(7)

Quanto è «

hard wired

»

una feature di un video game?

A che livello è implementata?

nell HARDWARE

(es. nella GPU)

nel GAME ENGINE

nel codicedel video-game in uno script (o cmq pilotabile da un asset) meno Hard-Wired più Hard-Wired TERMINOLOGICA

Chi la può modificare?

Il vendor dell’HW (> platform dependence!) il dev del Game Engine i programmatori del video game gli artisti (es. i level designer); i modders

Quanto è «

hard wired

»

una feature di un video game?

Hard-wired

> efficienza

> scalabilità

> riutilizzo

Non-hard wired

> mantenibilità

> customizzabilità

> flessibilità

TERMINOLOGICA

Un concetto collegato

DESIGNED

Prodotto in fase di

sviluppo del gioco

« è un asset » « è scripted »

> qualità

(di solito) (è il prodotto di un artista)

> controllo

per il game designer

(efficienza tempo

FORSE

)

PROCEDURAL

Prodotto da un algoritmo

in fase di esecuzione

« è una procedura » « è computato dinamicam. »

> variabilità

legata a “replayability”

> flessibilità

(poss. di adattam a situaz.)

(efficienza spazio

RAM, DISK…

)

NOTA TERMINOLOGICA

VS

Procedural generation

nei games

Livelli procedurali Missioni procedurali Terreni procedurali AI procedurali Boss procedurali Scene procedurali Modellazione procedurale Tessiture procedurali

Animazioni procedurali (physics engine) Musica procedurale

Elite, Acornsoft, 1984 Left 4 dead, Valve, 2008

Minecraft, Mojang, 2009 Rescue the beagles, 16x16, 2008

Shadow Over Mordor, Monolith Prod., 2014 Rogue, Michael Toy et al, 1980

(8)

«

Baked

» / «

Pre-baked

»

Baking

:

lett: cuocere (al forno)

“Storing for good

the result of a computation, for later use”

( the exact opposite of procedural )

Gain:

time (CPU / GPU )

almost total independence from computation complexity ! less compromises, more quality

Pay with:

space (e.g. on Disk ,Ram ,GPU Ram) loss of flexibility

(all the parameters of the computation become fixed)

note: several assets are baked-

something

(or have baked elements)

i.e. in the long term (otherwise, it’s caching)

often,

(refined versions of) the ones normally done in real time

«

Baked

» / «

Pre-baked

»

i.e. in the long term, in assets (otherwise, it’s caching)

often, (refined versions of) the ones normally done in real time

Storing

for good

the result of

a

computation

, for later use

it: “cuocere (al forno)”

Gain:

• time (CPU /GPU load) • almost total independence from

computation complexity ! • less compromises,

more quality

Pay with: • space

(e.g. on Disk ,Ram ,GPU Ram) • loss of flexibility

(all the parameters of the computation become fixed) note:several assets are

baked-something or have baked elements

baking

:

A Game Engine

GRAPHICS

PHYSICS

GUI + INTERFACES

SOUND

ARTIFICIAL INTELLIGENCE

SCRIPTING

A

S

S

E T

S

A

S

S

E T

S

e ve n t l o o p , t im e rs , t h

M

A

IN

E

N

G

IN

E

NON-interactive

programs

main() { init(); do_my_beautiful_algorithm(); exit(); }

(9)

For interactive apps

Event-Based programs

Like: Servers, Web apps,

Games

main() { init(); while (true) { get_event() ; process_event(); } }

{

Event loop

events of any kind, like:

• from input devices (mouse, keyboard, …) • from window systems (reshape,windows exposed, ...) • generated from the application itself (timers, subrouting over, …)

(same thread, or different ones) • a msg comes from network (a file finished loading)

(finished uploading on GPU…)

For interactive apps

Event-Based programs

Like: Servers, Web apps,

Games

main() { init(); while (true) { get_event() ; process_event(); } }

{

Event loop

Typically: execute the corresponding callback Callback: a function assigned

References

Related documents

The COMBAR manual was presented, the main features of COMBAR Teaching Concept were presented alongside with examples from the piloting that took place in Bucks New

- - Step 3 : Coupling reaction : A large excess of amino acid is used (typically 2-10 times excess compared to the resin functionality) with the carboxy group of this amino

Grad Cert in Systems Architecting & Engineering – Program Details. Required Courses

Tabulka 44 Výpočet hodnoty druhé fáze metodou EVA (v tis. Výsledná hodnota podniku Centropen, a.s. vyčíslena za pomoci metody EVA, je dána součtem hodnot 1. provozní hodnota

To access them, from the 4D Interactive Model Player window, choose the File pull-down menu and select Choose 4DIM View.. On this window there is a radio selector to choose

Using the expanded measure of disability, the percentage of households that are asset-deprived, by this measure, is higher for households with disabilities

Buffel grass may completely dominate the grass layer but other grasses which may be present include ribbon grass (Chrysopogon fallax), Roebourne Plains grass (Eragrostis

Manson Floating Reamer Holder is available from Dave Manson precision Reamers.. Clymer Floating reamer holder is available from Clymer