• Non ci sono risultati.

A S SE T SA S SE T S

N/A
N/A
Protected

Academic year: 2021

Condividi "A S SE T SA S SE T S"

Copied!
9
0
0

Testo completo

(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++

efficiency, elegance, flexibility

(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

Un roguelike

(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

event loop, timers, th

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

to react to a given event

Riferimenti

Documenti correlati

Pertanto l’impresa potrà vedersi richiede- re modifiche e/o integrazioni da parte dei due soggetti (Ausl e Cse), ciascuno per il piano di propria competenza.. Il presente

 ricerca di un indirizzo in un archivio dato il nome leggi nome della prima scheda. if è il nome cercato

 ricerca di un indirizzo in un archivio dato il nome leggi nome della prima scheda. if è il nome cercato estrai

Tale norma stabilisce che in ogni caso in cui per la selezione del contraente o per la stipulazione del contratto relativamente a lavori, servizi o forniture previsti o in

Nel 1987 fu costituito di nuovo il Tribunale di Appello presso il Vicariato, competente, fra l’altro, per la seconda istanza delle sentenze dei due tribunali di primo

5. A seguito della comunicazione, di avvio del riesame da parte dell’Autorità competente, il Gestore presenta, entro il termine determinato dall’Autorità competente in base

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

“Le tasse di rinnovo dei brevetti europei con effetto unitario e le sovrattasse per il loro pagamento tardivo sono corrisposte all’Organizzazione europea dei brevetti da parte