SlideShare a Scribd company logo
Game optimization
By Niraj Vishwakarma
ABout me
Niraj Vishwakarma
From Kolkata
Sr. Game Developer @ Games2Win Pvt. Ltd.
LinkedIn: https://in.linkedin.com/in/niraj-
vishwakarma
Email:
nirajv21@gmail.com
Intro
"Game optimization means improving the
game application so it runs at the
smooth framerate across a wide range
of hardware specs, including low-end
configurations.
In this discussion we will discuss
about some common Game optimization
techniques irrespective of what Game
engine you are using.
Why do we care about game optimization
Answer should be -
To serve the Users with better
gameplay experience and to avoid
user complaints like this
There are tons of devices out there
in market and it becomes
responsibility of the developer to
take care about every possible
hardware configs for maximum reach
and positive user experience.
What is happening under the hood
CPU processes the Player
inputs and doing
mathematical and physics
related tasks.
CPU send instructions to the
GPU to render or draw the
frame on the screen.
So the CPU and GPU working
together to bring the game
on the screen with optimal
frames per second (30 fps on
mobile and 60 fps or more on
gaming console).
CPU vs GPU
A CPU with 4 (6 or 10) Cores. A GPU with Thousands of Cores.
Different Game Optimization techniques
● Reduce and Combine Textures
● Use Occlusion Culling
● Batching Draw Calls
● Using LOD (Levels of Details)
● Lightmapping
● Tweaking Quality Settings
● Code Optimization
These techniques applicable and
common to all Game engines.
Reduce and combine
Texture
Low number of Textures will
put low pressure on GPU.
To use New Texture GPU has to change the Render State to load
New Texture before drawing them on screen.
Render Texture Change Request
Happening for each Separated
Textures which needs to drawn
on screen
Separate Images -
>
Solution : We can merge multiple seperated images into Single
Large image known as Sprite-Sheet.
Render Texture Change Request
Happening only once at start
and now it can extract the
required images from the
Loaded Texture
Single Merged
Image ->
Use Occlusion
Culling
Draw only what Camera can
see.
Occlusion Culling is a feature that disables drawing of objects when
they are not currently seen by the camera because they are obscured
(occluded) by other objects.
This way we can Avoid -
● Drawing Objects unnecessarily
● Loading Textures for Them
● Calculating effects of lights for them
● Calculating effect of shadows because of them
● etc.
In Game Engines we can create the Occlusion Data so when the game
runs on target platform it can detect what to render based on the
what camera sees.
Batching draw calls
Control on number of Draw
calls.
Draw Call:
Draw calls are simple plain command
from CPU to GPU to draw something
on Screen with Specific Set of Draw
properties(visual information).Like
Draw a Chair.
SET pass:
SetPass is the process of loading
material data like Textures, Normal
Maps and Shader properties. Like to
Draw the chair it needs to load the
Material data and Textures.
Before Batching
<-
After Batching
->
Using lods
(levels of detail)
Show Level of quality
depending on distance from
camera.
What is LOD:
LODS are basically different levels
of the same 3d model which we can
enable based on the distance from
the rendering camera.
When some objects are far from the
camera view there is no need to
draw that object in high detail as
it does not make sense. We can use
low quality version of the same
model to draw at that moment and as
the camera comes close we can
promote the quality higher level.
More Examples of LODs:
More Examples of LODs:
More Examples of LODs:
Lightmapping
Baking light to avoid
calculating lights in every
frame.
What is lightmapping:
Lightmapping is the process of pre-
calculating the brightness of
surfaces in the Scene. ...
Lightmaps allow you to add global
illumination, shadows, and ambient
lighting at a relatively low
computational cost.
Advantage of lightmaps:
As Lightmaps are precalculated the
GPU does not need to recalculate
effects of lights on the scene ever
frame and it can use the
Precalculated lightmaps for this
purpose which makes the over all
performance more smooth.
More examples of lightmaps:
More examples of lightmaps:
Tweaking Quality
Settings
Set quality based on the
Target device.
How to use Quality Settings:
Game engines provides quality settings that we can tweak to get best possible
results on the target device. Now for example -
For Mobile devices the quality should be Good, while for PC it can be Best and
for the Gaming consoles like Xbox and PS it can be set to Fantastic.
Code optimization
Writing clean code helps to
utilize the resources like
memory more efficiently.
Code optimization:
Few best practices for writing optimized and clean codes are:
- Use Game Design patterns
- Using best use Data structure to store and manipulate data
- Use data caching if they are going to be used frequently
- Object Pooling
- Perform physics related calculations at frequent intervals.
- Make use of Threads whenever possible.
At which stage we should start working on game
optimization ?
Right from the scratch :
- During 3d modeling
- During Texturing
- During UI Development
- During Environment creation
- During coding
Any Specific tools to detect what causing issue in
performance:
We can make use of Unity Profiler in Unity Game engine.
Thanks!
Contact me:
Niraj Vishwakarma
nirajv21@gmail.com
https://in.linkedin.com/in/niraj-
vishwakarma
Say Hi to me Anytime :)

More Related Content

What's hot

CS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMSCS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMS
Kathirvel Ayyaswamy
 
Unit 8
Unit 8Unit 8
Unit 8
anuragmbst
 
Frame buffer
Frame bufferFrame buffer
Frame buffer
Aparna Joshi
 
Video display devices
Video display devicesVideo display devices
Video display devices
shalinikarunakaran1
 
Processes and Processors in Distributed Systems
Processes and Processors in Distributed SystemsProcesses and Processors in Distributed Systems
Processes and Processors in Distributed Systems
Dr Sandeep Kumar Poonia
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
Ashish Kumar
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
Dr. C.V. Suresh Babu
 
Requirements prioritization
Requirements prioritizationRequirements prioritization
Requirements prioritization
Syed Zaid Irshad
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
usmankiyani1
 
Communication primitives
Communication primitivesCommunication primitives
Communication primitives
Student
 
Day 2 global_state_and_snapshot_algorithms
Day 2 global_state_and_snapshot_algorithmsDay 2 global_state_and_snapshot_algorithms
Day 2 global_state_and_snapshot_algorithms
VI Ni
 
Grid protocol architecture
Grid protocol architectureGrid protocol architecture
Grid protocol architecture
Pooja Dixit
 
Lect4 software economics
Lect4 software economicsLect4 software economics
Lect4 software economics
meena466141
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network security
babak danyal
 
Types of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed SystemTypes of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed System
DHIVYADEVAKI
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
Alagappa Govt Arts College, Karaikudi
 
File replication
File replicationFile replication
File replication
Klawal13
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
vikas dhakane
 
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Unity Technologies
 
Building blocks (Game Architecture)
Building blocks (Game Architecture)Building blocks (Game Architecture)
Building blocks (Game Architecture)
Rajkumar Pawar
 

What's hot (20)

CS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMSCS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMS
 
Unit 8
Unit 8Unit 8
Unit 8
 
Frame buffer
Frame bufferFrame buffer
Frame buffer
 
Video display devices
Video display devicesVideo display devices
Video display devices
 
Processes and Processors in Distributed Systems
Processes and Processors in Distributed SystemsProcesses and Processors in Distributed Systems
Processes and Processors in Distributed Systems
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
A* Algorithm
A* AlgorithmA* Algorithm
A* Algorithm
 
Requirements prioritization
Requirements prioritizationRequirements prioritization
Requirements prioritization
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
Communication primitives
Communication primitivesCommunication primitives
Communication primitives
 
Day 2 global_state_and_snapshot_algorithms
Day 2 global_state_and_snapshot_algorithmsDay 2 global_state_and_snapshot_algorithms
Day 2 global_state_and_snapshot_algorithms
 
Grid protocol architecture
Grid protocol architectureGrid protocol architecture
Grid protocol architecture
 
Lect4 software economics
Lect4 software economicsLect4 software economics
Lect4 software economics
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network security
 
Types of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed SystemTypes of Load distributing algorithm in Distributed System
Types of Load distributing algorithm in Distributed System
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
File replication
File replicationFile replication
File replication
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
 
Building blocks (Game Architecture)
Building blocks (Game Architecture)Building blocks (Game Architecture)
Building blocks (Game Architecture)
 

Similar to Game optimization techniques - Most Commons

Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
Shaan Alam
 
Graphics processing unit (GPU)
Graphics processing unit (GPU)Graphics processing unit (GPU)
Graphics processing unit (GPU)
Amal R
 
Getting The Most Out of VR | Sinjin Bain
Getting The Most Out of VR | Sinjin BainGetting The Most Out of VR | Sinjin Bain
Getting The Most Out of VR | Sinjin Bain
Jessica Tams
 
What Are the Essential Elements Of Your Gaming Computer
What Are the Essential Elements Of Your Gaming ComputerWhat Are the Essential Elements Of Your Gaming Computer
What Are the Essential Elements Of Your Gaming Computer
ShantnuSingh7
 
Console to PC VR: Lessons Learned from the Unspoken
Console to PC VR: Lessons Learned from the UnspokenConsole to PC VR: Lessons Learned from the Unspoken
Console to PC VR: Lessons Learned from the Unspoken
Robert Sprentall
 
hard ware compoenents used in Computer Graphics.pptx
hard ware compoenents used in Computer Graphics.pptxhard ware compoenents used in Computer Graphics.pptx
hard ware compoenents used in Computer Graphics.pptx
AaronAbraham36
 
Introduction to Computer graphics
Introduction to Computer graphicsIntroduction to Computer graphics
Introduction to Computer graphics
LOKESH KUMAR
 
Game engines and Their Influence in Game Design
Game engines and Their Influence in Game DesignGame engines and Their Influence in Game Design
Game engines and Their Influence in Game Design
Prashant Warrier
 
What is graphic card.docx
What is graphic card.docxWhat is graphic card.docx
What is graphic card.docx
Surendra Gusain
 
Getting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® GraphicsGetting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® Graphics
Intel® Software
 
Gpudigital lab for english partners
Gpudigital lab for english partnersGpudigital lab for english partners
Gpudigital lab for english partners
Oleg Gubanov
 
HTML5 Game Development frameworks overview
HTML5 Game Development frameworks overviewHTML5 Game Development frameworks overview
HTML5 Game Development frameworks overview
Abhishek Singhal [L.I.O.N]
 
Game Engine for Serious Games
Game Engine for Serious GamesGame Engine for Serious Games
Game Engine for Serious Games
Kashif Shamaun
 
Game Engine terminology
Game Engine terminologyGame Engine terminology
Game Engine terminology
SamDuxburyGDS
 
Computer graphics Applications and System Overview
Computer graphics Applications and System OverviewComputer graphics Applications and System Overview
Computer graphics Applications and System Overview
RAJARATNAS
 
Ancient world online
Ancient world online Ancient world online
Ancient world online
SeifElDeen3
 
Game Development with AndEngine
Game Development with AndEngineGame Development with AndEngine
Game Development with AndEngine
Daniela Da Cruz
 
Smedberg niklas bringing_aaa_graphics
Smedberg niklas bringing_aaa_graphicsSmedberg niklas bringing_aaa_graphics
Smedberg niklas bringing_aaa_graphics
changehee lee
 
Designing a pragmatic back-end service for mobile games
Designing a pragmatic back-end service for mobile gamesDesigning a pragmatic back-end service for mobile games
Designing a pragmatic back-end service for mobile games
iFunFactory Inc.
 
Builder pattern
Builder patternBuilder pattern
Builder pattern
Jyaasa Technologies
 

