Live data from Hacker News

KSP2 is spamming the Windows Registry until the game stops working

forum.kerbalspaceprogram.com

291–300 of 306 posts

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

#291

Earlier quoted context omitted.

Where do you store where the application-specific KV stores are located? Are you just going to hard-code it so the application cannot be moved or installed elsewhere or on external drives? Where does the OS store its own settings? There are a lot of problems with software "shotgunning" their junk across the system. This isn't exclusive to the Registry or even a specific OS unfortunately. Just go look at what configur…

>Where do you store where the application-specific KV stores are located? Are you just going to hard-code it so the application cannot be moved or installed elsewhere or on external drives? I would put that in the same directory as the executable so I can have more than one executable of the same program or the path is simply passed as a command line parameter in the systems unit file. Compare that to hardcoding the…

> I would put that in the same directory as the executable

They're multi-user Operating Systems. Each user needs their own.

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

#292

Earlier quoted context omitted.

I pressume "Program Files" or "AppData" folders are Windows analogy to Library

"AppData" is like $HOME/Library. "ProgramData" is like /Library. "Program Files" is like /Applications.

Those are terrible names!

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

#293

Earlier quoted context omitted.

It's developer error. It'd be the same as a game on Linux filling up a conf file or a database with duplicates. Does Linux have mechanisms to guard against that? Didn't think so.

> Does Linux have mechanisms to guard against that? Sure. ulimit or cgroups can.

I doubt any of those are applied to games or applications on Linux by default.

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

#294

Earlier quoted context omitted.

That would be a directory called /bob right in the root dir, containing everything relating to tge bob app, including the firewall settings, both the distro defaults and the user layered, the executables, the image resources, the db libraries, the db store... never mind that the firewall is another package that needs those same settings... No. Or, if you really do want something so insane, well great news, you have s…

You're constructing an argument the person never made. The binary for my app could live in a hypothetical /apps/bob. Its config could be in there too. There's no need to duplicate dynamically linked system libraries in there. If the app need a different version of a library than the one provided by the distro/os, it could vendor it (or link statically). Optionally it can vendor and still try to use OS version if they…

> There's no need to duplicate dynamically linked system libraries in there.

> For all its faults and poor UX execution (albeit, maybe things improved since I last used them) flat pack and snap have some good ideas!

Hum, flatpak says hello.

Unlike the kernel, Linux userland is a not-backwards-compatible hell so the only way to make sure things don't blow up in a spectacular fashion is bundling the whole world that you need with your app, or hopefully that someone bundled the things that you need with a Flatpak Application Platform for you..

> There's also no need to place firewall rules in there.

> As for making thing system-wide available, there's already a few solutions for this (symlinks being a very backwards compatible way of doing this on nixes).

I'm pretty sure that if you're proposing a "app is a folder" specification, any application that has some system-wide rules it needs to install or suggests or toggle, need to live somewhere in the application folder. Icon customizations, firewall rules, mdns, upnp, those sorts of things.

If the application folder is the end-all, then it need to have some form of "$sysconfigdir overlay" folder if it wants to modify $sysconfigdir without actually being able to modify or spill over the actual $sysconfigdir (and therefore not being contained in the folder at all).

That is in fact how flatpak works: you're never supposed to write anything at the host /etc, you overlay things in your application folder XDG_CONFIG_DIRS and flatpak-aware applications read flatpak XDG_CONFIG_DIRS folders.

That is in fact how nix works: nix packages are supposed to be read-only self-contained folder in /nix/store/$hash-package-$version, and /etc happens to be a non-persistent cache thing that will be overridden sooner or later by a nix expression.

But that of course means that now you have several XDG_CONFIG_DIRS/$sysconfigdir lying around in your system.

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

#295
post #76

Earlier quoted context omitted.

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 /etc but harder to browse and edit. Or, from the contrary perspective: it’s the 500 places config lives on Linux, but in one place instead. (Except it still has a deep hierarchical structure, so that second one is kiiiinda not entirely true, in that you can run into exactly the same issues as scattered config files on Linux)

I think the only two "real" differences between throwing stuff in a folder and the registry is that:

* a uncorrupted registry hive is supposed to be Directed Acyclic Graph, (while a modern filesystem can have arbitrary cycles with symlinks and bind mounts and junctions) and;

* the registry has more limited name length limits, even assuming Windows somewhat low filesystem name length limits.

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

#296
post #221

Earlier quoted context omitted.

It's just /etc

> It's just /etc Some files in /etc have manpages.

Some registry keys also have The Old New Thing posts by Raymond Chen [1] /s

[1] https://github.com/mity/old-new-win32api#registry

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

#297

Earlier quoted context omitted.

>Where do you store where the application-specific KV stores are located? Are you just going to hard-code it so the application cannot be moved or installed elsewhere or on external drives? I would put that in the same directory as the executable so I can have more than one executable of the same program or the path is simply passed as a command line parameter in the systems unit file. Compare that to hardcoding the…

> I would put that in the same directory as the executable They're multi-user Operating Systems. Each user needs their own.

Which is how it works in Windows, if you follow Microsoft's own (admittedly confusing) guidelines. Every user has directories for both private and user-visible data, as well as for some half-thought-out feature called "roaming" that I've personally never seen an actual requirement for.

Storing .INI files in the .EXE's directory has been a no-no for many years, and nobody should be arguing for that. But the central registry concept makes even less sense. Use .INIs in your format of choice, and store them in the appropriate user-specific application data folder. Additionally, they should be created when the executable finds them missing, not by the installer.

The latter practice alone solves a multitude of problems, ranging from multiuser support ("Whaddya mean, install for everybody who uses the computer or just me? WTF?" -- your users) to the issue of requiring admin rights at installation time that are not really needed by the program itself.

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

#298
Makes sense. one of the simplest ways of saving data in Unity (but not the most correct) is saving values via PlayerPrefs[0]. In Windows, this saving method defaults to registry instead of creating a separate save file in the game folder. if you don't make your own system for storing variables or running everything in cache and then use a smarter way of saving data, it can get out of hand fast.

This was way more common in the old Unity 5 days, though

[0]https://docs.unity3d.com/ScriptReference/PlayerPrefs.html

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

#299
post #168

Earlier quoted context omitted.

KSP1 took 5 years of development to get to 1.0, at a non-software company. Take-Two then bought the game in 2017 and is responsible for ports and KSP2. So while KSP1 likely generated returns of Squad-magnitude with a few resources... that doesn't mean KSP2 is capable of generating Take-Two-magnitude returns from a full team. Dwarf Fortress sold a lot of copies too (finally), but it's also been in development for 21 y…

Dwarf Fortress is an indie game. KSP was an indie game until Take2 bought the game. The expectations for both these games were low. It was a small team working on both of them so we don't expect much, and since they're indie, they are actually gamers like us and like to play their games. Being bought by a AAA publisher and having billions at their disposal increases the quality expected by unprecedented levels. And t…

In a way, this speaks to the power good software engineers hold.

You can have hundreds of millions but no match for a small number of software engineers in what they are good and enthusiastic at.

Post reply on HN