I don’t understand graphics optimization, can you guys help me?

800 views

I dont understand that some PC games like Witcher 3 or Hellblade Senua’s Sacrifice have awesome graphics and don’t too much pain for PCs but some old or meh graphics games make PC sounds like a plane and drops FPS (heating etc.). Everybody says because that games optimized very well but how and why all game devs do that? Can you guys help me?
Ps: I am not native so sorry for my English.

Thanks

In: Technology

3 Answers

Anonymous 0 Comments

It is all about algorithms. Algorithm is a sequence of actions needed to accomplish a task. A task can be accomplished in a lot of different ways. A game is just a huge algorithm – set of instructions for a computer to do. When it does them – you have your game, your moving pictures on the screen.

Suppose I’m in the kitchen I wanna make some fried eggs. One algorithm would be: Go to the shop – buy oil (butter). Come back. Put the pan on the fire. Wait for it to heat up. Put oil (butter) on the pan. Go to the shop – buy an egg (turn off the fire so it doesn’t burn while you’re gone). Come back. Wait for the pan to heat up. Crack an egg. Wait till it is cooked. Done.

You can see at least one **optimization** here – buy all the stuff in the shop at once. Otherwise you’re wasting a lot of time going there. And you’re heating the pan twice. Wasted time means the game will lag. For the game to be fast it needs to optimize for time as well as recources used (your memory, etc). For another extreme example see [Rube Goldberg machine](https://en.wikipedia.org/wiki/Rube_Goldberg_machine).

The algorithm for a computer to display a game for you is very complex. A lot of things need to be done. Game needs to process the buttons you click. It needs to calculate how much damage you deal. It needs to draw a picture you see on the screen (itself a very complicated task). It needs to do all of that and more 30-60 times per second.

With complex algorithm it’s not easy to figure out how to do it effeciently. You need to be clever and you need to have know-how. Compare frying some eggs with organizing a fancy dinner for 200 guests. You need to think about resources you have – people you hire (CPU – processing power), money to buy ingredients (computer memory), etc. For the fancy dinner it would be useful to know the paricular skills of people, who can do what best and where you can buy what at which price and then you can figure out a clever way to spend minimum time and money.

When the game is poorly optimized it usually means that game developers didn’t spend enought time on figuring out the best algorithms for everything. Could be because they were producing more content, remaking the game 10 times from scratch because ideas of what the game should be changed – there can be a lot of good reasons, actually. After all, optimizations isn’t the only work that needs to be done on the game.

You are viewing 1 out of 3 answers, click here to view all answers.