Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
nielsm
Jun 1, 2009



Only for "modern apps" packaged for Store distribution.

Adbot
ADBOT LOVES YOU

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Falcon2001 posted:

Like seriously, all of this is absolutely nuts. They hosed up, but nothing about their fuckup indicates any real or permanent harm to the computer beyond KSP2 not running properly.

People like to start their day off with a coffee and a jolly good complain on the internet :yum:

Jen heir rick
Aug 4, 2004
when a woman says something's not funny, you better not laugh your ass off

Kazinsal posted:

It was designed originally for COM components, then between 3.1 and NT they realized, oh man, we can just have programmers shove their config data in this structured, centralized database with optimized access routines, instead of littering the filesystem with INI files that need to be parsed line by line constantly.

Of course, the dipshits over at .NET a few years later went XML ALL THE THINGS and ruined that.

I don't know what you're complaining about. Com and the registry sucked all kinds of poo poo. It's much easier now.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Posting on the :godwinning: page

For some reason I thought that the Windows registry was fairly simple and permanently loaded in memory, is that not the case? Or is it more like one of the big ACID databases with a cache and a WAL journal and all that stuff?

Volte
Oct 4, 2004

woosh woosh
It seems like it's as simple as they did Prefs.Set(key, value) except without realizing that 'key' is different with every run. Unity is the thing that spams it into the registry. The idea that this is some absolute nuclear fuckup by the KSP devs and they should never be trusted to write code again is hilarious.

It reminds me of when I used to work in a computer shop around 2008 doing tech support and someone had brought in a computer that didn't work properly, and the issue turned out to be that some Kodak photo printer software (if I remember correctly) was creating tiny files in a temp directory at a rate of several per second any time the computer was on. It had created so many junk files, we're talking like hundreds of millions of files, that Windows just didn't really work anymore. Now there's a flaw I could see getting upset over.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Hammerite posted:

People like to start their day off with a coffee and a jolly good complain on the internet :yum:

If you're not complaining on the internet are you even living?

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Jen heir rick posted:

I don't know what you're complaining about. Com and the registry sucked all kinds of poo poo. It's much easier now.

ATL was meant to make COM better and somehow made it even worse.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

NihilCredo posted:

Posting on the :godwinning: page

For some reason I thought that the Windows registry was fairly simple and permanently loaded in memory, is that not the case? Or is it more like one of the big ACID databases with a cache and a WAL journal and all that stuff?

Windows registry comes from the "massively overengineered" phase of windows.

Votskomit
Jun 26, 2013

Volte posted:

It seems like it's as simple as they did Prefs.Set(key, value) except without realizing that 'key' is different with every run. Unity is the thing that spams it into the registry. The idea that this is some absolute nuclear fuckup by the KSP devs and they should never be trusted to write code again is hilarious.

It reminds me of when I used to work in a computer shop around 2008 doing tech support and someone had brought in a computer that didn't work properly, and the issue turned out to be that some Kodak photo printer software (if I remember correctly) was creating tiny files in a temp directory at a rate of several per second any time the computer was on. It had created so many junk files, we're talking like hundreds of millions of files, that Windows just didn't really work anymore. Now there's a flaw I could see getting upset over.

I've seen a number of Android apps use Prefs as a database. Serialize data into JSON, store it as a string in Preferences.

This KSP bug sounds much more understandable.

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
the ksp bug wouldn't be that bad if it just left junk in the registry but it does eventually make the game unstartable for some reason so it's not just aesthetics

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.
322mb of registry entries strikes me as somewhat excessive for a single game.

Athas
Aug 6, 2007

fuck that joker

Volte posted:

It seems like it's as simple as they did Prefs.Set(key, value) except without realizing that 'key' is different with every run. Unity is the thing that spams it into the registry.

:godwinning: Yes, this is it. It's the kind of stuff that inevitably happens when you are building on top of a sufficiently complex tower of abstractions. It's likely the programmer didn't even realise anything was going in the registry.

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Athas posted:

:godwinning: Yes, this is it. It's the kind of stuff that inevitably happens when you are building on top of a sufficiently complex tower of abstractions. It's likely the programmer didn't even realise anything was going in the registry.

I can forgive a programmer missing this but no one in their QA noticed this? It's a combination of "run your game long enough and game doesn't work anymore" and "dumps thousands of mb of keys in the registry" - that kind of bug is a QA wet dream.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Bruegels Fuckbooks posted:

