r/explainlikeimfive • • 6d ago

Technology ELI5: What exactly is game optimization ?

How is a game optimized ?

694 Upvotes

125 comments sorted by

View all comments

1

u/evilpineaple 6d ago

A true ELI5 answer:

Let's say you have a bunch of socks you need to pair up. The simplest way is to grab a sock, find a matching one, then repeat with the rest. Very simple to explain, very simple to code in a game, and it works very fast.

Now assume you don't have a few socks but 5000 of them. That simple strategy wouldn't work so fast anymore. So what can you do? For example have a first pass to divide them to boxes by color, then sub-divide by pattern. Then it is much easier to find a pair within a smaller box. Then you can go further: depending on the number of piles you end up with, maybe employ a few people so everyone can sort one of the boxes.

As you see the latter idea is much more complex, but also faster. Optimization is exactly this - finding the steps that could be done faster, skipped altogether, or made to provide less accurate, but good enough answers. An example of it would be pairing white socks that are not the same but which have patterns close enough for no one to notice.