Why do programs (like games for example) crash when overloaded? Why cant it just keep processing the code but updating less often?

118 views

I.e how Minecraft usually crashes if you explode too much tnt at once.

In: 0

2 Answers

Anonymous 0 Comments

There’re many different types of overloaded, but I’ll focus on the most relevant two:

1) You’ve overfilled your memory. The game crashes because it’s trying to track more individual pieces of data than it has room to store on your computer – it can’t do it slower because time isn’t the limiting factor in this case, storage is.

If it needs to store the location of a million objects, and it only has the space to store a hundred thousand locations, it has no choice but to crash.

2) The game would be slow for a significant length of time. Perhaps the explosion has 2 seconds in-game-time, and the program would have to run it at a thousandth the speed – so you’d be waiting over 30 minutes for the explosion to finish.

The people who program games and operating systems are well aware that you don’t want to wait 30 minutes for a 2 second explosion to finish; that you’d be much happier overall if the game crashed at that point rather than locking you in to looking at a very very slow explosion. So they *deliberately* make it crash in those circumstances.

Notably some programs are designed specifically not to crash in that sort of situation – physics simulations of the sorts used in professional contexts (such as by engineers or animators) are often designed to keep going even when it’ll take months to fully detail the next two seconds; but they’re also designed with manual cancellation in mind and all sorts of other controls to make such lags manageable.

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