I can forgive a programmer missing this but no one in their QA noticed this? It's a combination of "run your game long enough and game doesn't work anymore" and "dumps thousands of mb of keys in the registry" - that kind of bug is a QA wet dream.

I can't imagine QA looking at the registry.

Volte
Oct 4, 2004

woosh woosh

Bruegels Fuckbooks posted:

I can forgive a programmer missing this but no one in their QA noticed this? It's a combination of "run your game long enough and game doesn't work anymore" and "dumps thousands of mb of keys in the registry" - that kind of bug is a QA wet dream.
This seems like a bug that only happened each time the game was loaded and took months of frequent play on the same user profile to occur, so I would characterize it more as a QA nightmare. It didn't "dump" hundreds of MB of keys into the registry (and the actual amount of data in the registry would have been several times less than that -- the 300+ MB file is a .reg file with all the data dumped into a comma-separated hexadecimal-encoded listing), it trickled them in slowly until suddenly the game stopped working.

If I had to point the finger at any one clear point of failure, it's Unity, because what the hell, why does it store user preferences in the registry??

Nalin
Sep 29, 2007

Hair Elf

Volte posted:

This seems like a bug that only happened each time the game was loaded and took months of frequent play on the same user profile to occur, so I would characterize it more as a QA nightmare. It didn't "dump" hundreds of MB of keys into the registry (and the actual amount of data in the registry would have been several times less than that -- the 300+ MB file is a .reg file with all the data dumped into a comma-separated hexadecimal-encoded listing), it trickled them in slowly until suddenly the game stopped working.

If I had to point the finger at any one clear point of failure, it's Unity, because what the hell, why does it store user preferences in the registry??

I like how Windows is the only platform that doesn't get prefs stored on disk:
https://docs.unity3d.com/ScriptReference/PlayerPrefs.html

Actually, I like better how Windows WUP apps do store preferences on disk, so its not even specific just to the whole Windows platform.

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

Bruegels Fuckbooks posted:

I can forgive a programmer missing this but no one in their QA noticed this? It's a combination of "run your game long enough and game doesn't work anymore" and "dumps thousands of mb of keys in the registry" - that kind of bug is a QA wet dream.

Honestly I wonder how QA even works for a game in Early Access/etc. Or if they even have a QA department, given how that's been chopped in a lot of places.

ExcessBLarg!
Sep 1, 2001
Unity is why a 850 MB pixel art game takes up 7.1 GB on Nintendo Switch. Absolute weird bullshit engine.

ExcessBLarg! fucked around with this message at 18:31 on Sep 26, 2023

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

rjmccall posted:

Did Windows not isolate application registries from each other when they started using crazy FS overlays to stop applications from installing DLLs into actual system directories?

That era of wacky poo poo was all about making things user-account specific. Isolating different programs running as the same user from each other was still a decade away from being on the radar. These days it's pretty similar to the state of macOS: there's a mechanism for sandboxed applications, but no one uses it.

Volte
Oct 4, 2004

woosh woosh

ExcessBLarg! posted:

Unity is why a 850 MB pixel art game takes up 7.1 GB on Nintendo Switch. Absolute weird bullshit engine.
Any info on this? I can't find any technical information about it or reason that it would be Unity causing that and it doesn't seem to be an issue for other Unity games.

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

ExcessBLarg! posted:

Unity is why a 850 MB pixel art game takes up 7.1 GB on Nintendo Switch. Absolute weird bullshit engine.

From my understanding, the problem is that Unity provides a lot of the basic architecture you're using on a given platform, and that architecture has to be generic in a lot of ways to work on multiple platforms. Like yeah, it's a weird bullshit engine, but it's also a weird bullshit engine that builds for all major platforms and that was a huge selling point, especially for games that don't need to wring every last drop of performance out of the platform, like 2d pixel art games.

Unity has lots of weird problems but like JavaScript, there's a reason it's popular while still being insanely janky.

brap
Aug 23, 2004

Grimey Drawer
I got no evidence for this but I bet that with sufficient investment in solving the problem at Unity and/or the developers of the Switch port you’d get that 7GB of bullshit down to 700MB of bullshit or even less.

Macichne Leainig
Jul 26, 2012

by VG

brap posted:

I got no evidence for this but I bet that with sufficient investment in solving the problem at Unity and/or the developers of the Switch port you’d get that 7GB of bullshit down to 700MB of bullshit or even less.

I mean, the evidence is that the original game is 850mb on disk. It's gotta be some asset packing fuckery to blow it up to almost 10x its size or some other weird poo poo.

