SlideShare a Scribd company logo
Minions Paradise™
Оптимизация мобильного
Unity приложения
Дмитрий Веденко, EA Saint Petersburg
Minions Paradise™
• Жанр: City-builder
• Много 3D анимаций
• Много статической
геометрии
• Unity 4.6
• Runtime DI
• Выпуск на iOS и Android
Performance Issues
• Регулярные подтормаживания на 100-150 миллисекунд
• Низкий FPS, например, 6-15 на Nexus 5
• Высокое потребление памяти
Lags and Freezes
Unity Profiler
GC занимает 101ms Кадр 170ms
GC вызывается каждые 30 кадров.
Garbage, Garbage, Garbage
Каждый кадр – более чем 25 Кб выделенной памяти
При 30 кадрах в секунду - более чем 750 Кб/сек
«Плохой» случай:
120 Кб/кадр
235ms!
Garbage, Garbage, Garbage
Implicit Allocations
• Runtime DI
– Очень много объектов
– Очень много ссылок
– System.Reflection
• Неявное выделение памяти в Unity
– Value type boxing
– Types marshalling
A nightmare for any GC!
The Cure
• Тщательно профилируем performance
critical код
– Используем value type где только возможно
– Избегаем boxing’а
– Избегаем reflection в динамике
– Переиспользуем коллекции и объекты
Результат:
• Общее улучшение производительности
• Анимации и движение камеры значительно плавнее
Not Good Enough
• CPU или GPU?
• Unity не позволяет профилировать GPU на
мобильных устройствах
Android GPU Profilers
• Работает далеко не со всеми
прошивками/устройствами
• Не самый популярный чип
• Широкий спектр возможностей
• Не требует root
Android GPU Profilers
• Все меньше и меньше новых
Android устройств
• Разделено на два приложения
Нужен ROOT
СPU or GPU?
Итак, упираемся ли мы в GPU?
Не совсем
The Cure
• Упрощение анимаций
• Упрощение геометрии
• Упрощение коллизий
• Во многом art driven, несмотря на «упор» в CPU
Результат:
• Повышение производительности до приемлемых
значений
• Ускорение загрузки
• Снижение нагрузки на память
Memory Footprint
Memory Usage
+ Хорошая оценка используемой памяти
+ Разделение управляемой и неупраляемой куч
- Смешаны RAM and VRAM
- Не совсем корректно работает с texture quality
- Результат не совсем отражает реальную ситуацию
452Mb
Memory Usage
735Mb!
• Основной потребитель - ассеты
• Очень большой managed heap: 110Mb
68.2Mb – свободно
Memory Breakdown
Texture Memory Usage
• Много неиспользуемых текстур
• Дубликаты
• Texture Quality не имеет эффекта
Unity Sprite Packer
• Sprite Packer не дружит с Asset Bundles,
в бандл попадут и атлас, и спрайт
• Не работает со спрайтами в ресурсах
• Серьезно замедляет старт Unity Editor
• Не имеет представления о структуре спрайтов
Texture Duplicates
• «Нестандартное» использование Asset Bundles
• Дубликаты возникают при перезагрузке Asset
Bundles
• Загруженный Asset Bundle – оверхед на Android
The Cure
• Раннее планирование структуры и иерархии
ресурсов
Sum Up
• Никогда не рано начинать оптимизацию
• Пользуйтесь профайлером в
профилактических целях
• «Очевидное» решение
не всегда верное
• Правильно подбирайте
и используйте технологии
Questions?
Contact me:
dvedenko@ea.com
Ad

More Related Content

Viewers also liked (20)

Unity Optimization Tips, Tricks and Tools
Unity Optimization Tips, Tricks and ToolsUnity Optimization Tips, Tricks and Tools
Unity Optimization Tips, Tricks and Tools
Intel® Software
 
Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)
Alexander Dolbilov
 
Practical Guide for Optimizing Unity on Mobiles
Practical Guide for Optimizing Unity on MobilesPractical Guide for Optimizing Unity on Mobiles
Practical Guide for Optimizing Unity on Mobiles
Valentin Simonov
 
