In regards to gaming, what is “optimization”?

308 views

If consoles are just glorified PCs now, how is it that a game designed for PS5 or X-Box Series X alone better than one that is designed to be cross platform?

In: 19

14 Answers

Anonymous 0 Comments

Games need to do a few things very quickly:

* Determine where the player is
* Fetch the world state from the network, if required
* Determine if any physics objects or other objects have been impacted
* Determine if any AI behaviors or game code needs to run
* Load and play sounds
* Load and draw textures and models

Years ago you had the game running all of this in a simple loop. In the age of multi core processors, you write individual small programs, called threads, and have each core run one thread at a time. This requires precise timing, because if something doesn’t finish when it’s time to draw the next frame (in 16 milliseconds for 60 fps) you get stuttering.

When developers are optimizing their games, they use a tool known as a profiler to analyze how long code takes to run and what, if anything, is causing it to run slowly.

It’s much easier to do this on a console where the hardware is always exactly the same and there’s nothing running in the background taking up precious time. There are also a few optimizations – for example the PS5 has decompression hardware built into the storage. PCs don’t have that hardware, which is why The Last of Us’s PC port had poor performance and was maxing out CPUs, they can’t decompress as quickly or efficiently as dedicated hardware.

Here’s a great talk on Spider-Man and how tight some of that timing is: https://youtu.be/KDhKyIZd3O8

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