Macichne Leainig fucked around with this message at 20:24 on Sep 26, 2023

Red Mike
Jul 11, 2011

Macichne Leainig posted:

I mean, the evidence is that the original game is 850mb on disk. It's gotta be some asset packing fuckery to blow it up to almost 10x its size or some other weird poo poo.

This isn't a Unity-specific thing, it's just what happens when you port a game to a console without actually optimising for the platform (or when optimising for different things than storage/download size). Unfortunately porting from a platform to another is an absolute clusterfuck of a process, and Unity if anything helps a ton in making it manageable by a small team. And that small team will still burn a lot of time/budget on getting the port to pass certification and be releasable.

But if that small team isn't also given the time/budget/priority to actually then optimise it, you're left with at least one or more of: bad/mediocre performance, huge storage/download size, small weird bugs that no other platform has, minimal integration to the platform, missing small features that other platforms have, tons of extra downloads on top of the base game. And the cause/solution for each one of these is usually different for each game, as well as being a different value for each game (e.g. a small singleplayer 2D game probably won't have bad performance and integration with platform is minimally useful anyway), so this wouldn't be something at the engine/platform level (that Unity/Nintendo could solve). Even for some things that could be engine-level (e.g. asset packing/import/processing), the solutions are never straight wins, they're always trade-offs; maybe some types of games can take that trade-off easily because they don't care about the downside, but that's not most games, so the engine can't make that decision. To top things off, usually the development of the platform-specific parts of each engine are done in concert between the engine company (e.g. Unity) and the platform company (e.g. Nintendo), which means the work happens at a glacial pace with so many recurring issues that honestly it's impressive that it generally works at all most of the time.

If instead you chose not to use Unity/Unreal/etc, then you need a large team rather than a small team, and you still have most of those problems and more (as well as requiring tons of platform-specific know-how for each platform for each game).

For that specific game, it looks like the game was ported to consoles by an external work-for-hire team. From personal experience that means they were told to just do it and otherwise barely communicated outside of milestone check-ins, the storage/download size was deemed low priority, and by the time it was finished the main game studio didn't care because it worked (which I agree with, for a single-player game console ports are just a way to get a burst of a few more sales with barely a tail on it).

e: Don't get me wrong, Unity totally is a weird bullshit engine. But in this case I wouldn't blame Unity/Unreal (or even Nintendo) because it's one of those rare cases where the engines are actually offering something that's miles ahead of any alternative in terms of just getting it done. If these engines didn't exist/have Switch targets, then nothing but AAA and tiny indie games would be going onto the Switch ever.

Red Mike fucked around with this message at 21:23 on Sep 26, 2023

Volte
Oct 4, 2004

woosh woosh

Macichne Leainig posted:

I mean, the evidence is that the original game is 850mb on disk. It's gotta be some asset packing fuckery to blow it up to almost 10x its size or some other weird poo poo.
I was very curious about this so I :ninja: obtained :ninja: a ROM of the Switch version and unpacked it. The total size on disk is 3.51GB instead of the 854MB of the PC version. The Switch version has way more bare data files and they are much larger. The PC version has a 177MB file called "unity3d.data" which is absent on the Switch version. I found reference to a similar issue in this thread which leads me to believe that is a compressed asset bundle and its use depends on the platform settings when building. When I use "Asset Bundle Extractor" to decompress it, it becomes 6.1GB. I believe many of the files' contents are Unity's YAML descriptors of various nearly-identical game objects which explains why it is so highly compressible. Not sure why the Switch version is only 3.5GB instead of the 7+ reported elsewhere, unless that's just a 2x size buffer to account for patches or whatever.

So I'm not sure I'd lay this directly at the feet of Unity. I would guess either whoever built the game didn't set the build up with compression enabled properly, or else it was determined that the Switch hardware didn't play nicely with on-the-fly decompression. Anyone know how big the PS4 version is?

Volte fucked around with this message at 21:47 on Sep 26, 2023

Macichne Leainig
Jul 26, 2012

by VG
I didn’t say it was all Unity’s fault but go on I guess

Volte
Oct 4, 2004

woosh woosh

Macichne Leainig posted:

I didn’t say it was all Unity’s fault but go on I guess
Someone else did


edit: Looking back in the Steam depot history it seems that it was originally uncompressed on PC as well, and they switched to a compressed build shortly after release. So it could just be that the consoles never got that change. See: https://steamdb.info/depot/774362/history/?changeid=M:936010028863753902

Volte fucked around with this message at 22:00 on Sep 26, 2023

Red Mike
Jul 11, 2011

Macichne Leainig posted:

I didn’t say it was all Unity’s fault but go on I guess

My bad, meant to quote ExcessBLarg!'s post.


Volte posted:

it was determined that the Switch hardware didn't play nicely with on-the-fly decompression

Without getting into the weeds, there's a load of things around asset/texture compression where yes the better option on Switch is to avoid it entirely if you can, and a larger storage size is a good trade-off for an extra month or more of contractor time, especially since it's fixable later via a patch if it becomes an issue.

OddObserver
Apr 3, 2009

Red Mike posted:

My bad, meant to quote ExcessBLarg!'s post.

Without getting into the weeds, there's a load of things around asset/texture compression where yes the better option on Switch is to avoid it entirely if you can, and a larger storage size is a good trade-off for an extra month or more of contractor time, especially since it's fixable later via a patch if it becomes an issue.

The flipside is that Windows has ridiculously bad file system performance (and for lots of games, spare CPU to decompress), so bundles can significantly help there.

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

OddObserver posted:

Windows has ridiculously bad file system performance
Compared to what?

Red Mike
Jul 11, 2011

OddObserver posted:

The flipside is that Windows has ridiculously bad file system performance (and for lots of games, spare CPU to decompress), so bundles can significantly help there.

Yeah, that's basically what I mean by every solution having trade-offs. Compared to Windows though, on consoles when you look at solutions for a problem they generally all have big drawbacks/caveats that you can only really mitigate through lots of extra dev time, or by not using a feature/your game being limited in some way/your game just happening to be the right genre/type of game that means the drawback isn't an issue. That's slowly improving over the years, but Xbox/PS are light years ahead of Nintendo on it from what I hear.

OddObserver
Apr 3, 2009

Bruegels Fuckbooks posted:

Compared to what?

Linux, which is just kinda bad. (It's very noticeable with some games that have a lot of small files they read at startup, like some Paradox stuff).

spiritual bypass
Feb 19, 2008

Grimey Drawer
Have you heard the good news of operating systems with in-kernel ZFS?

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Bruegels Fuckbooks posted:

Compared to what?

Compared to systems where you never have a poorly written antivirus making each file open take 100 times as long as it should, such as consoles.

Outside of things like AV scanners, it would be more accurate to say that Windows has different filesystem performance characteristics from other platforms, so software ported to it tends to run into solvable filesystem perf problems.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
If your data is reasonably compressible, storing it compressed on disk is faster unless you’re absolutely starved for CPU cycles or your access patterns are very friendly to the OS’s disk cache. Decompression is really cheap, doing 2x (could easily be 10x) as much I/O is really expensive. The exact tipping point varies by platform but the core idea does not.

Where you get platform-specific differences is usually stuff like how well they deal with huge directories, tiny files (much smaller than a page), and so on. And yeah, stuff like pervasive AV on Windows.

ExcessBLarg!
Sep 1, 2001

Volte posted:

I was very curious about this so I :ninja: obtained :ninja: a ROM of the Switch version and unpacked it.
I posted the details about this a while back, and I think your description is pretty accurate.

Volte posted:

Not sure why the Switch version is only 3.5GB instead of the 7+ reported elsewhere, unless that's just a 2x size buffer to account for patches or whatever.
The "ROM" consists of the original release of the game, while the size doubled in subsequent DLC updates.

My point though is that it's unfortunate that Unity's "default" (or at least, most straightforward) asset management approach is recognized as so woefully inefficient that it's not recommended for use, and that while better solutions exist you have to go out of your way to make use of them.

Tann
Apr 1, 2009

Just found you can do something like sql injection in my game lol

I let you rename heroes between fights and it all uses my weird modding thing. If you rename them to eg "jenny.hp.500" then they gain the name "jenny" and 500hp.

Jen heir rick
Aug 4, 2004
when a woman says something's not funny, you better not laugh your ass off

Tann posted:

Just found you can do something like sql injection in my game lol

I let you rename heroes between fights and it all uses my weird modding thing. If you rename them to eg "jenny.hp.500" then they gain the name "jenny" and 500hp.

This sounds like a cool feature, not a bug.

Tann
Apr 1, 2009

Jen heir rick posted:

This sounds like a cool feature, not a bug.

The reason you can do this is because I'm adding some "modding" that works like this. Though ideally you can't use it to get infinite hp during a standard game!

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009
Have you tried sanitizing your inputs op?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply