SlideShare a Scribd company logo
1 of 33
Sleep Attack TD
The Technical Post Mortem
Roberto Mangiafico
Gameplay Programmer in Ubisoft Milan since 2007
In 2012 left Ubisoft and created Bad Seed with other colleagues
About Me
Bad Seed
Sheep Up!
Sleep Attack
Sleep Attack: featuring and critics
Engine and Tools
3D Camera in 2D game: Why
1. Circles in perspective
2. 3D movement feeling
3D Camera in 2D game
Gameplay camera
3D Camera in 2D game: Issue #1
Z fight problem
Not good looking perspective on objects
3D Camera in 2D game: Issue #1
Solution: Every object is counter rotated towards the gameplay camera
3D Camera in 2D game: Issue #1
3D Camera in 2D game: Issue #2
Border artifact
3D Camera in 2D game: Issue #2
Rendering order:
A
B
Draw B
 Blend border transparence with background color
 Write on the Z buffer
Draw A
 Find Z buffer with higher value
 Can’t blend with the B object border
Possible solution:
High value of cut off on the shader
Cons:
Very aliased borders
3D Camera in 2D game: Issue #2
Possible solutions:
Setup the camera to use Z distance only for rendering
order
Cons:
1. Very hard to manage for 200+ object per scene
2. Prompt to error
3. Don’t work for moving objects
3D Camera in 2D game: Issue #2
 Very high draw call number for mobile game
 200+ object per level
 Almost every object is animated
3D Camera in 2D game: Issue #3
Possible Solution:
Use Unity batching
Cons:
Objects must be static : No animation, No movement
3D Camera in 2D game: Issue #3
The Mesh Merger
 Create a big mesh with all the meshes vertices
 Apply the transforms animations of objects
 Keep the meshes UV’s
 Order the meshes from top to bottom of the screen
The solution we chose
Every mesh:
At scene loading register himself to its MeshMerger
Mesh Merger at mesh registration:
Store the vertices and the transform into a struct inside an array
containing all the registered meshes info
Mesh Merger – How it works
Mesh Merger at mesh registration:
 Disable the renderer of the registered mesh
 Order the vertices from up to bottom
Mesh Merger – How it works
Every frame:
 Apply the transformation to the vertices of the mesh
 Order the vertices from up to bottom IF NEEDED
Mesh Merger – How it works
…
Pro:
1. Resolve draw call issue
2. Resolve rendering order issues
3. Work with transform animated objects
4. Work with uv animated object
Cons:
1. Script a bit heavy on the cpu
2. All the meshes registered into a mesh merger must
have the same material
Mesh Merger
 No dynamic List<>
 Optimized for quad
Mesh Merger – Optimizations
Before:
Mesh Merger – Comparison
After:
Different screen ratio 16:9 – 4:3 – 1:1 – 3.2:19
Different resolutions and dpi
Problems:
• Adapt the HUD
• Adapt the 3D view
• Adapt the resolution for dpi
Different screen types
Adapt the HUD
Different screen types: Issue #1
New Unity GUI system not yet available
Created our own dynamic HUD system
Dynamic HUD system
• Dedicated camera
• 3D panels
• Position relative to screen
Adapt the 3D view
Different screen types: Issue #2
No need to change nothing for different ratio
Simply we see more background elements
Adapt for different resolutions
For devices with high resolution we needed an hd version
For almost everything we have a double version – SD and HD
HD has twice the resolution of SD
At the level load we load HD version if needed
Different screen types: Issue #3
Big memory load due to high number of textures with low
compression and sounds
Average 150MB for SD Level
Average 300MB for HD Level
1. Load only needed sounds and textures
2. Mid loading level
3. Load everything at startup, nothing during gameplay
4. Load only needed resolution HD/SD
Memory issues
Q/A
Thank you!

More Related Content

Similar to Roberto Mangiafico, CTO BadSeed Entertainment - Sleep Attach: A Technical Post-Mortem (How to Web Conference 2014 - Game Development Track)

PlayStation®3 Leads Stereoscopic 3D Entertainment World
PlayStation®3 Leads Stereoscopic 3D Entertainment World PlayStation®3 Leads Stereoscopic 3D Entertainment World
PlayStation®3 Leads Stereoscopic 3D Entertainment World Slide_N
 
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...DevClub_lv
 
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJSFestUA
 
Lecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingLecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingKobkrit Viriyayudhakorn
 
Advanced techniques for development of 2D Windows 8 games
Advanced techniques for development of 2D Windows 8 gamesAdvanced techniques for development of 2D Windows 8 games
Advanced techniques for development of 2D Windows 8 gamesMicrosoft Schweiz
 
Multi Touch Tomorrow's Interface
Multi Touch Tomorrow's InterfaceMulti Touch Tomorrow's Interface
Multi Touch Tomorrow's Interfaceguest2ece86
 
Cross platform game development
Cross platform game developmentCross platform game development
Cross platform game developmentJerel Hass
 
Sviluppare Videogiochi in 2D con Unity
Sviluppare Videogiochi in 2D con UnitySviluppare Videogiochi in 2D con Unity
Sviluppare Videogiochi in 2D con UnityCodemotion
 
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014Mary Chan
 
Uncharted 2: Character Pipeline
Uncharted 2: Character PipelineUncharted 2: Character Pipeline
Uncharted 2: Character PipelineNaughty Dog
 
CNC plotter controlled using Android application
CNC plotter controlled using Android applicationCNC plotter controlled using Android application
CNC plotter controlled using Android applicationYuval Yoskovits
 
351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf
351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf
351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdfkalelboss
 
06. Game Architecture
06. Game Architecture06. Game Architecture
06. Game ArchitectureAmin Babadi
 
Car racing game for android
Car racing game for androidCar racing game for android
Car racing game for androidravijot singh
 
Unity advanced computer graphics
Unity advanced computer graphicsUnity advanced computer graphics
Unity advanced computer graphicsTri Thanh
 
Korea linuxforum2014 html5game-sangseoklim
Korea linuxforum2014 html5game-sangseoklimKorea linuxforum2014 html5game-sangseoklim
Korea linuxforum2014 html5game-sangseoklimSang Seok Lim
 
Full stack development in Go
Full stack development in GoFull stack development in Go
Full stack development in GoYves Junqueira
 

Similar to Roberto Mangiafico, CTO BadSeed Entertainment - Sleep Attach: A Technical Post-Mortem (How to Web Conference 2014 - Game Development Track) (20)

PlayStation®3 Leads Stereoscopic 3D Entertainment World
PlayStation®3 Leads Stereoscopic 3D Entertainment World PlayStation®3 Leads Stereoscopic 3D Entertainment World
PlayStation®3 Leads Stereoscopic 3D Entertainment World
 
Level 5
Level 5Level 5
Level 5
 
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
 
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
 
Lecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingLecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR Programming
 
Advanced techniques for development of 2D Windows 8 games
Advanced techniques for development of 2D Windows 8 gamesAdvanced techniques for development of 2D Windows 8 games
Advanced techniques for development of 2D Windows 8 games
 
Unity
UnityUnity
Unity
 
Multi Touch Tomorrow's Interface
Multi Touch Tomorrow's InterfaceMulti Touch Tomorrow's Interface
Multi Touch Tomorrow's Interface
 
Cross platform game development
Cross platform game developmentCross platform game development
Cross platform game development
 
Sviluppare Videogiochi in 2D con Unity
Sviluppare Videogiochi in 2D con UnitySviluppare Videogiochi in 2D con Unity
Sviluppare Videogiochi in 2D con Unity
 
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014Benoit fouletier guillaume martin   unity day- modern 2 d techniques-gce2014
Benoit fouletier guillaume martin unity day- modern 2 d techniques-gce2014
 
Uncharted 2: Character Pipeline
Uncharted 2: Character PipelineUncharted 2: Character Pipeline
Uncharted 2: Character Pipeline
 
CNC plotter controlled using Android application
CNC plotter controlled using Android applicationCNC plotter controlled using Android application
CNC plotter controlled using Android application
 
351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf
351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf
351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf
 
06. Game Architecture
06. Game Architecture06. Game Architecture
06. Game Architecture
 
Case study of digital camera
Case study of digital cameraCase study of digital camera
Case study of digital camera
 
Car racing game for android
Car racing game for androidCar racing game for android
Car racing game for android
 