Mobile Performance Tuning: Poor Man's Tips And Tricks
Mobile Performance Tuning: Poor Man's Tips And TricksMobile Performance Tuning: Poor Man's Tips And Tricks
Mobile Performance Tuning: Poor Man's Tips And Tricks
Valentin Simonov
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and Performance
DevGAMM Conference
 
Unity3D Tips and Tricks or "You are doing it wrong!"
Unity3D Tips and Tricks or "You are doing it wrong!"Unity3D Tips and Tricks or "You are doing it wrong!"
Unity3D Tips and Tricks or "You are doing it wrong!"
Taras Leskiv
 
Optimizing Large Scenes in Unity
Optimizing Large Scenes in UnityOptimizing Large Scenes in Unity
Optimizing Large Scenes in Unity
Noam Gat
 
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters AdventureHow we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
Felipe Lira
 
Unity - Internals: memory and performance
Unity - Internals: memory and performanceUnity - Internals: memory and performance
Unity - Internals: memory and performance
Codemotion
 
[Vietnam Mobile Day 2013] - Phát triển ứng dụng game đa nền tảng smart fox se...
[Vietnam Mobile Day 2013] - Phát triển ứng dụng game đa nền tảng smart fox se...[Vietnam Mobile Day 2013] - Phát triển ứng dụng game đa nền tảng smart fox se...
[Vietnam Mobile Day 2013] - Phát triển ứng dụng game đa nền tảng smart fox se...
AiTi Education
 
Тарас Леськів “Game Programming Patterns and Unity”
Тарас Леськів “Game Programming Patterns and Unity”Тарас Леськів “Game Programming Patterns and Unity”
Тарас Леськів “Game Programming Patterns and Unity”
Lviv Startup Club
 
Software Engineer- A unity 3d Game
Software Engineer- A unity 3d GameSoftware Engineer- A unity 3d Game
Software Engineer- A unity 3d Game
Isfand yar Khan
 
Getting Started with C/C# Game Development Part 1
Getting Started with C/C# Game Development Part 1Getting Started with C/C# Game Development Part 1
Getting Started with C/C# Game Development Part 1
CEGD
 
Introduction to wave engine
Introduction to wave engineIntroduction to wave engine
Introduction to wave engine
waveengineteam
 
Performance and Memory Management improvement applying Design Patterns at Unity.
Performance and Memory Management improvement applying Design Patterns at Unity.Performance and Memory Management improvement applying Design Patterns at Unity.
Performance and Memory Management improvement applying Design Patterns at Unity.
Lucy Gomez
 
Unity L01 - Game Development
Unity L01 - Game DevelopmentUnity L01 - Game Development
Unity L01 - Game Development
Mohammad Shaker
 
Developing VR in Unity
Developing VR in UnityDeveloping VR in Unity
Developing VR in Unity
Adityo Pratomo
 
Hands On with the Unity 5 Game Engine! - Andy Touch - Codemotion Roma 2015
Hands On with the Unity 5 Game Engine! - Andy Touch - Codemotion Roma 2015Hands On with the Unity 5 Game Engine! - Andy Touch - Codemotion Roma 2015
Hands On with the Unity 5 Game Engine! - Andy Touch - Codemotion Roma 2015
Codemotion
 
Unity vr jam_kelvin_1127
Unity vr jam_kelvin_1127Unity vr jam_kelvin_1127
Unity vr jam_kelvin_1127
Kelvin Lo
 
Unity - Game Engine
Unity - Game EngineUnity - Game Engine
Unity - Game Engine
Geeks Anonymes
 
Unity Optimization Tips, Tricks and Tools
Unity Optimization Tips, Tricks and ToolsUnity Optimization Tips, Tricks and Tools
Unity Optimization Tips, Tricks and Tools
Intel® Software
 
Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)
Alexander Dolbilov
 
Practical Guide for Optimizing Unity on Mobiles
Practical Guide for Optimizing Unity on MobilesPractical Guide for Optimizing Unity on Mobiles
Practical Guide for Optimizing Unity on Mobiles
Valentin Simonov
 
Mobile Performance Tuning: Poor Man's Tips And Tricks
Mobile Performance Tuning: Poor Man's Tips And TricksMobile Performance Tuning: Poor Man's Tips And Tricks
Mobile Performance Tuning: Poor Man's Tips And Tricks
Valentin Simonov
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and Performance
DevGAMM Conference
 
