top | item 37644952

KSP2 is spamming the Windows Registry until the game stops working

272 points| firewire | 2 years ago |forum.kerbalspaceprogram.com

294 comments

order

tyingq|2 years ago

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 they were overwriting a single key.

jncfhnb|2 years ago

Somewhere a unity exec has just figured out the new metric that determines their royalty pay rate.

echelon|2 years ago

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?

Waterluvian|2 years ago

“create_or_update pattern considered harmful,” so they say.

Actually I kind of do believe this, but separating the two doesn’t always solve the whole problem if you’re creating on every startup rather than only once on, say, profile creation or new game or something.

TomMasz|2 years ago

How could they not notice this?

hulitu|2 years ago

> So, somebody didn't notice a "changes every game" instance ID was in the path and/or data. They thought they were overwriting a single key.

Becsuse messing with Windows registry is a recommended action. /s

What's wrong with game config files ?

SketchySeaBeast|2 years ago

KSP2 is really becoming the premier example of "Nearly perfect labour of love's legacy ruined after being bought by a larger company."

More on topic: I have no idea why one would want to use the registry to store this information.

pratikss|2 years ago

It's far worse than that. Take-Two bought Squad and KSP along with it. Soon after they took Squad's original IP from them and gave it to Private Division to develop KSP 2. Then they poached staff from Squad. It's not like KSP 2 is developed in some innovative way, I was expecting that game like KSP 2 should have been developed in it's own engine since it's so unique among other games. But nooo. KSP 2 still uses Unity, and in worse way. You are better off installing better graphics mods on KSP.

numpad0|2 years ago

Why do "evil overlord" always seem to fail at understanding what they bought, especially the fact that the brand isn't worth much, and what are required investments/plans to capitalize it?

Like, buying Palm and reselling cheap Android phones, buying KSP and releasing KSP2 as it is don't seem to make a lot of financial sense. Or does it? It's always assumed "they" make a lot of money by ruining a brand. How and how much?

ethbr1|2 years ago

It's a great example of "Quality doesn't produce market-leading returns"

Of which the consequence should be "Don't turn labors of love into businesses that demands market-leading returns"

mjh2539|2 years ago

I'm curious, for someone who's never played KSP, what is the consensus on the last "good" version of KSP? The last patch that came out before being bought out?

brucethemoose2|2 years ago

> Nearly perfect labour of love

I wouldn't go that far. Its not KSP2, but KSP1 has plenty of jank and bugs.

ilyt|2 years ago

Well, kinda. Big company just bought IP and hired small "labour's of love" company to do it.

The ideas how to progress the game were great! And players liked it!

