Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity 5  Game Optimization

You're reading from   Unity 5 Game Optimization Master performance optimization for Unity3D applications with tips and techniques that cover every aspect of the Unity3D Engine

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher Packt
ISBN-13 9781785884580
Length 296 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Chris Dickinson Chris Dickinson
Author Profile Icon Chris Dickinson
Chris Dickinson
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface

User experience is a critical component of any game. User experience includes not only our game's story and its gameplay, but also how smoothly the graphics run, how reliably it connects to multiplayer servers, how responsive it is to user input, and even how large the final application file size is due to the prevalence of app stores and cloud downloads. The barrier to entering game development has been lowered considerably thanks to the release of cheap, AAA-industry-level game development tools such as Unity. However, the features and quality of the final product that our players expect us to provide is increasing with every passing day. We should expect that every facet of our game can and will be scrutinized by players and critics alike.

The goals of performance optimization are deeply entwined with user experience. Poorly optimized games can result in low frame rates, freezes, crashes, input lag, long loading times, inconsistent and jittery runtime behavior, physics engine breakdowns, and even excessively high battery power consumption (particularly important in this era of mobile devices). Having just one of these issues can be a game developer's worst nightmare as reviews will tend to focus on the one thing that we did badly, in spite of all the things that we did well.

Performance is all about making the best use of the available resources, which includes the CPU resources such as CPU cycles and main memory space, Graphics Processing Unit (GPU) resources such as memory space (VRAM) and memory bandwidth, and so on. But optimization also means making sure that no single resource causes a bottleneck at an inappropriate time, and that the highest priority tasks get taken care of first. Even small, intermittent hiccups and sluggishness in performance can pull the player out of the experience, breaking immersion and limiting our potential to create the experience we intended.

It is also important to decide when to take a step back and stop making performance enhancements. In a world with infinite time and resources, there would always be another way to make it better, faster, or easier to maintain. There must be a point during development where we decide that the product has reached acceptable levels of quality. If not, we risk dooming ourselves to implementing further changes that result in little or no tangible benefit.

The best way to decide if a performance issue is worth fixing is to answer the question "will the user notice it?". If the answer to this questions is "no", then performance optimization would be a wasted effort. There is an old saying in software development:

Premature optimization is the root of all evil

Premature optimization is the cardinal sin of reworking and refactoring code to enhance performance without any proof that it is necessary. This could mean either making changes without showing that a performance problem even exists (answering the question of whether or not it would be noticeable to the user), or making changes because we only believe a performance issue might stem from a particular area before it has been proven to be true. Making these mistakes has cost software developers, as a collective whole, a depressing number of work hours for nothing.

This book intends to give us the tools, knowledge, and skills we need to both detect and fix performance issues in our application, no matter where they stem from. This could be hardware components such as the CPU, GPU, or RAM, within software subsystems such as Physics, Rendering, or within the Unity Engine itself. In addition, the more resources we save, the more we can do within the Unity Engine with the same hardware system, allowing us to generate more interesting and dynamic gameplay.

This will give our game a better chance of succeeding and standing out from the crowd in a marketplace that is inundated with new, high quality games every single day.

lock icon The rest of the chapter is locked
Next Section arrow right
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime