Game Optimization Methodology
Set Your Performance Goals
- A stable FPS value of >=120 FPS for smooth experience on 120 Hz monitors
- Low input lag for precise targeting
- Good server-side performance for fair gameplay and scoring
- Flexible graphics options for maximum reach of people with different hardware
- Game performs well and provides a smooth experience when tested on configurations selected based on own ideas about target audience and hardware surveys
General Optimization Workflow
- Identify problematic scene.
- Check if the game is CPU- or GPU-bound on this scene.
- Identify main performance bottleneck.
- Drill down and determine root cause.
- Resolve issue.
- Check if the game now meets your performance goals.
- If it does, stop optimizing. If not, go to step 1.
How Intel Tools Can Help
- Intel® Graphics Performance AnalyzersA feature-rich set of tools that covers all graphics optimization and profiling needs.
Before You Begin
Identify Problematic Scene
- Looking at the floor/ground boosts FPS, looking elsewhere drops FPS to unsatisfactory levels.
- Looking at a specific tree or bush model drops FPS dramatically.
- Moving further away from that tree does not improve the situation.
- Activating a light source, such as a flashlight, reduces performance significantly.
- Game is slow for a minute after you enter a new location, then improves.
- Game is slow to load specific models and textures.
- Seemingly sporadic performance drops with no obvious explanation.
What is CPU- or GPU-bound
- Description:the main limiting factor is the ability of the CPU to timely execute instructions that are supposed to be executed on each frame. The CPU is overwhelmed with one or more heavy tasks, such as game logic, physics, hit detection, etc.
- Perception:in simplest form, this scenario is observed as combination of high CPU load and low GPU load.
- Description:the main limiting factor is the ability of the GPU to timely execute tasks that are supposed to be executed by the GPU on each frame, such as geometry transformation, shading, post processing, etc.
- Perception:in simplest form, this scenario is observed as combination of low CPU load and high GPU load.
Determine if Game is CPU- or GPU-bound
- CPU-bound:the logical processors are busy executing the application code most of the time, while the GPU is not loaded; for example, theGPU Busy (%)metric value is low.
- GPU-bound:GPU metrics related to GPU occupation are high (such asGPU Busy (%),EU Active (%)), while the CPU cores are mostly idle.
If Game is CPU-bound
- Annotate your CPU-side code with the ITT API to see tasks that take too long right in Trace Analyzer.
- Suboptimal game logic code. For example, the function responsible for mapping NPC positions to points on a map is implemented poorly, and each map refresh causes a slowdown of the entire game.
- A multi-threaded game does not use synchronization properly, and CPU threads are idle most of the time.
If Game is GPU-bound
Balance Fidelity and Performance
- The tree model is overly complex and has too many polygons. In this case, it might be best to simplify the model, sacrificing some visual quality for performance. It is highly likely that most players will not even notice the reduction in fidelity but will appreciate the performance increase.
- The LOD for this tree is not set up properly. In this case, it is best to ensure LOD is properly enabled. There is no sacrifice in visual fidelity here, since, by nature, LOD reduces the visual quality of the model with increasing distance to the viewer.
- Performance improvement requires a sacrifice in visual qualityIn this case, consider tweaking an object to see how the performance changes with changes to quality. If an unnoticeable reduction in quality results in a large performance improvement, it might be best to adopt the change.
- Performance improvement does not require a sacrifice in visual qualityIn this case, consider if your performance goals are met and if the implementation is difficult. Decide if the ratio of gain to implementation efforts is good enough and implement the fix based on this.