r/explainlikeimfive • • May 21 '19

Technology ELI5: Why do some video game and computer program graphical options have to be "applied" manually while others change the instant you change the setting?

9.0k Upvotes

355 comments sorted by

View all comments

3.2k

u/aberroco May 21 '19 edited May 21 '19

That mostly depends on game engine's source code. Some are good, some are not so. Usually, resources need reloading when settings changed, and sometimes API requires recreating all objects. Usually when game requires restart to apply some options, that's because game engine need all resources to be reloaded under new settings and it's easier to do it just by restarting than by actual reloading.

33

u/mghoffmann May 21 '19

This isn't necessarily a bad engine vs good engine thing. Lots of changes require resources to be sent to the GPU and it's not always a bad thing. For example, highly optimized games often compile shaders specifically for the user's settings instead of using generic ones with parameters because the parameters take up processing power at runtime which is unnecessary if they never change.

The decision to recompile shaders is to take 30 seconds after the setting change to do some work instead of doing a teeny bit of extra work 60 times per second during the game. That doesn't necessarily mean games that don't do it are bad though- optimization that isn't necessary to enjoy the game is a waste of developer time and often introduces more potential for bugs.

→ More replies (3)

814

u/UnsignedRealityCheck May 21 '19

I have been coding a multiplayer game where an engine restart (e.g. kick everyone out and reload everything) is absolutely the last resort. Next worst is reloading an instance which is also frowned upon (like a separate dungeon inside the main game), which also disrupts players inside and forces them to start again.

Even though objects and assets can be compiled and reloaded on the fly, it's still always safer to just wipe that allocation and just start fresh. It's next to impossible to be 100% sure that everything (quest objects, mobs etc etc) are in the state they should be. Inconsistency and unexpected behaviour will cause more grief than a restart.

199

u/MrBlitzpunk May 21 '19

Is this what they do while the game is in maintenance? Also, online game with weekly maintenance schedule, what is actually happening under the hood?

321

u/FoodIsTastyInMyMouth May 21 '19

They are realeasing the updated code base. But when that code base is spread out over several hundred instances and servers, you need to pick everyone off to get all them up to date, to ensure all the code in production plays nicely with each other and without bugs.

142

u/marcocom May 21 '19

Also for optmization and defragmentation of database tables on servers in persistent mmorpg games

20

u/OffbeatDrizzle May 21 '19

defragmentation of database tables

do you mean the indexes? general database housekeeping can absolutely be done online if you do things right

16

u/[deleted] May 22 '19

Key point on doing things right. This is the sort of operations that's preferentially done on maintenance since an error can really be catastrophic to the operation of the game, and it's an operation that really does not need to be done so often. Yes, some defrag will be done constantly, but mission critical tables are generally saved for downtime.

→ More replies (4)
→ More replies (3)

97

u/CptGia May 21 '19

Not necessarily, some games like Guild Wars 2 don't need any downtime for new releases. They preload new game instances with the new code, then ask the players to log out and patch. Old instances can survive up to 3 hours, so you can finish that dungeon that you were in the middle of, and patch your client when ready. Logging back in will load you in a new instance.

0

u/[deleted] May 21 '19

[deleted] — view deleted comment

18

u/Iceember May 21 '19

Warframe is similar. They do kick everyone but you get your good friend red text to tell you how long you have. Then you just restart and patch as needed.

9

u/EryduMaenhir May 21 '19

Red text is best friend

→ More replies (1)

16

u/pavi2410 May 21 '19

Just today Brawl Stars had a 4 hour maintenance!!!

25

u/MercedesC63AMG May 21 '19

4 hours? ESO has a weekly maintenance each monday for 8/9 hours without compensation. They host it in USA so their servers are timed on that clock. It starts from 9:00 till 17:00 or more in europe

→ More replies (11)
→ More replies (6)
→ More replies (44)

18

u/vikirosen May 21 '19

Old instances can survive up to 3 hours

Then you get kicked as you wait for the loot to spawn after the meta.

Seriously though, even GW1 had an amazing patching system, courtesy of the people behind the heart of battle.net

→ More replies (2)
→ More replies (3)
→ More replies (1)

17

u/rgrwilcocanuhearme May 21 '19

Yes, this is exactly what is going on during maintenance, as well as a few other things.