Unity3D Tips and Tricks or "You are doing it wrong!"
Unity3D Tips and Tricks or "You are doing it wrong!"Unity3D Tips and Tricks or "You are doing it wrong!"
Unity3D Tips and Tricks or "You are doing it wrong!"
Taras Leskiv
 
Optimizing Large Scenes in Unity
Optimizing Large Scenes in UnityOptimizing Large Scenes in Unity
Optimizing Large Scenes in Unity
Noam Gat
 
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters AdventureHow we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
Felipe Lira
 
Unity - Internals: memory and performance
Unity - Internals: memory and performanceUnity - Internals: memory and performance
Unity - Internals: memory and performance
Codemotion
 
[Vietnam Mobile Day 2013] - Phát triển ứng dụng game đa nền tảng smart fox se...
[Vietnam Mobile Day 2013] - Phát triển ứng dụng game đa nền tảng smart fox se...[Vietnam Mobile Day 2013] - Phát triển ứng dụng game đa nền tảng smart fox se...
[Vietnam Mobile Day 2013] - Phát triển ứng dụng game đa nền tảng smart fox se...
AiTi Education
 
Тарас Леськів “Game Programming Patterns and Unity”
Тарас Леськів “Game Programming Patterns and Unity”Тарас Леськів “Game Programming Patterns and Unity”
Тарас Леськів “Game Programming Patterns and Unity”
Lviv Startup Club
 
Software Engineer- A unity 3d Game
Software Engineer- A unity 3d GameSoftware Engineer- A unity 3d Game
Software Engineer- A unity 3d Game
Isfand yar Khan
 
Getting Started with C/C# Game Development Part 1
Getting Started with C/C# Game Development Part 1Getting Started with C/C# Game Development Part 1
Getting Started with C/C# Game Development Part 1
CEGD
 
Introduction to wave engine
Introduction to wave engineIntroduction to wave engine
Introduction to wave engine
waveengineteam
 
Performance and Memory Management improvement applying Design Patterns at Unity.
Performance and Memory Management improvement applying Design Patterns at Unity.Performance and Memory Management improvement applying Design Patterns at Unity.
Performance and Memory Management improvement applying Design Patterns at Unity.
Lucy Gomez
 
Unity L01 - Game Development
Unity L01 - Game DevelopmentUnity L01 - Game Development
Unity L01 - Game Development
Mohammad Shaker
 
Developing VR in Unity
Developing VR in UnityDeveloping VR in Unity
Developing VR in Unity
Adityo Pratomo
 
Hands On with the Unity 5 Game Engine! - Andy Touch - Codemotion Roma 2015
Hands On with the Unity 5 Game Engine! - Andy Touch - Codemotion Roma 2015Hands On with the Unity 5 Game Engine! - Andy Touch - Codemotion Roma 2015
Hands On with the Unity 5 Game Engine! - Andy Touch - Codemotion Roma 2015
Codemotion
 
Unity vr jam_kelvin_1127
Unity vr jam_kelvin_1127Unity vr jam_kelvin_1127
Unity vr jam_kelvin_1127
Kelvin Lo
 

Similar to EA: Optimization of mobile Unity application (20)

зомби ферма. как это сделано - Виктор и Андрей Кузьмины - Vizor interactive
зомби ферма. как это сделано - Виктор и Андрей Кузьмины - Vizor interactiveзомби ферма. как это сделано - Виктор и Андрей Кузьмины - Vizor interactive
зомби ферма. как это сделано - Виктор и Андрей Кузьмины - Vizor interactive
Sociality Rocks!
 
Denial, Anger, Bargaining, Depression, and Solution: Making an Open-World Gam...
Denial, Anger, Bargaining, Depression, and Solution: Making an Open-World Gam...Denial, Anger, Bargaining, Depression, and Solution: Making an Open-World Gam...
Denial, Anger, Bargaining, Depression, and Solution: Making an Open-World Gam...
DevGAMM Conference
 
Vizor Interactive: Технологии успеха
Vizor Interactive: Технологии успехаVizor Interactive: Технологии успеха
Vizor Interactive: Технологии успеха
DevGAMM Conference
 
