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

2.08K 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

Okay so optimization is all about making things run faster with less resources. And so the way it’s done in practice usually follows some steps

1. Run the code
2. While the code is running, a different program [called a profiler] measures things and keeps track of stuff (like how much CPU is being used, by this line of code or how much memory does this map need to be loaded).
3. After the code is finished running, all of those measures are combined into basically a list sorted by how intensive something is
4. Then as a programmer you look at that list, and you look at the things that are intensive and then you go into your bag of tricks to try and make it faster

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