Unity advanced computer graphics
Unity advanced computer graphicsUnity advanced computer graphics
Unity advanced computer graphics
 
Korea linuxforum2014 html5game-sangseoklim
Korea linuxforum2014 html5game-sangseoklimKorea linuxforum2014 html5game-sangseoklim
Korea linuxforum2014 html5game-sangseoklim
 
Full stack development in Go
Full stack development in GoFull stack development in Go
Full stack development in Go
 

More from How to Web

Marketing Technologies, Tools and Tactics by Travis Wright at How to Web Conf...
Marketing Technologies, Tools and Tactics by Travis Wright at How to Web Conf...Marketing Technologies, Tools and Tactics by Travis Wright at How to Web Conf...
Marketing Technologies, Tools and Tactics by Travis Wright at How to Web Conf...How to Web
 
MVP Academy: Lessons Learnt
MVP Academy: Lessons LearntMVP Academy: Lessons Learnt
MVP Academy: Lessons LearntHow to Web
 
MVP Academy Follow-up Report
MVP Academy Follow-up ReportMVP Academy Follow-up Report
MVP Academy Follow-up ReportHow to Web
 
How to Web Conference 2015 - Event Report
How to Web Conference 2015 - Event ReportHow to Web Conference 2015 - Event Report
How to Web Conference 2015 - Event ReportHow to Web
 
How to Web Conference 2015
How to Web Conference 2015How to Web Conference 2015
How to Web Conference 2015How to Web
 
Product metrics by Bogdan Ripa
Product metrics by Bogdan RipaProduct metrics by Bogdan Ripa
Product metrics by Bogdan RipaHow to Web
 
Michael Ni, Senior VP Marketing & Products Avangate - What's a Product? Servi...
Michael Ni, Senior VP Marketing & Products Avangate - What's a Product? Servi...Michael Ni, Senior VP Marketing & Products Avangate - What's a Product? Servi...
Michael Ni, Senior VP Marketing & Products Avangate - What's a Product? Servi...How to Web
 