But after failing the deadline twice (I assume they lied to take2 about funds required) T2 kicked them off the project and poached developers that did it (basically "if you still love KSP come work for us).

And again, it looked great! The improvements they wanted and presented were received positively as it was basically "KSP1 but MORE! And with MULTIPLAYER!"

But in the end it turned out that passion cannot replace competence and the developers of this game are not very good.

garba_dlm|2 years ago

the oh-so subtle difference between two almost equivalent but in-the-end completely different intentions of:

making games (and also a bit on money on the side)

making money (and having to make some video games so the money will come)

feedsmgmt|2 years ago

The legacy of the game was already ruined by the greed of it's owners. Remember when almost all of the KSP original development team resigned at once?

kortex|2 years ago

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=32275078

Joker_vD|2 years ago

> "half assed KV dumping ground for every process and their dog to litter with whatever while acting as a singular bottleneck"

Doesn't that describe disk filesystems too? And Unix file namespace in particular (a single hierarchy unifying several block devices, just like registry is composed of several on-disk files)? What about all that junk in one's $HOME?

belltaco|2 years ago

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.

duped|2 years ago

A central key-value store that can be programmatically accessed to persist state across users, processes, and boots, that is also strictly typed and hierarchical is quite useful.

I think it would actually be quite useful to have an /etc/conf virtual file system that could be programmatically accessed by user space processes and used as a "dumping ground" just like /etc already is.

pathartl|2 years ago

Most games that _do_ use the registry use it as a data store that may or may not be accessed by external applications. It provides a very reliable pathing (at least at the time of the game's release) to access typed data.

For instance, most EA games from the early 2000's standardized the store of the CD key in ~HKLM:\SOFTWARE\<Game Name>\ergc. This would let one install the game to any drive and still have access to the CD key.

Games also use the registry as a way to point to where the game is installed. In the worst case scenario, it's used as a dumping ground for the game's preferences/settings and save states. With the shift to 64 bit and the introduction of WoW64 and most recently the shift to VirtualStores, I would rather nobody ever stores anything in the registry.

I'm currently working on a compatibility shim geared towards games that will redirect winapi filesystem and registry calls to a custom location. Hopefully it'll result in being able to make more portable installs of games that may require access to the registry.

hulitu|2 years ago

> It feels like the Windows Registry is one of those well-intentioned ideas that ended up being a tremendous mess in actual implementation.

The real issue is that this is known since Win 95 days , yet some people don't get it.

charcircuit|2 years ago

As opposed to using the filesystem which is an even poorer KV store?

foobarian|2 years ago

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.

dotnet00|2 years ago

KSP2 had all the warning signs of being a disaster ever since the initial delays and controversies with the original studio. Unfortunately, as usual, the community put on hype blinders until it became impossible to ignore.

moffkalast|2 years ago

And every time anyone mentioned any of that on the subreddit they got downvoted to oblivion, including myself. It's like everyone was (and to a smaller extent still is) on a heavy dose of weaponized hopium because the studio invested half their budget into a prerendered trailer.

Even the youtubers that got to play the prerelease version pulled out every excuse in the book to not present what they saw objectively.

ilyt|2 years ago

The pitch showed they know what players want

What they did so far showed they have nowhere near skill to pull it off

TylerE|2 years ago

I knew it was going to be a disaster as soon it became obvious that it was a continuation of the old code base, which has a lot of fundamental issues.

Aperocky|2 years ago

KSP1 is really complete, especially if you are using OKAN and common mods that people install.

I don't understand what they are trying to do with KSP2 to begin with. Skeptical from the start and it somehow turned out worse.

Xeamek|2 years ago

People in both threads shit on devs as if they manually modified registry with a crappy script at that, but this is the official Unity API and this is the idiomatic way to store preferences.

Ofcourse, it is unfortunate to have bug here of all places, but it looks like people don't like KSP2 devs in general (maybe even for good reasons, I don't know) and try to exaggerate this issue as some kind of proof, when in reality there is none

asddubs|2 years ago

yeah, I thought it was a bit silly too, and obviously a case of "hindsight is 20/20". "They should have been more careful." They assumed an ID that was static and it turned out not to be. I'm not saying the bug would have been impossible to prevent, but things like that will slip through the cracks on occasion.

Pannoniae|2 years ago

Not surprised at all; KSP as a franchise is in the enshittification stage where they aim to invest the minimum amount of money and maximise returns. This is just simply inexcusable software engineering and quality control.

Bit tangential but I'd like to remind everyone that this is the game where the lead designer (?) said that wobbly rockets and physics bugs are adding to the fun of the game, and they are implemented deliberately. This is doomed.

duped|2 years ago

I wouldn't call a game sequel bombing "enshittification." Beloved games sometimes have horrible, buggy, no good sequels.

ye-olde-sysrq|2 years ago

KSP2 isn't an enshittification play, imo. It's literally just bad project management.

I'll list their sins from my armchair:

- remaking a beloved, established game that has a prodigious base of features and extremely extensive modding support. you have a HUGE hill to climb just to get to your "MVP" - you have to supplant the existing game plus its modding community, and this is already a niche audience of ["people who find orbital mechanics as a primary gameplay loop to be fun"]. They were always going to need to really fucking knock it out of the park on their first at-bat to make this work.

- doing so on a short time-frame

- trying to be all artsy about it too. not that that's a bad thing, but it does position you to take your time rather than going fast. and like I said, they already had a steep hill to climb.

- standard-issue development hell. it happens.

- special-issue development hell where TTWO did some fucky-wucky stuff where they hired away a ton of the staff from the studio they were contracting with, cancelled the contract, and brought it all in-house with the poached team. Hardly an encouraging sign.

- with all the delays adding up, I suspect they were given the ultimatum to either ship their current state into EA and start recouping money, or get scuttled. People have allegedly looked into the code and found extensive additional systems that were basically hastily commented or hacked out so they could ship some vaguely-functional core.

I was really, really looking forward to KSP2. KSP1 but with good graphics, a non-unity engine (it was always a miracle that squad had gotten such good large-scale physics out of unity), and promises of official support for non-kerbin bases and interstellar travel? Yes please, sign me up!

But honestly, my mental model for how this would be successful was "they'll reimplement the existing base game in a new engine. big task but doable for TTWO's money, it's not indie anymore, and they obviously already understand the product. Then, with the base game ported, people will be willing to buy in EA because they see the promise of 'KSP but more!!!'". And that last bit was going to be critical, they'd need people bought-in if they wanted TTWO to keep funding them / them keep funding themselves.

So when they launched this scrap heap into EA, I knew it was doomed. And look at the, what 8ish months between then and now? They've released a few quaint patches that ignored all the huge issues and done basically nothing else.

I fully expect them to now slowly wind the EA down with a skeleton crew and people will just forget it to an ignoble death. I mean, TTWO can hardly be keen on continuing to pour development funding into this EA, right?

Noughmad|2 years ago

Well, I still believe it's going to be good eventually. Like KSP1, for example, or No Man's Sky. There certainly have both the resources and a guaranteed player base to make that happen.

That said, I cannot be sure of that, so I will not buy it until it is actually good.

xinayder|2 years ago

> said that wobbly rockets and physics bugs are adding to the fun of the game, and they are implemented deliberately.

claiming they did this on purpose is just acknowledging that they are good developers. They aren't and they keep proving it day by day.

Wobbly rockets and physics bugs were fun and interesting in KSP1. What they did in KSP2 is not even close to how those bugs were in the first game. It's inherently worse. You can read a lot of reviews and people will say that even though these bugs existed in KSP1, they weren't as bad as they are in KSP2.

elzbardico|2 years ago

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.

Xeamek|2 years ago

Well it's not like they randomly decided to use it. It's official and recommended API in Unity. You can use it and not even know it ises registry under the hood (although, at this caliber, you definetly should know such things)

potemkinhr|2 years ago

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.

bloqs|2 years ago

Honestly when the brains come together on hackernews to reverse engineer and unfuck a high profile videogame I get unreasonably excited. The guy that fixed the GTAV loading times via identifying a broken JSON loop downloading cosmetics was astonishing to me

lamontcg|2 years ago

People doing work on their own free time to fix a corporation's mistakes for them gets you excited?

londons_explore|2 years ago

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.

LoganDark|2 years ago

Is there a tool like WinDirStat/WizTree but for the registry?

ilyt|2 years ago

I'm surprised they didn't just shoved it in SQLite and called it a day. It's public domain.

NIH I guess. Or maybe some old fart in company doesn't want to let go off their abomination.

wolpoli|2 years ago

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.

delfinom|2 years ago

Somewhere, there are Microsoft devs WTFing over crash reports indicating registry is over a gig.

Xeamek|2 years ago

People in both threads shit on devs as if they manually modified registry with a crappy script at that, but this is the official Unity API and this is the idiomatic way to store preferences.

Ofcourse, it is unfortunate to have bug here of all places, but it looks like people don't like KSP2 devs in general (maybe even for good reasons, I don't know) and try to exaggerate this issue as some kind of proof, when in reality there is nonw

