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

803 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

There are smart ways of doing things, and silly ways of doing things. Same applies to coding.

Smart takes effort, money, skill and time so sometimes shortcuts were taken or cheats were used to take advantage of a feature that was fast on a particular popular graphics card or processor that was around at the time.

Rather than try to make the game work in a way that would work the same on all PCs, all cards, in all combinations, some programmers just throw code at the problem until it works, and then ship the game.

And the way that we do things changes over time. Just in OpenGL, we’ve gone from having to use immediate mode, to display lists, to vertex lists, to shaders, to compute shaders, etc. Modern cards aren’t optimised for immediate mode and just “emulate” it, in essence.

It’s like making a car. You can make a car that everyone can drive, that can drive on every road, that’s fast and economical. Or you can just throw out something that you have to squeeze into, that large people can’t drive, that only works on side-streets and can’t go on the motorway, or burns so much fuel that it’s impractical but gets you where you want to go.

There is no one “way” of coding. There’s an ideal, which changes over time, and there are myriad ways to get there. Coding is far more akin to writing a book, or an instruction manual. If you wanted to write a book about how something worked, there are MILLIONS of different ways to write that book… but some people will write books that are easier to understand, some will write books that are more accurate, some will write books that don’t even describe reality, some will write horrendously so you can barely understand them even if you’re correct, and some might even write the book in Chinese which might be perfect for some people, and terrible for others to read.

Games are millions upon millions of lines of code, often running on dozens of platforms, with sometimes millions of potential hardware combinations (e.g. CPU, RAM, graphics card, motherboard bus speed, etc.). A good, well-optimised game will work the best it can for everyone. But a game that’s badly coded, rushed, or done on a small budget will more likely only work on a handful of combinations with any decent speed because it will assumptions about the kind of hardware it’s running on.

This is also why console ports are often terrible – they were written by one team who were told “This will only ever run on Playstation 4”, so they heavily optimise everything from the screen size to the number of things in memory to the speed which they pull stuff from the disk or Internet to those assumptions. Then a year later some other poor sod gets nowhere near the same amount of time or budget but is told “Make this work for every PC”.

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