How does game “optimization” work? Are people sitting there changing lines of code to more “optimal” ones? What is “optimized”?

2.13K views

The recent The Last of Us for PC made me realize I had no idea what’s meant by “optimizing” a game.

Same with optifine in Minecraft improving performance. How do these things work to just make games use fewer resources?

In: 158

105 Answers

Anonymous 0 Comments

the larger the code for something gets, the potential for unintended interactions increases exponentially. sometimes optimizing means to remove those unintended interactions, but sometimes you find ones that help and you then try to implement (“it’s not a bug, it’s a feature” type of thing). sometimes those unintended things are quirks of the language they are using, or for consoles if there is specific hardware the developers learn how to exploit as they gain experience. an example, in C++ the operation “i++” takes 2 or 3 processor cycles more than “++i”. a small amount to improve, but if you need i to count to a million, that’s 2-3 million processor cycles saved.

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