2.5D игры и особенности разработки многопользовательских игр (Глеб Полушкин)
2.5D игры и особенности разработки многопользовательских игр (Глеб Полушкин)2.5D игры и особенности разработки многопользовательских игр (Глеб Полушкин)
2.5D игры и особенности разработки многопользовательских игр (Глеб Полушкин)
Ontico
 
Wargaming.net: Архитектура современных 3D движков
Wargaming.net: Архитектура современных 3D движковWargaming.net: Архитектура современных 3D движков
Wargaming.net: Архитектура современных 3D движков
DevGAMM Conference
 
«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...
«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...
«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...
it-people
 
Оптимизация производительности фронтенда / Игорь Алексеенко (HTML Academy)
Оптимизация производительности фронтенда / Игорь Алексеенко (HTML Academy)Оптимизация производительности фронтенда / Игорь Алексеенко (HTML Academy)
Оптимизация производительности фронтенда / Игорь Алексеенко (HTML Academy)
Ontico
 
Kirill Zolovkin, OctoBox Interactive
Kirill Zolovkin, OctoBox InteractiveKirill Zolovkin, OctoBox Interactive
Kirill Zolovkin, OctoBox Interactive
White Nights Conference
 
Rocket Jump: Рецепты игровой графики Rocket Jump
 Rocket Jump: Рецепты игровой графики Rocket Jump Rocket Jump: Рецепты игровой графики Rocket Jump
Rocket Jump: Рецепты игровой графики Rocket Jump
DevGAMM Conference
 
2.5D игры и особенности разработки многопользовательских игр
2.5D игры и особенности разработки многопользовательских игр2.5D игры и особенности разработки многопользовательских игр
2.5D игры и особенности разработки многопользовательских игр
Gleb Polushkin
 
Опыт эксплуатации большого проекта на Ruby
Опыт эксплуатации большого проекта на RubyОпыт эксплуатации большого проекта на Ruby
Опыт эксплуатации большого проекта на Ruby
Alex Chistyakov
 
Многопоточность в играх. Игорь Лобанчиков. CoreHard Spring 2019
Многопоточность в играх. Игорь Лобанчиков. CoreHard Spring 2019Многопоточность в играх. Игорь Лобанчиков. CoreHard Spring 2019
Многопоточность в играх. Игорь Лобанчиков. CoreHard Spring 2019
corehard_by
 
Creating graphics for mobile FPS Guns of Boom. Problems and Solutions
Creating graphics for mobile FPS Guns of Boom. Problems and SolutionsCreating graphics for mobile FPS Guns of Boom. Problems and Solutions
Creating graphics for mobile FPS Guns of Boom. Problems and Solutions
DevGAMM Conference
 
King's Bounty 2: Tools and tech for open world game
King's Bounty 2: Tools and tech for open world gameKing's Bounty 2: Tools and tech for open world game
King's Bounty 2: Tools and tech for open world game
DevGAMM Conference
 
Artisto: опыт запуска нейросетей в production / Эдуард Тянтов (Mail.ru Group)
Artisto: опыт запуска нейросетей в production / Эдуард Тянтов (Mail.ru Group)Artisto: опыт запуска нейросетей в production / Эдуард Тянтов (Mail.ru Group)
Artisto: опыт запуска нейросетей в production / Эдуард Тянтов (Mail.ru Group)
Ontico
 
Artisto App, Highload 2016
Artisto App, Highload 2016Artisto App, Highload 2016
Artisto App, Highload 2016
Eduard Tyantov
 
Эксплуатация container-based-инфраструктур / Николай Сивко (okmeter.io)
Эксплуатация container-based-инфраструктур / Николай Сивко (okmeter.io)Эксплуатация container-based-инфраструктур / Николай Сивко (okmeter.io)
Эксплуатация container-based-инфраструктур / Николай Сивко (okmeter.io)
Ontico
 
C++ для встраиваемых систем
C++ для встраиваемых системC++ для встраиваемых систем
C++ для встраиваемых систем
Kirill Tikhonov
 
Сергей Парамонов — Что наша жизнь — игра!
Сергей Парамонов — Что наша жизнь — игра!Сергей Парамонов — Что наша жизнь — игра!
Сергей Парамонов — Что наша жизнь — игра!
Daria Oreshkina
 