Deleting old log files, cleaning up databases, other miscellaneous tasks and activities. Basically, for anything that could be impacted by changes in the game's state while they're being completed, it's really handy to just have a brief period where everything is shut down to handle those tasks, then you can start up fresh again.

It's basically impossible to find every instance of every tiny little thing that could go wrong, and there's all kind of reasons things run amok. Having a scheduled period to just save everything, shut it down, handle all your little maintenance tasks (consolidating/cleaning up/whatever logs/databases/whatever), and then start fresh helps keep the game stable and prevents too many things from going too far wrong.

Some guy mentioned them pushing code base updates; this can happen, and does, but it's important to recognize that not every maintenance period is accompanied by a code change - and for many games there are many more maintenance cycles than codebase updates. Other games they happen at the same time. The schedule a game will follow will typically change.

A patch would happen every week or two for games like WoW or League of Legends when they were new and had lots of stuff to add. Now, these games aren't releasing updates as frequently, but there still are intermittent maintenance periods.

There can also be software changes without shutting everything down, depending on the engine and what's being changed. An individual zone in an MMO, for example, might... Either but shut down completely while a change is being made, or perhaps it's only changed for the players entering it after a certain point, while all of the people who were in it before that update was pushed continue on in their "old" version. There's even game engines which can receive update data in real time and allow for world building while active players are connected - although, this is pretty rare as the practical advantages interred are pretty small compared to the investment necessary to establish such a system and potential issues which may arise as a result of it.

tldr;

there are many different reasons that you might need maintenance, and you might be doing any different combination of said reasons.

→ More replies (9)

34

u/Mixels May 21 '19 edited May 21 '19

The discussion so far is about a single application running on your gaming PC. There's no server involved. Think things like changing graphics settings.

When online games come down for maintenance, it's because the owners of the servers that provide game service need to take the servers offline for some kind of work. That might be an upgrade, a restart to improve performance by clearing cached data, a hotfix, etc.

Two different ideas.

→ More replies (1)
→ More replies (9)

24

u/mechwarrior719 May 21 '19

Is it a science-based dragon MMO?

→ More replies (1)

9

u/ajc1239 May 21 '19

This is why "did you turn it off and back on?" Is such an important step in troubleshooting.

9

u/UnsignedRealityCheck May 21 '19

As old and cliche it sounds, that really is usually the first and best step to make sure the issue is not caused by a random bug. However this doesn't apply well to big multi-user environments. Sometimes a faulty node or server thread can be isolated so that no more players get stuck with ongoing issue, and the mods can investigate.

→ More replies (40)

93

u/penny_eater May 21 '19

This and ultimately the game designer, wanting to present an easy to use interface, will save changes that are more time consuming until after the "apply" phase. This is so that, for example, the user doesnt see the screen go ape-crazy the whole time they push on the FSAA slider going from 1x to 2x to 4x etc. Better to let the user make up their mind and then change the screen just one time.

28

u/Hashbrown777 May 21 '19

The free version of Halo 5 (multiplayer only) on the windows store was the best implementation Id ever seen for visual settings on a game engine.

You could flick all the usual stuff, antialiasing, texture detail, but then you could also do things like resolution and all the normally you-have-to-restart things.

Now what was impressive wasnt this, as other games have done it, but it was that in this game it was seamless. The image just got more fidelity, as though it was one of those web images that just gets clearer as it loads. I was blown away

→ More replies (2)

30

u/aberroco May 21 '19

Btw, in Rage 2 devs made most settings to apply immediately, without "apply" button. And that's quite convenient. You can see how different settings will change the visuals and do you want it or you don't.

21

u/Flymsi May 21 '19

Yea sometimes you dont exactly know what is the difference between the option and if its worth it.

9

u/seeafish May 21 '19

I'd like to expand on this by saying that applies to computer software in general, not just games. Depending on how a piece of software is written, certain things are loaded into memory upon start up and end up acting as a dependency for many other things. The higher up the chain you are, the easier you can reload without interruption, but if you have a setting which for whatever reason has numerous other things depend on it being a fixed value, then it's simpler to just restart.

This is why sometimes Windows update will ask you to restart; whatever files were changed were so central to other things functioning in a particular way that you just need to load everything again from scratch.

This is a very simplified explanation, but keeping it ELI5.

→ More replies (37)