3. Basic Optimization (Why)
• Game Programming is not just about core mechanic
implementation
• Editor != Devices
• Platform X != PlatformY != Platform Z
• You are a Merchant!
• Nice!
4. Basic Optimization (When)
• Depends on the scale of your game
• On creation (Based on knowledge and experience)
• On polishing (Based on bugs and issues)
• Mobile > Web > PC
6. Basic Optimization (How)
• Know the limitation of the Game Engine and platforms
on which the game would be ported
• Game Designer (Angel vs Devil)
• Patience
7. Basic Optimization (Preliminary)
• Draw call :A call to function of the underlying API (e.g Open GLS
ES) to draw something on the screen
• Fragment :A candidate pixel which may or may not end up on
screen for different reason
• Batching :To group similar draw calls in one call operating the whole
data set
• Mobile vs non Mobile Rendering Path : deferred rendering vs
Immediate
8. Basic Optimization (Tech.)
• Don’t use too much collider when you work for mobile games
• Object Pooler is King (But better know its weakness)
• GameObject.Find(‘’’’) is disaster
• Code Caching
• Baking
• Batching (Static and Dynamic)
• Culling (Frustum, Occlusion)
• Understand the Rendering Path
• Texture Atlas
• Always enable ‘Optimized Mesh’ option in Mesh import settings, always enable ‘Optimized Mesh Data’ option in Player Settings (Mostly
for 3D Projects)
• Optimize your code (Related to Unity functions or not)
9. Basic Optimization (Tech.)
• CPU Bound
• GPU Bound
• Bandwidth Bound
• Vertices Count
• Use Milliseconds (not FPS)
• Unity Profiler (Free in Unity 5.x)
• Use platform-specific tools
• Adreno Profiler (Qualcomm,Adreno)
• PerfHUD ES (nVidia,Tegra)
• PVRTune, PVRTrace (Imagination tec, PowerVR)
• Mali Graphics Debugger (ARM, Mali)
10. Basic Optimization (Tech.)
• Opaque vsTransparent Image
• Texture Compressions
• Audio Optimization
• Short Clips – Native
• Longer (or looping) clips – Compressed in memory
• Music – Stream from disc
• Files which consistently cause CPU spikes – Decompress on load
• Check if everything work properly :D
• And many more…
11. • Beware of Nesting Prefabs
• Gizmos Icon
• Drag and drop multiple items with locked
Inspector
• Understand Unity Execution Orders
• Unity Remotes
• Unity Documentation
Unity Tips & Tricks
• Configure your Monodevelop
• Use your own Layouts
• Do not stress with Play Mode
• Debug Mode Inspector
• Paste ComponentValues
• Paste Multiple ComponentValues
• Use Attributes