Там, где Rails не справляются
Там, где Rails не справляютсяТам, где Rails не справляются
Там, где Rails не справляются
Max Lapshin
 
зомби ферма. как это сделано - Виктор и Андрей Кузьмины - Vizor interactive
зомби ферма. как это сделано - Виктор и Андрей Кузьмины - Vizor interactiveзомби ферма. как это сделано - Виктор и Андрей Кузьмины - Vizor interactive
зомби ферма. как это сделано - Виктор и Андрей Кузьмины - Vizor interactive
Sociality Rocks!
 
Denial, Anger, Bargaining, Depression, and Solution: Making an Open-World Gam...
Denial, Anger, Bargaining, Depression, and Solution: Making an Open-World Gam...Denial, Anger, Bargaining, Depression, and Solution: Making an Open-World Gam...
Denial, Anger, Bargaining, Depression, and Solution: Making an Open-World Gam...
DevGAMM Conference
 
Vizor Interactive: Технологии успеха
Vizor Interactive: Технологии успехаVizor Interactive: Технологии успеха
Vizor Interactive: Технологии успеха
DevGAMM Conference
 
2.5D игры и особенности разработки многопользовательских игр (Глеб Полушкин)
2.5D игры и особенности разработки многопользовательских игр (Глеб Полушкин)2.5D игры и особенности разработки многопользовательских игр (Глеб Полушкин)
2.5D игры и особенности разработки многопользовательских игр (Глеб Полушкин)
Ontico
 
Wargaming.net: Архитектура современных 3D движков
Wargaming.net: Архитектура современных 3D движковWargaming.net: Архитектура современных 3D движков
Wargaming.net: Архитектура современных 3D движков
DevGAMM Conference
 
«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...
«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...
«Кошелек или деньги: сложный выбор между памятью и процессором» Алексеенко Иг...
it-people
 
Оптимизация производительности фронтенда / Игорь Алексеенко (HTML Academy)
Оптимизация производительности фронтенда / Игорь Алексеенко (HTML Academy)Оптимизация производительности фронтенда / Игорь Алексеенко (HTML Academy)
Оптимизация производительности фронтенда / Игорь Алексеенко (HTML Academy)
Ontico
 
Rocket Jump: Рецепты игровой графики Rocket Jump
 Rocket Jump: Рецепты игровой графики Rocket Jump Rocket Jump: Рецепты игровой графики Rocket Jump
Rocket Jump: Рецепты игровой графики Rocket Jump
DevGAMM Conference
 
2.5D игры и особенности разработки многопользовательских игр
2.5D игры и особенности разработки многопользовательских игр2.5D игры и особенности разработки многопользовательских игр
2.5D игры и особенности разработки многопользовательских игр
Gleb Polushkin
 
Опыт эксплуатации большого проекта на Ruby
Опыт эксплуатации большого проекта на RubyОпыт эксплуатации большого проекта на Ruby
Опыт эксплуатации большого проекта на Ruby
Alex Chistyakov
 
Многопоточность в играх. Игорь Лобанчиков. CoreHard Spring 2019
Многопоточность в играх. Игорь Лобанчиков. CoreHard Spring 2019Многопоточность в играх. Игорь Лобанчиков. CoreHard Spring 2019
Многопоточность в играх. Игорь Лобанчиков. CoreHard Spring 2019
corehard_by
 
Creating graphics for mobile FPS Guns of Boom. Problems and Solutions
Creating graphics for mobile FPS Guns of Boom. Problems and SolutionsCreating graphics for mobile FPS Guns of Boom. Problems and Solutions
Creating graphics for mobile FPS Guns of Boom. Problems and Solutions
DevGAMM Conference
 
King's Bounty 2: Tools and tech for open world game
King's Bounty 2: Tools and tech for open world gameKing's Bounty 2: Tools and tech for open world game
King's Bounty 2: Tools and tech for open world game
DevGAMM Conference
 
Artisto: опыт запуска нейросетей в production / Эдуард Тянтов (Mail.ru Group)
Artisto: опыт запуска нейросетей в production / Эдуард Тянтов (Mail.ru Group)Artisto: опыт запуска нейросетей в production / Эдуард Тянтов (Mail.ru Group)
Artisto: опыт запуска нейросетей в production / Эдуард Тянтов (Mail.ru Group)
Ontico
 