thisiswater|2 years ago

Unity's default save system "PlayerPrefs" saves to the registry, but I find it difficult to see why this is a good idea for anything but global settings (e.g. graphics settings). Serialization to JSON is a fairly simple alternative.

Why would this be used for player data in a production game? It's frustrating to port playerprefs data between systems for testing purposes. Is there something I'm missing?

ad-astra|2 years ago

As a teenager I played so much KSP that my grades suffered, played KSP2 a few days ago & did a moon landing, the game has a long way to go but the experience wasn’t nearly as bad as the reviews suggested.

fnordpiglet|2 years ago

It’s improved over the last 6 months or however long it’s been. But it’s still a shadow of ksp1, while ksp2 was sold with breathless discussions of interstellar ships with colonization and a bunch of stuff that would really have made it a next generation on ksp. But instead it’s still a year or more from parity with a laughable cadence of improvements, minor patches coming out every two months. This is after they slipped their deadline repeatedly on early access.

I think the community and reviews would be different if the parent company hadn’t outright screwed the original developer of KSP, which was a beloved game. The drama around that poisoned a lot of community good will, because the original developers clearly had a love for the game and the community and made something unique, then were unceremoniously dumped and cut out of what was supposed to be a well funded effort to build KSP “right.” Then they release this as “right” and it’s a huge disappointment.

raverbashing|2 years ago

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)

xinayder|2 years ago

This is amazing. It shows that a developer team from a triple-A publisher with billions of dollars at their disposal is just incompetent. The single-man team headed by HarvesteR and later some other devs that joined him were much more competent and it was an indie game.

Take2 killed the KSP franchise and they continue to do so. From less and less frequent updates (KSP2 has received only 3 "major" patches since it was released in February, taking 2 months between updates), to useless hotfixes that take a week to be deployed to fix just a single bug, to them taking 6 months to try to find out the reason the rockets are wobbly, to them releasing a game in Early Access which wasn't even ready for EA, it was an alpha prototype, completely broken down, and just trying to milk the franchise lovers for their $40 for an INCOMPLETE PROTOTYPE (which will be raised to $70 once the game leaves EA), I wish they just abandoned KSP2.

KSP1 with its modding community has produced so much and it's a much better game than its sequel. The charts don't lie, right now 1k players on KSP1, 67 on KSP2.

Now someone's going to tell me "this is not how game dev works". Well. They have billions at their disposal and a predatory publisher on their back. And their dev team consists of a lot of modders from the KSP community which I particularly don't blame them for not delivering, but Nate and the team that was poached from Star Theory by Take2 because the former didn't agree with the time frame Take2 gave them to release a working prototype, they are really incompetent.

They are "building the game from ground up" using the same engine as its predecessor and amazingly they came across the exact same bugs that KSP1 had fixed like 8 years ago. This is not even newbie game dev, it feels like they're just a bunch of people that just started to learn how to write software.

I have an opinionated website tracking their lies and deceptions (based on Web3 is Going Great), if anyone is interested: https://nokerbal.space

pluc|2 years ago

Is it common to use the registry essentially as a database? 300mb is way more than I expected that thing to support in a single key, but I admittedly know nothing about Windows. I've only ever seen it used to store booleans or simple string values.

thefifthsetpin|2 years ago

I just exported the registry on my personal windows machine to see. It was 400 MB as a .reg file and zipped down to less than a tenth of that.

I'm not sure what's common, but clearly not many programs are dumping large data into my registry.

ouraf|2 years ago

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

comprambler|2 years ago

Everyone seems to love shitting on KSP2, when the same people forget what KSP1 was like in Alpha. No science, shitty graphics, excessively wobbly rockets, inconsistent orbits, (other than graphics) seems familiar?

It took a looooong time for KSP1 to get where it is now, it will also take awhile for KSP2 to be as polished.

Chill out.

ye-olde-sysrq|2 years ago

