Why some games need to be restarted when we change the resolution or graphics settings while others manage do it on the go?

213 views

[ad_1]

Why some games need to be restarted when we change the resolution or graphics settings while others manage do it on the go?

In: Technology
[ad_2]

Let’s pretend all the code segments are little miners in in the gamebox gold mine who do all the little things that make the game work and the foreman is the main game application. At the start of the day the foreman issues them all instructions for the day saying they can mine up to 3 feet without a collapse. After mining the foreman realizes there has been a change to the instructions and now they can only safely mine 2 feet for the day. Instead of slowing down work by shutting down the mine and recalling and the miners the little foreman instead goes to find each miner and give them updated information himself.

The foreman thinks he found everyone and gave them all updated instructions. But he forgot Frank in the lowest portion of the mine. Frank has already dug 2.5 feet when he feels the mines walls shifting. Frank quickly drops his tools and starts running but he’s too late, the collapsing mine swallows him. The ensuing collapse starts a chain reaction, the rest of the miners in the levels above him feel the floor fall out from beneath their feet. They too are trapped in the rubble slowly waiting for oxygen to run out in the all consuming darkness.

Let’s say instead the foreman decided to recall every worker to the top on the PA system stopping work, took a head count to make sure everyone was there THEN issued instructions. None of the workers would be dead in a collapsed mine.

TL;DR It’s to prevent crashing due to missing dependencies or missing/conflicting parameters

When changing some settings, it’s just easier to reset all the variables to their starting values rather than trying to account for all the changes that would need to be made to allow the setting to be changed on the fly.

For instance, maybe the game calculates physics based on screen resolution. Changing the resolution means lots of variables that were previously set need to be recalculated. This can become a nightmare for testing, and lead to very subtle bugs. So the easy way out is to just apply the setting after the game is restarted.