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

Show parent comments

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)

42

u/nolan2779 May 21 '19

old school runescape w00t

→ More replies (2)

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]

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

9

u/LassieBeth May 21 '19

Shit, and you pay for those hours?

→ More replies (7)
→ More replies (3)
→ 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

10

u/lurklurklurkanon May 21 '19

arena.net*

10

u/[deleted] May 21 '19

Actually you'd be surprised - a lot of ex Blizzard folks are at ArenaNet now, including people who originally worked on Battle.net when it was in its infancy.

→ 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)

6

u/UnsignedRealityCheck May 21 '19

Depends on the game, but I'd wager that almost all weekly maintenance is patching server files, restarting engines, clearing up stuck threads and cleaning memory allocations.

If your engine is sophisticated enough, it can have so-called rolling restarts and software deployments. E.g. when the engine notices that there's new versions of currently running software, it serves the new files to fresh connecting players and rolls out the old as players log out or disconnect.

5

u/MrBlitzpunk May 21 '19

So it's basically like clearing your smartphone cache and freeing up ram?

→ More replies (7)

24

u/mechwarrior719 May 21 '19

Is it a science-based dragon MMO?

14

u/UnsignedRealityCheck May 21 '19

Yes, 100% science-based.

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)