Agnieszka Szostak, Founder PR Outreach - The Good, The Bad and the PR (How to...
Agnieszka Szostak, Founder PR Outreach - The Good, The Bad and the PR (How to...Agnieszka Szostak, Founder PR Outreach - The Good, The Bad and the PR (How to...
Agnieszka Szostak, Founder PR Outreach - The Good, The Bad and the PR (How to...How to Web
 
Cristian Diaconescu, Founder Sand Sailor Studio - Black The Fall: the story b...
Cristian Diaconescu, Founder Sand Sailor Studio - Black The Fall: the story b...Cristian Diaconescu, Founder Sand Sailor Studio - Black The Fall: the story b...
Cristian Diaconescu, Founder Sand Sailor Studio - Black The Fall: the story b...How to Web
 
Dan Olthen, Game of Thrones Producer @ BigPoint GmbH - Make it happen: the st...
Dan Olthen, Game of Thrones Producer @ BigPoint GmbH - Make it happen: the st...Dan Olthen, Game of Thrones Producer @ BigPoint GmbH - Make it happen: the st...
Dan Olthen, Game of Thrones Producer @ BigPoint GmbH - Make it happen: the st...How to Web
 
Vlad Micu, Head of Studio Critical Force Entertainment - The complete game st...
Vlad Micu, Head of Studio Critical Force Entertainment - The complete game st...Vlad Micu, Head of Studio Critical Force Entertainment - The complete game st...
Vlad Micu, Head of Studio Critical Force Entertainment - The complete game st...How to Web
 
Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...
Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...
Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...How to Web
 
Valerian Banu, Product Analyst UberVu via HootSuite - What we've learnt while...
Valerian Banu, Product Analyst UberVu via HootSuite - What we've learnt while...Valerian Banu, Product Analyst UberVu via HootSuite - What we've learnt while...
Valerian Banu, Product Analyst UberVu via HootSuite - What we've learnt while...How to Web
 
Mark Tolmacs, Product Manager UStream Inc. - How I stopped worrying and start...
Mark Tolmacs, Product Manager UStream Inc. - How I stopped worrying and start...Mark Tolmacs, Product Manager UStream Inc. - How I stopped worrying and start...
Mark Tolmacs, Product Manager UStream Inc. - How I stopped worrying and start...How to Web
 
Salim Virani, Partner Founder Centric - Craft (HTW Conference 2014)
Salim Virani, Partner Founder Centric - Craft (HTW Conference 2014)Salim Virani, Partner Founder Centric - Craft (HTW Conference 2014)
Salim Virani, Partner Founder Centric - Craft (HTW Conference 2014)How to Web
 
Alex Hunter, CEO Rushmore - Getting and keeping customers
Alex Hunter, CEO Rushmore - Getting and keeping customersAlex Hunter, CEO Rushmore - Getting and keeping customers
Alex Hunter, CEO Rushmore - Getting and keeping customersHow to Web
 
Marco Cecconi, Software Developer @ Stack Exchange - The architecture of Stac...
Marco Cecconi, Software Developer @ Stack Exchange - The architecture of Stac...Marco Cecconi, Software Developer @ Stack Exchange - The architecture of Stac...
Marco Cecconi, Software Developer @ Stack Exchange - The architecture of Stac...How to Web
 
Sitar Teli, Managing Partner, Connect Ventures - Core Metrics: What Web and M...
Sitar Teli, Managing Partner, Connect Ventures - Core Metrics: What Web and M...Sitar Teli, Managing Partner, Connect Ventures - Core Metrics: What Web and M...
Sitar Teli, Managing Partner, Connect Ventures - Core Metrics: What Web and M...How to Web
 
Simon Stewart, Facebook engineer - Building Facebook for Android
Simon Stewart, Facebook engineer - Building Facebook for AndroidSimon Stewart, Facebook engineer - Building Facebook for Android
Simon Stewart, Facebook engineer - Building Facebook for AndroidHow to Web
 
Startup Spotlight: Appticles 5 minutes pitchcles
Startup Spotlight: Appticles 5 minutes pitchclesStartup Spotlight: Appticles 5 minutes pitchcles
Startup Spotlight: Appticles 5 minutes pitchclesHow to Web
 

More from How to Web (20)

Marketing Technologies, Tools and Tactics by Travis Wright at How to Web Conf...
Marketing Technologies, Tools and Tactics by Travis Wright at How to Web Conf...Marketing Technologies, Tools and Tactics by Travis Wright at How to Web Conf...
Marketing Technologies, Tools and Tactics by Travis Wright at How to Web Conf...
 
MVP Academy: Lessons Learnt
MVP Academy: Lessons LearntMVP Academy: Lessons Learnt
MVP Academy: Lessons Learnt
 
MVP Academy Follow-up Report
MVP Academy Follow-up ReportMVP Academy Follow-up Report
MVP Academy Follow-up Report
 
How to Web Conference 2015 - Event Report
How to Web Conference 2015 - Event ReportHow to Web Conference 2015 - Event Report
How to Web Conference 2015 - Event Report
 
How to Web Conference 2015
How to Web Conference 2015How to Web Conference 2015
How to Web Conference 2015
 
Product metrics by Bogdan Ripa
Product metrics by Bogdan RipaProduct metrics by Bogdan Ripa
Product metrics by Bogdan Ripa
 
Michael Ni, Senior VP Marketing & Products Avangate - What's a Product? Servi...
Michael Ni, Senior VP Marketing & Products Avangate - What's a Product? Servi...Michael Ni, Senior VP Marketing & Products Avangate - What's a Product? Servi...
Michael Ni, Senior VP Marketing & Products Avangate - What's a Product? Servi...
 
Agnieszka Szostak, Founder PR Outreach - The Good, The Bad and the PR (How to...
Agnieszka Szostak, Founder PR Outreach - The Good, The Bad and the PR (How to...Agnieszka Szostak, Founder PR Outreach - The Good, The Bad and the PR (How to...
Agnieszka Szostak, Founder PR Outreach - The Good, The Bad and the PR (How to...
 
Cristian Diaconescu, Founder Sand Sailor Studio - Black The Fall: the story b...
Cristian Diaconescu, Founder Sand Sailor Studio - Black The Fall: the story b...Cristian Diaconescu, Founder Sand Sailor Studio - Black The Fall: the story b...
Cristian Diaconescu, Founder Sand Sailor Studio - Black The Fall: the story b...
 
Dan Olthen, Game of Thrones Producer @ BigPoint GmbH - Make it happen: the st...
Dan Olthen, Game of Thrones Producer @ BigPoint GmbH - Make it happen: the st...Dan Olthen, Game of Thrones Producer @ BigPoint GmbH - Make it happen: the st...
Dan Olthen, Game of Thrones Producer @ BigPoint GmbH - Make it happen: the st...
 
Vlad Micu, Head of Studio Critical Force Entertainment - The complete game st...
Vlad Micu, Head of Studio Critical Force Entertainment - The complete game st...Vlad Micu, Head of Studio Critical Force Entertainment - The complete game st...
Vlad Micu, Head of Studio Critical Force Entertainment - The complete game st...
 
Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...
Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...
Mathieu Muller, Field Engineer Unity Technologies - Unity 5: Easier, Better, ...
 
Valerian Banu, Product Analyst UberVu via HootSuite - What we've learnt while...
Valerian Banu, Product Analyst UberVu via HootSuite - What we've learnt while...Valerian Banu, Product Analyst UberVu via HootSuite - What we've learnt while...
Valerian Banu, Product Analyst UberVu via HootSuite - What we've learnt while...
 
Mark Tolmacs, Product Manager UStream Inc. - How I stopped worrying and start...
Mark Tolmacs, Product Manager UStream Inc. - How I stopped worrying and start...Mark Tolmacs, Product Manager UStream Inc. - How I stopped worrying and start...
Mark Tolmacs, Product Manager UStream Inc. - How I stopped worrying and start...
 
Salim Virani, Partner Founder Centric - Craft (HTW Conference 2014)
Salim Virani, Partner Founder Centric - Craft (HTW Conference 2014)Salim Virani, Partner Founder Centric - Craft (HTW Conference 2014)
Salim Virani, Partner Founder Centric - Craft (HTW Conference 2014)
 
Alex Hunter, CEO Rushmore - Getting and keeping customers
Alex Hunter, CEO Rushmore - Getting and keeping customersAlex Hunter, CEO Rushmore - Getting and keeping customers
Alex Hunter, CEO Rushmore - Getting and keeping customers
 
Marco Cecconi, Software Developer @ Stack Exchange - The architecture of Stac...
Marco Cecconi, Software Developer @ Stack Exchange - The architecture of Stac...Marco Cecconi, Software Developer @ Stack Exchange - The architecture of Stac...
Marco Cecconi, Software Developer @ Stack Exchange - The architecture of Stac...
 
Sitar Teli, Managing Partner, Connect Ventures - Core Metrics: What Web and M...
Sitar Teli, Managing Partner, Connect Ventures - Core Metrics: What Web and M...Sitar Teli, Managing Partner, Connect Ventures - Core Metrics: What Web and M...
Sitar Teli, Managing Partner, Connect Ventures - Core Metrics: What Web and M...
 
Simon Stewart, Facebook engineer - Building Facebook for Android
Simon Stewart, Facebook engineer - Building Facebook for AndroidSimon Stewart, Facebook engineer - Building Facebook for Android
Simon Stewart, Facebook engineer - Building Facebook for Android
 
Startup Spotlight: Appticles 5 minutes pitchcles
Startup Spotlight: Appticles 5 minutes pitchclesStartup Spotlight: Appticles 5 minutes pitchcles
Startup Spotlight: Appticles 5 minutes pitchcles
 

Recently uploaded

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Roberto Mangiafico, CTO BadSeed Entertainment - Sleep Attach: A Technical Post-Mortem (How to Web Conference 2014 - Game Development Track)

  • 1. Sleep Attack TD The Technical Post Mortem Roberto Mangiafico
  • 2. Gameplay Programmer in Ubisoft Milan since 2007 In 2012 left Ubisoft and created Bad Seed with other colleagues About Me
  • 8. 3D Camera in 2D game: Why 1. Circles in perspective 2. 3D movement feeling
  • 9. 3D Camera in 2D game Gameplay camera
  • 10. 3D Camera in 2D game: Issue #1 Z fight problem Not good looking perspective on objects
  • 11. 3D Camera in 2D game: Issue #1 Solution: Every object is counter rotated towards the gameplay camera
  • 12. 3D Camera in 2D game: Issue #1
  • 13. 3D Camera in 2D game: Issue #2 Border artifact
  • 14. 3D Camera in 2D game: Issue #2 Rendering order: A B Draw B  Blend border transparence with background color  Write on the Z buffer Draw A  Find Z buffer with higher value  Can’t blend with the B object border
  • 15. Possible solution: High value of cut off on the shader Cons: Very aliased borders 3D Camera in 2D game: Issue #2
  • 16. Possible solutions: Setup the camera to use Z distance only for rendering order Cons: 1. Very hard to manage for 200+ object per scene 2. Prompt to error 3. Don’t work for moving objects 3D Camera in 2D game: Issue #2
  • 17.  Very high draw call number for mobile game  200+ object per level  Almost every object is animated 3D Camera in 2D game: Issue #3
  • 18. Possible Solution: Use Unity batching Cons: Objects must be static : No animation, No movement 3D Camera in 2D game: Issue #3
  • 19. The Mesh Merger  Create a big mesh with all the meshes vertices  Apply the transforms animations of objects  Keep the meshes UV’s  Order the meshes from top to bottom of the screen The solution we chose
  • 20. Every mesh: At scene loading register himself to its MeshMerger Mesh Merger at mesh registration: Store the vertices and the transform into a struct inside an array containing all the registered meshes info Mesh Merger – How it works
  • 21. Mesh Merger at mesh registration:  Disable the renderer of the registered mesh  Order the vertices from up to bottom Mesh Merger – How it works
  • 22. Every frame:  Apply the transformation to the vertices of the mesh  Order the vertices from up to bottom IF NEEDED Mesh Merger – How it works …
  • 23. Pro: 1. Resolve draw call issue 2. Resolve rendering order issues 3. Work with transform animated objects 4. Work with uv animated object Cons: 1. Script a bit heavy on the cpu 2. All the meshes registered into a mesh merger must have the same material Mesh Merger
  • 24.  No dynamic List<>  Optimized for quad Mesh Merger – Optimizations
  • 25. Before: Mesh Merger – Comparison After:
  • 26. Different screen ratio 16:9 – 4:3 – 1:1 – 3.2:19 Different resolutions and dpi Problems: • Adapt the HUD • Adapt the 3D view • Adapt the resolution for dpi Different screen types
  • 27. Adapt the HUD Different screen types: Issue #1 New Unity GUI system not yet available Created our own dynamic HUD system
  • 28. Dynamic HUD system • Dedicated camera • 3D panels • Position relative to screen
  • 29. Adapt the 3D view Different screen types: Issue #2 No need to change nothing for different ratio Simply we see more background elements
  • 30. Adapt for different resolutions For devices with high resolution we needed an hd version For almost everything we have a double version – SD and HD HD has twice the resolution of SD At the level load we load HD version if needed Different screen types: Issue #3
  • 31. Big memory load due to high number of textures with low compression and sounds Average 150MB for SD Level Average 300MB for HD Level 1. Load only needed sounds and textures 2. Mid loading level 3. Load everything at startup, nothing during gameplay 4. Load only needed resolution HD/SD Memory issues
  • 32. Q/A

Editor's Notes

  1. Unity: Multiplatform, used for previous projects, easy and deep
  2. Camera rotated 15 degrees Every object but the circles is rotated toward the main camera to solve the prospective deformation
  3. 3D World 2 Cameras One for ingame - one for UI Game camera 15 degrees rotation –
  4. Every object but the circles is rotated toward the main camera to solve the prospective deformation
  5. Every object but the circles is rotated toward the main camera to solve the prospective deformation
  6. Every object but the circles is rotated toward the main camera to solve the prospective deformation
  7. Border Artifact
  8. Using real camera distance problem can’t manage the rendering order as 2D view need due to frustum distance computation.
  9. Avoid border blending with background
  10. Rendering Order
  11. No for cicles
  12. Placed on a dedicated camera Use 3D panel placed near the camera – This means they are independent from the screen resolution Every panel keep the position relative to the screen and reading some settings adapt itself to the new screen ratio if needed
  13. We had to draw the background elements thinking to the wider ratio (16:9)