Similar to Game optimization techniques - Most Commons (20)

Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
 
Graphics processing unit (GPU)
Graphics processing unit (GPU)Graphics processing unit (GPU)
Graphics processing unit (GPU)
 
Getting The Most Out of VR | Sinjin Bain
Getting The Most Out of VR | Sinjin BainGetting The Most Out of VR | Sinjin Bain
Getting The Most Out of VR | Sinjin Bain
 
What Are the Essential Elements Of Your Gaming Computer
What Are the Essential Elements Of Your Gaming ComputerWhat Are the Essential Elements Of Your Gaming Computer
What Are the Essential Elements Of Your Gaming Computer
 
Console to PC VR: Lessons Learned from the Unspoken
Console to PC VR: Lessons Learned from the UnspokenConsole to PC VR: Lessons Learned from the Unspoken
Console to PC VR: Lessons Learned from the Unspoken
 
hard ware compoenents used in Computer Graphics.pptx
hard ware compoenents used in Computer Graphics.pptxhard ware compoenents used in Computer Graphics.pptx
hard ware compoenents used in Computer Graphics.pptx
 
Introduction to Computer graphics
Introduction to Computer graphicsIntroduction to Computer graphics
Introduction to Computer graphics
 
Game engines and Their Influence in Game Design
Game engines and Their Influence in Game DesignGame engines and Their Influence in Game Design
Game engines and Their Influence in Game Design
 
What is graphic card.docx
What is graphic card.docxWhat is graphic card.docx
What is graphic card.docx
 
Getting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® GraphicsGetting Space Pirate Trainer* to Perform on Intel® Graphics
Getting Space Pirate Trainer* to Perform on Intel® Graphics
 
Gpudigital lab for english partners
Gpudigital lab for english partnersGpudigital lab for english partners
Gpudigital lab for english partners
 
HTML5 Game Development frameworks overview
HTML5 Game Development frameworks overviewHTML5 Game Development frameworks overview
HTML5 Game Development frameworks overview
 
Game Engine for Serious Games
Game Engine for Serious GamesGame Engine for Serious Games
Game Engine for Serious Games
 
Game Engine terminology
Game Engine terminologyGame Engine terminology
Game Engine terminology
 
Computer graphics Applications and System Overview
Computer graphics Applications and System OverviewComputer graphics Applications and System Overview
Computer graphics Applications and System Overview
 
Ancient world online
Ancient world online Ancient world online
Ancient world online
 
Game Development with AndEngine
Game Development with AndEngineGame Development with AndEngine
Game Development with AndEngine
 
Smedberg niklas bringing_aaa_graphics
Smedberg niklas bringing_aaa_graphicsSmedberg niklas bringing_aaa_graphics
Smedberg niklas bringing_aaa_graphics
 
Designing a pragmatic back-end service for mobile games
Designing a pragmatic back-end service for mobile gamesDesigning a pragmatic back-end service for mobile games
Designing a pragmatic back-end service for mobile games
 
Builder pattern
Builder patternBuilder pattern
Builder pattern
 

