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

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

I think it is also important to mention that there are tools that can analyze code & running programs to tell you where it is spending most of its time. That’s helps identify places where can optimize the code. As an example, I had program that dealt with database records that had a date. And every time to display a record we needed a formatter to make the date look as desired. Using a profiling tool it showed doing that was actually the bulk of processing time used by the app. For each record it created a formatter object which turned out to be a very expensive operation. I fixed it by creating one at the beginning of the app and reusing it for each record. Made the program 90% faster. Optimized!

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