Live data from Hacker News

KSP2 is spamming the Windows Registry until the game stops working

forum.kerbalspaceprogram.com

71–80 of 306 posts

Re: KSP2 is spamming the Windows Registry until the game stops working

#72

Earlier quoted context omitted.

I heard from someone who actually works in the industry (as engine developer) that companies usually don't use Unity out-of-the-box and write their own tools and extensions (e.g. memory management) and change parts of the engine as the needs vary greatly depending on the game they are making. Not sure how common that really is though.

You may be referring to Unreal in this instance. Unreal is open source* but you pay to license the engine, so you can make core changes I.e. memory management or tweak underlying net code. Unity is closed source and so you can only really extend very core parts of the engine. FWIW my experience in gaming has been that Unity is exceptionally powerful and allows game developers to create games that would otherwise requ…

> Unreal is open source

Unreal is not open source (cf. the Open Source Definition: https://opensource.org/osd/). It's just that the licencee is allowed to view and modify the source code within the limits of the licence.

Re: KSP2 is spamming the Windows Registry until the game stops working

#74
post #8

It feels like the Windows Registry is one of those well-intentioned ideas that ended up being a tremendous mess in actual implementation. "Let's use a central database to store things that the OS, drivers, and UI need to access" somehow became "half assed KV dumping ground for every process and their dog to litter with whatever while acting as a singular bottleneck". See also: https://news.ycombinator.com/item?id=322…

They are global variables. Worth working very hard to block in any project. Separate microservices are the most effective way I saw so far to stop people in a large org from making shortcuts via global contexts. I feel bad for our frontend devs dealing with a tide of global constructs in our React codebase.

Well, the file system, too, is a global variable. Concurrent reading/writing of a single file has about the same racy behaviour as concurrent reading/writing of a global variable.

Re: KSP2 is spamming the Windows Registry until the game stops working

#75

I haven't done Windows native development for over 20 years, but at my time during the 90's we already used the registry rather sparingly. And at this time, cross-platform development was not even in our radars. I wonder how in the Year of Our Lord of 2023 someone feels confortable using the Windows Registry like some kind of blackboard.

There's the odd game that uses registry for the purpose of save files for some reason, which is stupid when you have several PC's and want to sync progress for the odd session. There's one example with a very solid puzzle game (Lyne; https://store.steampowered.com/app/266010/LYNE/) that used registry but I see they now have Steam cloud on the profile page but back in the day I had to export registry keys to not have to replay the same puzzles, not fun.

Re: KSP2 is spamming the Windows Registry until the game stops working

#76
post #4

One of the comments mentions this: "Alright, doing some investigating it seems that they are saving the Pqs preferences based off of the instance ID of the pqs object, which, according to unity's own documentation, changes between runs of the game, hence why its saving 10 trillion different copies of the same data" So, somebody didn't notice a "changes every game" instance ID was in the path and/or data. They thought…

Coming from a Linux background, what is the windows registry and why do things need to write to it? All I ever read about it seem to be horror stories.

Can't you store stuff alongside the install? Or in some user data location?

Re: KSP2 is spamming the Windows Registry until the game stops working

#77
This is yet another example on how, while Windows can have its problems, 90% of them are other developers treating the system as their personal dump truck/litterbox

(as per another comment)

> having the Pqs preferences based off of the instance ID of the pqs object, which, according to unity's own documentation, changes between runs of the game

This looks like someone copy-pasted something off of Stack Overflow (wouldn't be the first time)

Re: KSP2 is spamming the Windows Registry until the game stops working

#78
post #64

Adding 322 mb of data to the registry isn't going to be healthy for windows either. Registry hives expand but don't contract again. The registry is effectively held entirely in RAM. You are therefore effectively wasting 322 mb of RAM even when KSP isn't running.

I remember it used to be an optimization thing in Windows 9x to compact the registry on startup. I am surprised that it's not really resolved.

You can still do it manually, but you need a bootable disk to do so:

https://learn.microsoft.com/en-us/troubleshoot/windows-serve...

Re: KSP2 is spamming the Windows Registry until the game stops working

#79
post #76
post #4

One of the comments mentions this: "Alright, doing some investigating it seems that they are saving the Pqs preferences based off of the instance ID of the pqs object, which, according to unity's own documentation, changes between runs of the game, hence why its saving 10 trillion different copies of the same data" So, somebody didn't notice a "changes every game" instance ID was in the path and/or data. They thought…

Coming from a Linux background, what is the windows registry and why do things need to write to it? All I ever read about it seem to be horror stories. Can't you store stuff alongside the install? Or in some user data location?

It's kinda like a system wide dconf

Re: KSP2 is spamming the Windows Registry until the game stops working

#80
post #76
post #4

One of the comments mentions this: "Alright, doing some investigating it seems that they are saving the Pqs preferences based off of the instance ID of the pqs object, which, according to unity's own documentation, changes between runs of the game, hence why its saving 10 trillion different copies of the same data" So, somebody didn't notice a "changes every game" instance ID was in the path and/or data. They thought…

Coming from a Linux background, what is the windows registry and why do things need to write to it? All I ever read about it seem to be horror stories. Can't you store stuff alongside the install? Or in some user data location?

It's just /etc
Post reply on HN