Game optimization techniques - Most Commons

  • 2. ABout me Niraj Vishwakarma From Kolkata Sr. Game Developer @ Games2Win Pvt. Ltd. LinkedIn: https://in.linkedin.com/in/niraj- vishwakarma Email: nirajv21@gmail.com
  • 3. Intro "Game optimization means improving the game application so it runs at the smooth framerate across a wide range of hardware specs, including low-end configurations. In this discussion we will discuss about some common Game optimization techniques irrespective of what Game engine you are using.
  • 4. Why do we care about game optimization Answer should be - To serve the Users with better gameplay experience and to avoid user complaints like this There are tons of devices out there in market and it becomes responsibility of the developer to take care about every possible hardware configs for maximum reach and positive user experience.
  • 5. What is happening under the hood CPU processes the Player inputs and doing mathematical and physics related tasks. CPU send instructions to the GPU to render or draw the frame on the screen. So the CPU and GPU working together to bring the game on the screen with optimal frames per second (30 fps on mobile and 60 fps or more on gaming console).
  • 6. CPU vs GPU A CPU with 4 (6 or 10) Cores. A GPU with Thousands of Cores.
  • 7. Different Game Optimization techniques ● Reduce and Combine Textures ● Use Occlusion Culling ● Batching Draw Calls ● Using LOD (Levels of Details) ● Lightmapping ● Tweaking Quality Settings ● Code Optimization These techniques applicable and common to all Game engines.
  • 8. Reduce and combine Texture Low number of Textures will put low pressure on GPU.
  • 9. To use New Texture GPU has to change the Render State to load New Texture before drawing them on screen. Render Texture Change Request Happening for each Separated Textures which needs to drawn on screen Separate Images - >
  • 10. Solution : We can merge multiple seperated images into Single Large image known as Sprite-Sheet. Render Texture Change Request Happening only once at start and now it can extract the required images from the Loaded Texture Single Merged Image ->
  • 11. Use Occlusion Culling Draw only what Camera can see.
  • 12. Occlusion Culling is a feature that disables drawing of objects when they are not currently seen by the camera because they are obscured (occluded) by other objects. This way we can Avoid - ● Drawing Objects unnecessarily ● Loading Textures for Them ● Calculating effects of lights for them ● Calculating effect of shadows because of them ● etc.
  • 13. In Game Engines we can create the Occlusion Data so when the game runs on target platform it can detect what to render based on the what camera sees.
  • 14. Batching draw calls Control on number of Draw calls.
  • 15. Draw Call: Draw calls are simple plain command from CPU to GPU to draw something on Screen with Specific Set of Draw properties(visual information).Like Draw a Chair. SET pass: SetPass is the process of loading material data like Textures, Normal Maps and Shader properties. Like to Draw the chair it needs to load the Material data and Textures.
  • 17. Using lods (levels of detail) Show Level of quality depending on distance from camera.
  • 18. What is LOD: LODS are basically different levels of the same 3d model which we can enable based on the distance from the rendering camera. When some objects are far from the camera view there is no need to draw that object in high detail as it does not make sense. We can use low quality version of the same model to draw at that moment and as the camera comes close we can promote the quality higher level.
  • 22. Lightmapping Baking light to avoid calculating lights in every frame.
  • 23. What is lightmapping: Lightmapping is the process of pre- calculating the brightness of surfaces in the Scene. ... Lightmaps allow you to add global illumination, shadows, and ambient lighting at a relatively low computational cost.
  • 24. Advantage of lightmaps: As Lightmaps are precalculated the GPU does not need to recalculate effects of lights on the scene ever frame and it can use the Precalculated lightmaps for this purpose which makes the over all performance more smooth.
  • 25. More examples of lightmaps:
  • 26. More examples of lightmaps:
  • 27. Tweaking Quality Settings Set quality based on the Target device.
  • 28. How to use Quality Settings: Game engines provides quality settings that we can tweak to get best possible results on the target device. Now for example - For Mobile devices the quality should be Good, while for PC it can be Best and for the Gaming consoles like Xbox and PS it can be set to Fantastic.
  • 29. Code optimization Writing clean code helps to utilize the resources like memory more efficiently.
  • 30. Code optimization: Few best practices for writing optimized and clean codes are: - Use Game Design patterns - Using best use Data structure to store and manipulate data - Use data caching if they are going to be used frequently - Object Pooling - Perform physics related calculations at frequent intervals. - Make use of Threads whenever possible.
  • 31. At which stage we should start working on game optimization ? Right from the scratch : - During 3d modeling - During Texturing - During UI Development - During Environment creation - During coding
  • 32. Any Specific tools to detect what causing issue in performance: We can make use of Unity Profiler in Unity Game engine.