Published in: 06 JUN 2021
2:30 GMT
Optimization is the process of making games run:
- As fast as possible (FPS)
- Using minimum resources (Ram - CPU - GPU - Battery)
- Gameplay smoothness (minimum FPS maximum FPS and no performance spikes)
A well optimized game can run more enjoyably on same hardware than a bad optimized game, which means users really can feel the differences.
What is FPS?
Usually people use terms like FPS which means (Frames Per Second) to represent the speed a specific hardware can run a 2D 3D game.
Frame is 1 picture shown on the screen.
Frames per second are number of consecutive pictures shown on the screen in time delta of 1 second.
What FPS number effects in the game?
FPS effects the smoothness of movement in the visuals of the game and if it goes under 30 frames any person can notice the choppiness but fewer people can notice it when its above 60 frames per second, even fewer people can notice it when its above 100 FPS and those who do are usually professional gamers.
At the time of publishing this article even high - medium end mobile phones have 120hz screens which means they can display up to 120 FPS on mobile phones.
GPU = Graphics Processing Unit.
Ram = Random Access Memory.
CPU = Central Processing Unit.
GPU calculates graphics at real time and its linked to terms like rendering, texture filling rate and frames per second. the GPU is the most powerful resource in games as its a specialized processing hardware for graphics.
Example: if you see a house model in your scene, the GPU toke instructions from the 3D model calculated the triangles. lights, angles, shadows and textures. and gave instructions to each pixel to light accordingly, keep in mid that it does this 30 to 200+ times every second so GPUs do the heavy lifting of the game graphics.
CPU is usually what processes physics, AI and game logic as its computing power is much less than GPU's and it uses much less electricity, also its more general in performing tasks.
Example: if a player is playing a car game, and the player's car jumps in the air, the speed, distance of the jump, the wheel suspension state, drag on the car body and the reaction of the wheels and body on landing impact are all calculated by the CPU.
Ram is used to load resources like 3D models and textures needed to have a scene drawing available for GPU or some resources for the CPU to perform calculations.
Example: When a player is playing an open world game like WOW or PubG the houses, buildings, ground, textures and trees are loaded on to the ram whenever there is a load screen or in game real time loading, when the player is next to a dragon the dragon is loaded to the Ram or GPU Ram (vRam) so the dragon drawing instructions can be accessed quickly in each frame.
I must note that today the developers work harder to optimize their games and the games are closer to being well optimized especially compared to how they ware 10 years ago, you can blame this on lack of know how or some other technological limitations developers faced back then. today thankfully most games are at least fairly optimized and they contain a lot of setting that you can manipulate to suit your hardware with the best graphics possible. however this doesn't mean its all good and some studios still released badly optimized games where the optimization was one of its biggest setbacks.
Examples of badly optimized game are:
Command And Conquer Generals and the second iteration Generals Zero Hour - Sep 2003
Path-finding algorithms are the most important parts of the RTS strategy games where constant path updates are expected to be performed by players, however every time the user had huge units selected and moved, the game had issues and lags that made the game unplayable. now it could be because other functions or other codes are linked with path-finding action however this also is a fault in the path-finding as its supposed to be as smooth as possible to the player.
Sudden drops in frame rate during game play, of course this is a very annoying thing especially when you are playing competitive game against other players, It increased with the amount of units present in the scene at any given time, this shows that the reason could be because of the replay file is being accessed to record game play state.
The game became more laggy as the game session time increased even if the units created are dead "removed from the scene" the game performance was still was some how effected by its previously spawn objects. which made it unbelievably frustrating to have long gaming sessions.
the clear indication that this game was poorly optimized was that playing it on very modern hardware didn't eliminate its performance issues.
Need For Speed Undercover - Nov 2008
The main issue was its inconsistent frame rate as sometimes the game was super smooth and while the player is driving fast threw the map the frames dropped significantly, this was an indication that the resources are being loaded and this could have been avoided if the resources loading was more optimized.
The frame rates also dropped when there is a interactions with police or heavy police existence, which showed that the police AI was not very optimized.
Mobile games also have their fair share of lack of optimization and one of the examples include:
PubG mobile running on low settings - Jun 2018
the low graphics are not the issue its the load times of buildings and structures on the map that give me the frustration, landing inside a wall before the wall or house is loaded and then when it gets loaded while you're in its location, your character gets stuck, this is a bug that is caused by the lack of optimization. what makes this optimization bug specially frustrating is the open world and that you need to die first before you can start another game, this will probably be fixed in later versions of the game for sure.
Optimization is a continuous process throughout the software development life cycle, each component of the game must be optimized. this can only be achieved within the game development time schedule if the optimization is integrated from the start of the development.
Towards the end of the game development its only natural to focus more and more on the performance of the game as all the game components are built and integration is at its highest levels so the optimization process takes more time and focus from team members, the optimization process that was performed from the start of the development makes performance goals easier to reach at the end.
if the developers optimize the game from day one this allows them to have more resources available later in the project.
Before you continue reading please note that:
There Is No Optimize Now Button.
There Is No One Size Fits All Solution.
The Effectiveness Of Certain Techniques Change As Hardware Improves.
There Will Always Be One More Thing To Optimize.
Now that you have read the previous statements you must be wondering how do you start optimizing your game?
For Further Questions And Details Contact Me:
Email : Murad.dasi AT gmail.com