KSP1 was made by a bunch of scrappy lovable indie devs making their first game (iirc Squad's team was a marketing company prior to this?) in a LCOL area funded by dreams and whatever $10 early access sales they made on steam, with no-one to tell them what to do.

KSP2 is made by TTWO, who is a publicly traded AAA studio of notable fame and decades of legacy and domain expertise.

If Squad sold KSP1's IP to TTWO and then went and made "KSP2" under a new name with their squad-sale money, that would be a different story. But even with that goodwill, I would still not be believing in the current KSP2 ever being a success story.

zamadatix|2 years ago

Being an original Alpha owner, prior to Steam even, I think many people forget it was ~$10 and that came without any overpromising by the development studio.

The two releases are nothing alike and if KSP 2 intended to use the same release model it should have either been dirt cheap or not released for many years. As it stands now it comes off as a massive grift and deserves the hate.

dotnet00|2 years ago

KSP2 was sold as a way to fix the mistakes and limitations of KSP1. It's a given that people would expect KSP2 to be on a better trajectory rather than repeating the same mistakes, overpromising and overcharging.

We could even just look at reentry heating, which was supposedly almost done, over 6 months later and even just that is nowhere to be seen. If that's taking them so long, how are they ever going to deliver the rest of their promises? Many of which there are serious technical questions about the feasibility of (eg multiplayer).

jylam|2 years ago

Except KSP was cheap (I got it for $9 IIRC, which was good value) when still in beta. KSP2 is $50 for the same level of beta, after years of development and drama. Don't chill, don't buy this crap until it gets better.

Uehreka|2 years ago

When KSP 1 shipped its alpha, there wasn’t a perfectly functional KSP 0 it was competing against. From what I’ve heard, they’re using the KSP 1 engine (restricting how much better they can make things) but are somehow shipping with many of the KSP 1 features missing. So it’s kind of a Worst Of Both Worlds situation.

Until KSP 2 achieves feature parity with KSP 1, I don’t see any reason why I should buy it.

sco1|2 years ago

Seems like the developers forgot too, since we have 10+ years of lessons learned and here we are starting from the same place making the same mistakes all over again.

brucethemoose2|2 years ago

KSP2 can't be developed forever.

KSP1 had (AFAIK) a cheaper dev team with no demanding publisher and a good reputation that brought a steady stream of money during alpha. If they progress at the speed of KSP1 from this point, they are going to get cut.

HideousKojima|2 years ago

So you're saying the KSP2 devs had the benefit of being able to look at the past mistakes and issues of their predecessor, and still failed to learn from it?

Stop defending the billion dollar corporations, please.

Aperocky|2 years ago

But what's the end game for KSP2, where KSP1 is today?

Speaking form a software development perspective, I don't see it improving beyond that point, or if that's even possible at all. For all KSP2 promised to improve the physic engines of KSP1, it has seemingly came up with a foundation that is significantly worse, not sure what you can do when your underlying engine has severe limitations.

mattsan|2 years ago

I forgot KSP2 was made by an indie studio /s

proactivesvcs|2 years ago

I went to download the attached .txt file and actually saw Firefox's download pie gradually filling. I thought, how big is this single registry key‽ 344Mb, that's how big!

ivanjermakov|2 years ago

I'm so grateful Unix did not implement its own registry. Files all the way down.

TeddyDD|2 years ago

Isn't gsettings/gconf/dconf something like registry? Gnome tends to implement worst stuff from Windows and Mac after all...

baal80spam|2 years ago

Really? I see it as a mess in the whole house instead of a mess in one room only.

terafo|2 years ago

After doing some profiling when that game released I'm not surprised. Game lacked LOD system, 70% of frame time was spent doing terrain rendering(IIRC it also generated mesh from texture every single frame).

burrish|2 years ago

Sorry for the language but Wow this is incredibly stupid How did this get allowed ?

ye-olde-sysrq|2 years ago

Look at the reviews for KSP2. This is not even one of the larger problems with the game. They released into EA with terrible, nearly unplayable performance... on an RTX 4090! a $1600-2000 GPU that at the time was difficult to obtain even if you had the cash.

Guvante|2 years ago

A comment says a dev tool got included by mistake

pdntspa|2 years ago

Is this "not corrupting the registry" really a thing that people are worried about when you're using Windows' APIs to access it?

babypuncher|2 years ago

Who still uses the Windows Registry in 2023?

Xeamek|2 years ago

Unity does, in their official API :)

tambourine_man|2 years ago

“Be warned though, deleting the wrong thing can stop applications from working, or even break the entire operating system.“

You gotta love Windows.

Xeamek|2 years ago

Yes, because if I go to /etc or /var and delete some random thing, linux is just magical and nothing will possible break.

Cut the crap

PretzelPirate|2 years ago

This is the same case in any OS when you're deleting things with root privileges.

ilyt|2 years ago

I think only thing worse to do with registry would be using it as savegame storage.

Holy fuck those guys are clueless, no wonder KSP2 launched in such shit state.