Artisto App, Highload 2016
Artisto App, Highload 2016Artisto App, Highload 2016
Artisto App, Highload 2016
Eduard Tyantov
 
Эксплуатация container-based-инфраструктур / Николай Сивко (okmeter.io)
Эксплуатация container-based-инфраструктур / Николай Сивко (okmeter.io)Эксплуатация container-based-инфраструктур / Николай Сивко (okmeter.io)
Эксплуатация container-based-инфраструктур / Николай Сивко (okmeter.io)
Ontico
 
C++ для встраиваемых систем
C++ для встраиваемых системC++ для встраиваемых систем
C++ для встраиваемых систем
Kirill Tikhonov
 
Сергей Парамонов — Что наша жизнь — игра!
Сергей Парамонов — Что наша жизнь — игра!Сергей Парамонов — Что наша жизнь — игра!
Сергей Парамонов — Что наша жизнь — игра!
Daria Oreshkina
 
Там, где Rails не справляются
Там, где Rails не справляютсяТам, где Rails не справляются
Там, где Rails не справляются
Max Lapshin
 
Ad

More from DevGAMM Conference (20)

The art of small steps, or how to make sound for games in conditions of war /...
The art of small steps, or how to make sound for games in conditions of war /...The art of small steps, or how to make sound for games in conditions of war /...
The art of small steps, or how to make sound for games in conditions of war /...
DevGAMM Conference
 
Breaking up with FMOD - Why we ended things and embraced Metasounds / Daniel ...
Breaking up with FMOD - Why we ended things and embraced Metasounds / Daniel ...Breaking up with FMOD - Why we ended things and embraced Metasounds / Daniel ...
Breaking up with FMOD - Why we ended things and embraced Metasounds / Daniel ...
DevGAMM Conference
 
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
DevGAMM Conference
 
