I'm more curious in what changed with the critical section locking/unlocking implementation in this version of Windows!
How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
61–70 of 315 posts
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#62Earlier quoted context omitted.
There are no good third party libraries
I disagree. Serde is not merely good, it is excellent. The only C code that I have recently interacted with uses a home–grown JSON “library” that is actually pretty good. In particular it produces good error messages. If it were extracted out into its own project then I would be able to recommend it as a library.
Apart from that, many of us thought that Java serialization was good if just used correctly, that IE's XML parsing capabilities were good if just used correctly, and so on. We were all very wrong. And a 3rd party library would be just some code taken from the web, or some proprietary solution where you'd once again have to trust the vendor.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#63Earlier quoted context omitted.
Using a well–written third–party library would not increase the development time; it would in fact reduce it. No risk of missing Christmas there.
Well-written 3rd party serialization libraries weren't exactly easy to come by 20 years ago, at least from what I can recall. Your best bet was using an XML library, but XML parsing was quite resource heavy. Many that seemed well designed turned out to be a security nightmare (Java serialization).
But it is even more important for today’s game studios to see and understand the mistakes that yesterday’s studios made. That’s the only way to avoid making them all over again.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#64Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#65Earlier quoted context omitted.
To u/db48x whose post got flagged and doesn't reappear despite me vouching for it as I think they have a point (at least for modern games): GTA San Andreas was released in 2004. Back then, YAML was in its infancy (2001) and JSON was only standardized informally in 2006, and XML wasn't something widely used outside of the Java world. On top of that, the hardware requirements (256MB of system RAM, and the PlayStation 2…
Why weren't binary files used like I would expect in the 1990's DOS game? fread into a struct and all that
Besides, the complaint about not having a heavyweight parser here is weird. This is supposed to be "trusted data", you shouldn't have to treat the file as a threat, so a single line sscanf that's just dumping parsed csv attributes into memory is pretty great IMO.
Definitely initialize variables when it comes to C though.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#66I like the one where you shoot at the moon and it gets closer
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#67Earlier quoted context omitted.
I disagree. Serde is not merely good, it is excellent. The only C code that I have recently interacted with uses a home–grown JSON “library” that is actually pretty good. In particular it produces good error messages. If it were extracted out into its own project then I would be able to recommend it as a library.
But how is that C project using a custom made JSON library doing better than Rockstar games doing the same? Because that library has good error messages? Apart from that, many of us thought that Java serialization was good if just used correctly, that IE's XML parsing capabilities were good if just used correctly, and so on. We were all very wrong. And a 3rd party library would be just some code taken from the web, o…
> And a 3rd party library would be just some code taken from the web, or some proprietary solution where you'd once again have to trust the vendor.
Open source exists for a reason, and had already existed for ~15 years by the time this game was begun. 20 years later there are even fewer excuses to be stuck using some crappy code that you bought from a vendor and cannot fix.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#68Earlier quoted context omitted.
> Putting the (very valid) reasons for not having human-readable game saves aside, I don't follow. What would the reasons be?
A human-readable game save file is presumably human-editable.
It's only now that single player progress is profitable to sell that video games have taken save game encryption to be default.
It's so stupid.
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#69Earlier quoted context omitted.
To u/db48x whose post got flagged and doesn't reappear despite me vouching for it as I think they have a point (at least for modern games): GTA San Andreas was released in 2004. Back then, YAML was in its infancy (2001) and JSON was only standardized informally in 2006, and XML wasn't something widely used outside of the Java world. On top of that, the hardware requirements (256MB of system RAM, and the PlayStation 2…
Why weren't binary files used like I would expect in the 1990's DOS game? fread into a struct and all that
This isn't that uncommon - look at something like Diablo 2 which has a huge amount of game data defined from text files (I think these are encoded to binary when shipped but it was clearly useful to give the game a mode where it'd load them all from text on startup).
Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2
#70Earlier quoted context omitted.
To u/db48x whose post got flagged and doesn't reappear despite me vouching for it as I think they have a point (at least for modern games): GTA San Andreas was released in 2004. Back then, YAML was in its infancy (2001) and JSON was only standardized informally in 2006, and XML wasn't something widely used outside of the Java world. On top of that, the hardware requirements (256MB of system RAM, and the PlayStation 2…
The flaw isn't the language. The issue is a 0.5x programmer not knowing to avoid sscanf() and failing to default and validate the results. This could be handled competently with strtok() parsing the lines without needing a more complicated file format.
Your average hire for the time might have been self-taught with the occasional C89 tutorial book and two years of Digipen. Today’s graduates going into games have fallen asleep to YouTube lectures of Scott Meyers and memorized all the literature on a fixed timestep.