SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
Lo sviluppo di
Edge Guardian
Alcune note tecniche
Partendo da zero
● Realizzare un MVP videludico in pochi mesi
○ Quali sfide tecniche?
○ Vediamo qualche esempio
Partendo da zero
● Rendering stereoscopico
○ Low level rendering
○ Setup della telecamera
■ Distanza interoculare
■ Convergenza
● Tracking
○ Librerie di basso livello per l’acquisizione
○ Interpolazione e smoothing dei dati di tracking
○ Gestione dei tracked device
Integrazione con Unity3D
Uso di Unity con HTC Vive:
● SteamVR (architettura open source)
○ OpenVR (libreria open source)
● VRTK (VR Tool Kit)
○ Nato dalla community
○ Grezzo all’inizio
■ Alcune integrazioni sono state necessarie
○ Evoluto moltissimo in pochi mesi
Le vere sfide
Iterazioni brevi:
● Mercato nuovo ed in fermento
○ Necessità di essere disponibili al pubblico il prima possibile
Ottimizzazione:
● Vive richiede(va) 90fps obbligatori
○ Ogni hiccup risulta estremamente fastidioso
○ Cali prolungati di framerate portano nausea
○ Problema parzialmente superato di recente con ATW (Asynchronous
reprojection)
Comportamenti emergenti
All’inizio erano le sfere:
● Non erano troppo interessanti
Comportamenti emergenti
Rendere i nemici più “intelligenti”:
● Avvicinamento convincente
● Capacità di evitare gli attacchi
● Non rimanere bloccati dietro ostacoli o nel paesaggio
● Movimento fluido
● Evitare comportamenti “robotici”
Comportamenti emergenti
Soluzioni:
● Behaviour trees?
● Flocking behaviours?
● Reti neurali?
● Forse meglio partire da un approccio semplice…
○ Physics based
○ Un unico movimento base: reach point
○ Guidato da una FSM
○ Meccanismo di evitamento
Comportamenti emergenti
Risultato finale:
● Difficile veder finire una partita senza almeno una
parolaccia
○ Good job!
Resa estetica
● Effetti di post processo
○ Fondamentali per la resa
estetica
○ Molti sono inadatti alla VR
■ Avvengono in screen
space
Resa estetica
● Stereoscopia:
I post processi avvengono qui
Resa estetica
● Necessari molti esperimenti:
○ Esclusi
■ Nebbia volumetrica
■ Ambient occlusion
■ Tilt shift
■ ...
○ Utilizzati
■ Antialiasing
■ Bloom
Resa estetica
Ottimizzazioni
● Questione di applicare fin dall’inizio alcune best
practices
○ Pooling per evitare instanziazione
○ Paradigma 90/10
■ Problema “a thousand updates”
■ Gestione dei cicli
○ I test, anche su macchine relativamente low end, hanno dato risultati
incoraggianti
“Debolezze” di Unity da conoscere ed aggirare
Ottimizzazioni
● Pooling degli oggetti
○ Istanziazione di un nuovo oggetto: operazione dispendiosa
○ Ondate di centinaia di nemici in contemporanea
○ Pool di nemici istanziati in startup
■ Offscreen
■ Diverse categorie
■ Configurabili
■ Un manager che ne gestisce il ciclo di vita
Ottimizzazioni
● “A thousand updates”
(https://blogs.unity3d.com/2015/12/23/1k-update-calls/)
○ Unity si basa sul paradigma entità/componenti
○ Ogni componente possiede vari “hook”
■ Alcuni, come Update(), vengono richiamati ad ogni ciclo
Overhead
Chiamata
Update()
Ottimizzazioni
● “A thousand updates”
○ Con molti oggetti interattivi in contemporanea, l’overhead può essere
un grosso problema
○ Soluzione:
■ Di nuovo il manager pattern
● Un solo oggetto che abbia i riferimenti a tutti gli oggetti
di una categoria
● Una chiamata ad Update()...
● ...che aggiorna tutti gli oggetti in un ciclo
Ottimizzazioni
● Garbage collection e gestione dei cicli
○ Unity scripting backend: Mono 2.6.5 (circa .NET 2.0)
○ Gestione automatica della memoria e GC
■ GC non generazionale
■ Ogni passaggio del GC causa fps hiccups
○ .NET possiede classi collection generiche molto utili
■ List<>, Queue<>, Stack<>, Dictionary<>, …
■ MA
■ L’utilizzo del pratico costrutto foreach su di essi genera
garbage
● (bug di Mono 2.6.5)
Ottimizzazioni
● Garbage collection e gestione dei cicli
○ Rimanendo nel paradigma 90/10 esistono due soluzioni
■ Utilizzare for al posto di foreach
■ Riscrivere l’enumeratore per le classi interessate
Grazie a tutti per l’attenzione!

Contenu connexe

En vedette

How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016Codemotion
 
The (almost) lost art of Smalltalk - Nikolas Martens - Codemotion Milan 2016
The (almost) lost art of Smalltalk - Nikolas Martens - Codemotion Milan 2016The (almost) lost art of Smalltalk - Nikolas Martens - Codemotion Milan 2016
The (almost) lost art of Smalltalk - Nikolas Martens - Codemotion Milan 2016Codemotion
 
Developing apps for developing countries - Natalie Pistunovich - Codemotion M...
Developing apps for developing countries - Natalie Pistunovich - Codemotion M...Developing apps for developing countries - Natalie Pistunovich - Codemotion M...
Developing apps for developing countries - Natalie Pistunovich - Codemotion M...Codemotion
 
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016Codemotion
 
Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...
Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...
Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...Codemotion
 
The Evolution of Asynchronous Javascript - Alessandro Cinelli - Codemotion Mi...
The Evolution of Asynchronous Javascript - Alessandro Cinelli - Codemotion Mi...The Evolution of Asynchronous Javascript - Alessandro Cinelli - Codemotion Mi...
The Evolution of Asynchronous Javascript - Alessandro Cinelli - Codemotion Mi...Codemotion
 
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Codemotion
 
A-Frame in the Virtual World, small bricks of virtual reality web - Giovanni ...
A-Frame in the Virtual World, small bricks of virtual reality web - Giovanni ...A-Frame in the Virtual World, small bricks of virtual reality web - Giovanni ...
A-Frame in the Virtual World, small bricks of virtual reality web - Giovanni ...Codemotion
 
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...Codemotion
 
Lo sviluppo di Edge Guardian VR - Marco Giammetti - Codemotion Milan 2016
Lo sviluppo di Edge Guardian VR - Marco Giammetti - Codemotion Milan 2016Lo sviluppo di Edge Guardian VR - Marco Giammetti - Codemotion Milan 2016
Lo sviluppo di Edge Guardian VR - Marco Giammetti - Codemotion Milan 2016Codemotion
 
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016Codemotion
 
Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016
Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016
Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016Codemotion
 
The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...
The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...
The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...Codemotion
 
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015
Codemotion rome 2015   bluemix lab tutorial -- Codemotion Rome 2015Codemotion rome 2015   bluemix lab tutorial -- Codemotion Rome 2015
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015Codemotion
 
Luciano Fiandesio - Docker 101 | Codemotion Milan 2015
Luciano Fiandesio - Docker 101 | Codemotion Milan 2015Luciano Fiandesio - Docker 101 | Codemotion Milan 2015
Luciano Fiandesio - Docker 101 | Codemotion Milan 2015Codemotion
 
A recommendation engine for your applications - M.Orselli - Codemotion Rome 17
A recommendation engine for your applications - M.Orselli - Codemotion Rome 17A recommendation engine for your applications - M.Orselli - Codemotion Rome 17
A recommendation engine for your applications - M.Orselli - Codemotion Rome 17Codemotion
 
Engineering Design for Facebook
Engineering Design for FacebookEngineering Design for Facebook
Engineering Design for FacebookCodemotion
 
Cutting the Fat
Cutting the FatCutting the Fat
Cutting the FatCodemotion
 

En vedette (20)

How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
 
The (almost) lost art of Smalltalk - Nikolas Martens - Codemotion Milan 2016
The (almost) lost art of Smalltalk - Nikolas Martens - Codemotion Milan 2016The (almost) lost art of Smalltalk - Nikolas Martens - Codemotion Milan 2016
The (almost) lost art of Smalltalk - Nikolas Martens - Codemotion Milan 2016
 
Developing apps for developing countries - Natalie Pistunovich - Codemotion M...
Developing apps for developing countries - Natalie Pistunovich - Codemotion M...Developing apps for developing countries - Natalie Pistunovich - Codemotion M...
Developing apps for developing countries - Natalie Pistunovich - Codemotion M...
 
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
How to avoid Go gotchas - Ivan Daniluk - Codemotion Milan 2016
 
Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...
Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...
Progressive Web Apps: trick or real magic? - Maurizio Mangione - Codemotion M...
 
The Evolution of Asynchronous Javascript - Alessandro Cinelli - Codemotion Mi...
The Evolution of Asynchronous Javascript - Alessandro Cinelli - Codemotion Mi...The Evolution of Asynchronous Javascript - Alessandro Cinelli - Codemotion Mi...
The Evolution of Asynchronous Javascript - Alessandro Cinelli - Codemotion Mi...
 
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
Understanding Angular 2 - Shmuela Jacobs - Codemotion Milan 2016
 
A-Frame in the Virtual World, small bricks of virtual reality web - Giovanni ...
A-Frame in the Virtual World, small bricks of virtual reality web - Giovanni ...A-Frame in the Virtual World, small bricks of virtual reality web - Giovanni ...
A-Frame in the Virtual World, small bricks of virtual reality web - Giovanni ...
 
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
 
Lo sviluppo di Edge Guardian VR - Marco Giammetti - Codemotion Milan 2016
Lo sviluppo di Edge Guardian VR - Marco Giammetti - Codemotion Milan 2016Lo sviluppo di Edge Guardian VR - Marco Giammetti - Codemotion Milan 2016
Lo sviluppo di Edge Guardian VR - Marco Giammetti - Codemotion Milan 2016
 
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
 
Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016
Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016
Games of Simplicity - Pozzi; Molinari - Codemotion Milan 2016
 
The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...
The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...
The hitchhiker's guide to UXing without a UXer - Chrissy Welsh - Codemotion M...
 
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015
Codemotion rome 2015   bluemix lab tutorial -- Codemotion Rome 2015Codemotion rome 2015   bluemix lab tutorial -- Codemotion Rome 2015
Codemotion rome 2015 bluemix lab tutorial -- Codemotion Rome 2015
 
Luciano Fiandesio - Docker 101 | Codemotion Milan 2015
Luciano Fiandesio - Docker 101 | Codemotion Milan 2015Luciano Fiandesio - Docker 101 | Codemotion Milan 2015
Luciano Fiandesio - Docker 101 | Codemotion Milan 2015
 
A recommendation engine for your applications - M.Orselli - Codemotion Rome 17
A recommendation engine for your applications - M.Orselli - Codemotion Rome 17A recommendation engine for your applications - M.Orselli - Codemotion Rome 17
A recommendation engine for your applications - M.Orselli - Codemotion Rome 17
 
Engineering Design for Facebook
Engineering Design for FacebookEngineering Design for Facebook
Engineering Design for Facebook
 
9
99
9
 
8
88
8
 
Cutting the Fat
Cutting the FatCutting the Fat
Cutting the Fat
 

Similaire à Lo sviluppo di Edge Guardian VR - Maurizio Tatafiore - Codemotion Milan 2016

Linux Day 2016 Milano - Open Source Hardware PowerPC Notebook
Linux Day 2016 Milano - Open Source Hardware PowerPC Notebook Linux Day 2016 Milano - Open Source Hardware PowerPC Notebook
Linux Day 2016 Milano - Open Source Hardware PowerPC Notebook Roberto Innocenti
 
Webkit presentazione ufficiale
Webkit presentazione ufficialeWebkit presentazione ufficiale
Webkit presentazione ufficialeintoinside
 
October 2009 - JBoss Cloud
October 2009 - JBoss CloudOctober 2009 - JBoss Cloud
October 2009 - JBoss CloudJBug Italy
 
JBoss Clouds - JBug Roma october 2009
JBoss Clouds -  JBug Roma october 2009JBoss Clouds -  JBug Roma october 2009
JBoss Clouds - JBug Roma october 2009Sanne Grinovero
 
Project modern c++ (ITA)
Project modern c++ (ITA)Project modern c++ (ITA)
Project modern c++ (ITA)Raffaele Rialdi
 
It starts with a goal - Prato
It starts with a goal - PratoIt starts with a goal - Prato
It starts with a goal - PratoRiccardo Porrini
 
Open Day June 17th Creare componenti AngularJS riutilizzabili tra applicazioni
Open Day June 17th Creare componenti AngularJS riutilizzabili tra applicazioniOpen Day June 17th Creare componenti AngularJS riutilizzabili tra applicazioni
Open Day June 17th Creare componenti AngularJS riutilizzabili tra applicazioniVendini-Italy
 
Ttg 09 07_2015_debug_vs_2015
Ttg 09 07_2015_debug_vs_2015Ttg 09 07_2015_debug_vs_2015
Ttg 09 07_2015_debug_vs_2015Piero Sbressa
 
VMUGIT - Virtualizzare con i piedi per terra
VMUGIT - Virtualizzare con i piedi per terraVMUGIT - Virtualizzare con i piedi per terra
VMUGIT - Virtualizzare con i piedi per terraVMUG IT
 
Presentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terra
Presentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terraPresentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terra
Presentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terraAndrea Mauro
 
Riccardo it starts_with_a_goal_DevOps_Heroes_Parma
Riccardo it starts_with_a_goal_DevOps_Heroes_ParmaRiccardo it starts_with_a_goal_DevOps_Heroes_Parma
Riccardo it starts_with_a_goal_DevOps_Heroes_ParmaRiccardo Porrini
 
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLDTYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLDDotNetCampus
 
Slide typescript - net campus
Slide typescript - net campusSlide typescript - net campus
Slide typescript - net campusDotNetCampus
 
VMUG.IT @ ITway Campus 2014
VMUG.IT @ ITway Campus 2014VMUG.IT @ ITway Campus 2014
VMUG.IT @ ITway Campus 2014Andrea Mauro
 
It Starts with a Goal - Continuous Delivery of an API Platform
It Starts with a Goal - Continuous Delivery of an API PlatformIt Starts with a Goal - Continuous Delivery of an API Platform
It Starts with a Goal - Continuous Delivery of an API PlatformRiccardo Porrini
 
Costruisci il tuo device
Costruisci il tuo deviceCostruisci il tuo device
Costruisci il tuo deviceDotNetCampus
 
COSTRUISCI IL TUO DEVICE
COSTRUISCI IL TUO DEVICECOSTRUISCI IL TUO DEVICE
COSTRUISCI IL TUO DEVICEDotNetCampus
 

Similaire à Lo sviluppo di Edge Guardian VR - Maurizio Tatafiore - Codemotion Milan 2016 (20)

Linux Day 2017 - Italia
Linux Day 2017 - ItaliaLinux Day 2017 - Italia
Linux Day 2017 - Italia
 
Linux Day 2016 Milano - Open Source Hardware PowerPC Notebook
Linux Day 2016 Milano - Open Source Hardware PowerPC Notebook Linux Day 2016 Milano - Open Source Hardware PowerPC Notebook
Linux Day 2016 Milano - Open Source Hardware PowerPC Notebook
 
Webkit presentazione ufficiale
Webkit presentazione ufficialeWebkit presentazione ufficiale
Webkit presentazione ufficiale
 
October 2009 - JBoss Cloud
October 2009 - JBoss CloudOctober 2009 - JBoss Cloud
October 2009 - JBoss Cloud
 
JBoss Clouds - JBug Roma october 2009
JBoss Clouds -  JBug Roma october 2009JBoss Clouds -  JBug Roma october 2009
JBoss Clouds - JBug Roma october 2009
 
Project modern c++ (ITA)
Project modern c++ (ITA)Project modern c++ (ITA)
Project modern c++ (ITA)
 
It starts with a goal - Prato
It starts with a goal - PratoIt starts with a goal - Prato
It starts with a goal - Prato
 
Open Day June 17th Creare componenti AngularJS riutilizzabili tra applicazioni
Open Day June 17th Creare componenti AngularJS riutilizzabili tra applicazioniOpen Day June 17th Creare componenti AngularJS riutilizzabili tra applicazioni
Open Day June 17th Creare componenti AngularJS riutilizzabili tra applicazioni
 
Ttg 09 07_2015_debug_vs_2015
Ttg 09 07_2015_debug_vs_2015Ttg 09 07_2015_debug_vs_2015
Ttg 09 07_2015_debug_vs_2015
 
VMUGIT - Virtualizzare con i piedi per terra
VMUGIT - Virtualizzare con i piedi per terraVMUGIT - Virtualizzare con i piedi per terra
VMUGIT - Virtualizzare con i piedi per terra
 
Presentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terra
Presentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terraPresentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terra
Presentazione al VMUGIT UC 2014 - Virtualizzare con i piedi per terra
 
Riccardo it starts_with_a_goal_DevOps_Heroes_Parma
Riccardo it starts_with_a_goal_DevOps_Heroes_ParmaRiccardo it starts_with_a_goal_DevOps_Heroes_Parma
Riccardo it starts_with_a_goal_DevOps_Heroes_Parma
 
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLDTYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
TYPESCRIPT, ANGULAR E BOOTSTRAP ASSIEME PER APPLICAZIONI REAL WORLD
 
Slide typescript - net campus
Slide typescript - net campusSlide typescript - net campus
Slide typescript - net campus
 
Continuos Integration
Continuos IntegrationContinuos Integration
Continuos Integration
 
VMUG.IT @ ITway Campus 2014
VMUG.IT @ ITway Campus 2014VMUG.IT @ ITway Campus 2014
VMUG.IT @ ITway Campus 2014
 
It Starts with a Goal - Continuous Delivery of an API Platform
It Starts with a Goal - Continuous Delivery of an API PlatformIt Starts with a Goal - Continuous Delivery of an API Platform
It Starts with a Goal - Continuous Delivery of an API Platform
 
OpenDevSecOps 2019 - Open devsecops un caso di studio
OpenDevSecOps 2019 - Open devsecops un caso di studioOpenDevSecOps 2019 - Open devsecops un caso di studio
OpenDevSecOps 2019 - Open devsecops un caso di studio
 
Costruisci il tuo device
Costruisci il tuo deviceCostruisci il tuo device
Costruisci il tuo device
 
COSTRUISCI IL TUO DEVICE
COSTRUISCI IL TUO DEVICECOSTRUISCI IL TUO DEVICE
COSTRUISCI IL TUO DEVICE
 

Plus de Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

Plus de Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Lo sviluppo di Edge Guardian VR - Maurizio Tatafiore - Codemotion Milan 2016

  • 1. Lo sviluppo di Edge Guardian Alcune note tecniche
  • 2. Partendo da zero ● Realizzare un MVP videludico in pochi mesi ○ Quali sfide tecniche? ○ Vediamo qualche esempio
  • 3. Partendo da zero ● Rendering stereoscopico ○ Low level rendering ○ Setup della telecamera ■ Distanza interoculare ■ Convergenza ● Tracking ○ Librerie di basso livello per l’acquisizione ○ Interpolazione e smoothing dei dati di tracking ○ Gestione dei tracked device
  • 4. Integrazione con Unity3D Uso di Unity con HTC Vive: ● SteamVR (architettura open source) ○ OpenVR (libreria open source) ● VRTK (VR Tool Kit) ○ Nato dalla community ○ Grezzo all’inizio ■ Alcune integrazioni sono state necessarie ○ Evoluto moltissimo in pochi mesi
  • 5. Le vere sfide Iterazioni brevi: ● Mercato nuovo ed in fermento ○ Necessità di essere disponibili al pubblico il prima possibile Ottimizzazione: ● Vive richiede(va) 90fps obbligatori ○ Ogni hiccup risulta estremamente fastidioso ○ Cali prolungati di framerate portano nausea ○ Problema parzialmente superato di recente con ATW (Asynchronous reprojection)
  • 6. Comportamenti emergenti All’inizio erano le sfere: ● Non erano troppo interessanti
  • 7. Comportamenti emergenti Rendere i nemici più “intelligenti”: ● Avvicinamento convincente ● Capacità di evitare gli attacchi ● Non rimanere bloccati dietro ostacoli o nel paesaggio ● Movimento fluido ● Evitare comportamenti “robotici”
  • 8. Comportamenti emergenti Soluzioni: ● Behaviour trees? ● Flocking behaviours? ● Reti neurali? ● Forse meglio partire da un approccio semplice… ○ Physics based ○ Un unico movimento base: reach point ○ Guidato da una FSM ○ Meccanismo di evitamento
  • 9. Comportamenti emergenti Risultato finale: ● Difficile veder finire una partita senza almeno una parolaccia ○ Good job!
  • 10. Resa estetica ● Effetti di post processo ○ Fondamentali per la resa estetica ○ Molti sono inadatti alla VR ■ Avvengono in screen space
  • 11. Resa estetica ● Stereoscopia: I post processi avvengono qui
  • 12. Resa estetica ● Necessari molti esperimenti: ○ Esclusi ■ Nebbia volumetrica ■ Ambient occlusion ■ Tilt shift ■ ... ○ Utilizzati ■ Antialiasing ■ Bloom
  • 14. Ottimizzazioni ● Questione di applicare fin dall’inizio alcune best practices ○ Pooling per evitare instanziazione ○ Paradigma 90/10 ■ Problema “a thousand updates” ■ Gestione dei cicli ○ I test, anche su macchine relativamente low end, hanno dato risultati incoraggianti “Debolezze” di Unity da conoscere ed aggirare
  • 15. Ottimizzazioni ● Pooling degli oggetti ○ Istanziazione di un nuovo oggetto: operazione dispendiosa ○ Ondate di centinaia di nemici in contemporanea ○ Pool di nemici istanziati in startup ■ Offscreen ■ Diverse categorie ■ Configurabili ■ Un manager che ne gestisce il ciclo di vita
  • 16. Ottimizzazioni ● “A thousand updates” (https://blogs.unity3d.com/2015/12/23/1k-update-calls/) ○ Unity si basa sul paradigma entità/componenti ○ Ogni componente possiede vari “hook” ■ Alcuni, come Update(), vengono richiamati ad ogni ciclo Overhead Chiamata Update()
  • 17. Ottimizzazioni ● “A thousand updates” ○ Con molti oggetti interattivi in contemporanea, l’overhead può essere un grosso problema ○ Soluzione: ■ Di nuovo il manager pattern ● Un solo oggetto che abbia i riferimenti a tutti gli oggetti di una categoria ● Una chiamata ad Update()... ● ...che aggiorna tutti gli oggetti in un ciclo
  • 18. Ottimizzazioni ● Garbage collection e gestione dei cicli ○ Unity scripting backend: Mono 2.6.5 (circa .NET 2.0) ○ Gestione automatica della memoria e GC ■ GC non generazionale ■ Ogni passaggio del GC causa fps hiccups ○ .NET possiede classi collection generiche molto utili ■ List<>, Queue<>, Stack<>, Dictionary<>, … ■ MA ■ L’utilizzo del pratico costrutto foreach su di essi genera garbage ● (bug di Mono 2.6.5)
  • 19. Ottimizzazioni ● Garbage collection e gestione dei cicli ○ Rimanendo nel paradigma 90/10 esistono due soluzioni ■ Utilizzare for al posto di foreach ■ Riscrivere l’enumeratore per le classi interessate
  • 20. Grazie a tutti per l’attenzione!