Why indie developers should consider hyper-casual right now / Igor Gurenyov (...
Why indie developers should consider hyper-casual right now / Igor Gurenyov (...Why indie developers should consider hyper-casual right now / Igor Gurenyov (...
Why indie developers should consider hyper-casual right now / Igor Gurenyov (...
DevGAMM Conference
 
AI / ML for Indies / Tyler Coleman (Retora Games)
AI / ML for Indies / Tyler Coleman (Retora Games)AI / ML for Indies / Tyler Coleman (Retora Games)
AI / ML for Indies / Tyler Coleman (Retora Games)
DevGAMM Conference
 
Agility is the Key: Power Up Your GameDev Project Management with Agile Pract...
Agility is the Key: Power Up Your GameDev Project Management with Agile Pract...Agility is the Key: Power Up Your GameDev Project Management with Agile Pract...
Agility is the Key: Power Up Your GameDev Project Management with Agile Pract...
DevGAMM Conference
 
New PR Tech and AI Tools for 2023: A Game Changer for Outreach / Kirill Perev...
New PR Tech and AI Tools for 2023: A Game Changer for Outreach / Kirill Perev...New PR Tech and AI Tools for 2023: A Game Changer for Outreach / Kirill Perev...
New PR Tech and AI Tools for 2023: A Game Changer for Outreach / Kirill Perev...
DevGAMM Conference
 
Playable Ads - Revolutionizing mobile games advertising / Jakub Kukuryk (Popc...
Playable Ads - Revolutionizing mobile games advertising / Jakub Kukuryk (Popc...Playable Ads - Revolutionizing mobile games advertising / Jakub Kukuryk (Popc...
Playable Ads - Revolutionizing mobile games advertising / Jakub Kukuryk (Popc...
DevGAMM Conference
 
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
DevGAMM Conference
 
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
DevGAMM Conference
 
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
DevGAMM Conference
 
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
DevGAMM Conference
 
How to increase wishlists & game sales from China? Growth marketing tactics &...
How to increase wishlists & game sales from China? Growth marketing tactics &...How to increase wishlists & game sales from China? Growth marketing tactics &...
How to increase wishlists & game sales from China? Growth marketing tactics &...
DevGAMM Conference
 
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
DevGAMM Conference
 
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
DevGAMM Conference
 
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
DevGAMM Conference
 
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
DevGAMM Conference
 
Branded Content: How to overcome players' immunity to advertising / Alex Brod...
Branded Content: How to overcome players' immunity to advertising / Alex Brod...Branded Content: How to overcome players' immunity to advertising / Alex Brod...
Branded Content: How to overcome players' immunity to advertising / Alex Brod...
DevGAMM Conference
 
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
DevGAMM Conference
 
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
DevGAMM Conference
 
The art of small steps, or how to make sound for games in conditions of war /...
The art of small steps, or how to make sound for games in conditions of war /...The art of small steps, or how to make sound for games in conditions of war /...
The art of small steps, or how to make sound for games in conditions of war /...
DevGAMM Conference
 
Breaking up with FMOD - Why we ended things and embraced Metasounds / Daniel ...
Breaking up with FMOD - Why we ended things and embraced Metasounds / Daniel ...Breaking up with FMOD - Why we ended things and embraced Metasounds / Daniel ...
Breaking up with FMOD - Why we ended things and embraced Metasounds / Daniel ...
DevGAMM Conference
 
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
DevGAMM Conference
 
Why indie developers should consider hyper-casual right now / Igor Gurenyov (...
Why indie developers should consider hyper-casual right now / Igor Gurenyov (...Why indie developers should consider hyper-casual right now / Igor Gurenyov (...
Why indie developers should consider hyper-casual right now / Igor Gurenyov (...
DevGAMM Conference
 
AI / ML for Indies / Tyler Coleman (Retora Games)
AI / ML for Indies / Tyler Coleman (Retora Games)AI / ML for Indies / Tyler Coleman (Retora Games)
AI / ML for Indies / Tyler Coleman (Retora Games)
DevGAMM Conference
 
Agility is the Key: Power Up Your GameDev Project Management with Agile Pract...
Agility is the Key: Power Up Your GameDev Project Management with Agile Pract...Agility is the Key: Power Up Your GameDev Project Management with Agile Pract...
Agility is the Key: Power Up Your GameDev Project Management with Agile Pract...
DevGAMM Conference
 
New PR Tech and AI Tools for 2023: A Game Changer for Outreach / Kirill Perev...
New PR Tech and AI Tools for 2023: A Game Changer for Outreach / Kirill Perev...New PR Tech and AI Tools for 2023: A Game Changer for Outreach / Kirill Perev...
New PR Tech and AI Tools for 2023: A Game Changer for Outreach / Kirill Perev...
DevGAMM Conference
 
Playable Ads - Revolutionizing mobile games advertising / Jakub Kukuryk (Popc...
Playable Ads - Revolutionizing mobile games advertising / Jakub Kukuryk (Popc...Playable Ads - Revolutionizing mobile games advertising / Jakub Kukuryk (Popc...
Playable Ads - Revolutionizing mobile games advertising / Jakub Kukuryk (Popc...
DevGAMM Conference
 
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
Creative Collaboration: Managing an Art Team / Nastassia Radzivonava (Glera G...
DevGAMM Conference
 
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
From Local to Global: Unleashing the Power of Payments / Jan Kuhlmannn (Xsolla)
DevGAMM Conference
 
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
Strategies and case studies to grow LTV in 2023 / Julia Iljuk (Balancy)
DevGAMM Conference
 
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
Why is ASO not working in 2023 and how to change it? / Olena Vedmedenko (Keya...
DevGAMM Conference
 
How to increase wishlists & game sales from China? Growth marketing tactics &...
How to increase wishlists & game sales from China? Growth marketing tactics &...How to increase wishlists & game sales from China? Growth marketing tactics &...
How to increase wishlists & game sales from China? Growth marketing tactics &...
DevGAMM Conference
 
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
Turkish Gaming Industry and HR Insights / Mustafa Mert EFE (Zindhu)
DevGAMM Conference
 
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
Building an Awesome Creative Team from Scratch, Capable of Scaling Up / Sasha...
DevGAMM Conference
 
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
Seven Reasons Why Your LiveOps Is Not Performing / Alexander Devyaterikov (Be...
DevGAMM Conference
 
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
The Power of Game and Music Collaborations: Reaching and Engaging the Masses ...
DevGAMM Conference
 
Branded Content: How to overcome players' immunity to advertising / Alex Brod...
Branded Content: How to overcome players' immunity to advertising / Alex Brod...Branded Content: How to overcome players' immunity to advertising / Alex Brod...
Branded Content: How to overcome players' immunity to advertising / Alex Brod...
DevGAMM Conference
 
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
Resurrecting Chasm: The Rift - A Source-less Remastering Journey / Gennadii P...
DevGAMM Conference
 
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
How NOT to do showcase events: Behind the scenes of Midnight Show / Andrew Ko...
DevGAMM Conference
 
Ad

EA: Optimization of mobile Unity application

  • 1. Minions Paradise™ Оптимизация мобильного Unity приложения Дмитрий Веденко, EA Saint Petersburg
  • 2. Minions Paradise™ • Жанр: City-builder • Много 3D анимаций • Много статической геометрии • Unity 4.6 • Runtime DI • Выпуск на iOS и Android
  • 3. Performance Issues • Регулярные подтормаживания на 100-150 миллисекунд • Низкий FPS, например, 6-15 на Nexus 5 • Высокое потребление памяти
  • 5. Unity Profiler GC занимает 101ms Кадр 170ms GC вызывается каждые 30 кадров.
  • 6. Garbage, Garbage, Garbage Каждый кадр – более чем 25 Кб выделенной памяти При 30 кадрах в секунду - более чем 750 Кб/сек «Плохой» случай: 120 Кб/кадр 235ms!
  • 8. Implicit Allocations • Runtime DI – Очень много объектов – Очень много ссылок – System.Reflection • Неявное выделение памяти в Unity – Value type boxing – Types marshalling A nightmare for any GC!
  • 9. The Cure • Тщательно профилируем performance critical код – Используем value type где только возможно – Избегаем boxing’а – Избегаем reflection в динамике – Переиспользуем коллекции и объекты Результат: • Общее улучшение производительности • Анимации и движение камеры значительно плавнее
  • 10. Not Good Enough • CPU или GPU? • Unity не позволяет профилировать GPU на мобильных устройствах
  • 11. Android GPU Profilers • Работает далеко не со всеми прошивками/устройствами • Не самый популярный чип • Широкий спектр возможностей • Не требует root
  • 12. Android GPU Profilers • Все меньше и меньше новых Android устройств • Разделено на два приложения Нужен ROOT
  • 13. СPU or GPU? Итак, упираемся ли мы в GPU? Не совсем
  • 14. The Cure • Упрощение анимаций • Упрощение геометрии • Упрощение коллизий • Во многом art driven, несмотря на «упор» в CPU Результат: • Повышение производительности до приемлемых значений • Ускорение загрузки • Снижение нагрузки на память
  • 16. Memory Usage + Хорошая оценка используемой памяти + Разделение управляемой и неупраляемой куч - Смешаны RAM and VRAM - Не совсем корректно работает с texture quality - Результат не совсем отражает реальную ситуацию 452Mb
  • 18. • Основной потребитель - ассеты • Очень большой managed heap: 110Mb 68.2Mb – свободно Memory Breakdown
  • 19. Texture Memory Usage • Много неиспользуемых текстур • Дубликаты • Texture Quality не имеет эффекта
  • 20. Unity Sprite Packer • Sprite Packer не дружит с Asset Bundles, в бандл попадут и атлас, и спрайт • Не работает со спрайтами в ресурсах • Серьезно замедляет старт Unity Editor • Не имеет представления о структуре спрайтов
  • 21. Texture Duplicates • «Нестандартное» использование Asset Bundles • Дубликаты возникают при перезагрузке Asset Bundles • Загруженный Asset Bundle – оверхед на Android
  • 22. The Cure • Раннее планирование структуры и иерархии ресурсов
  • 23. Sum Up • Никогда не рано начинать оптимизацию • Пользуйтесь профайлером в профилактических целях • «Очевидное» решение не всегда верное • Правильно подбирайте и используйте технологии

Editor's Notes

  • #8: 750 * 60 * 5 ~ 220 Mb
  • #12: + Intel GPA
  • #13: Streamline + Graphics Debugger
  翻译: