Live data from Hacker News

How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

cookieplmonster.github.io

51–60 of 315 posts

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#51
post #28

Earlier 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.

Require a hash in the file to match the rest of the file if you want to avoid effortless changes to the file.

(There is no way to prevent changes by a knowledgeable person with time or tools, so that's not a goal)

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#52
post #10

This is the kind of thing I'd expect from Raymond Chen - which is extremely high praise! I'm glad they tracked it down even further to figure out exactly why.

Raymond is a wizard. Read his blogs for many years and love his style and knowledge.

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#53
post #46
post #37

Earlier quoted context omitted.

Worked fine on the target machines and the "0.5x programmer" got to see their family for winter holiday. Or are you saying they should have defensively programmed around a bug manifesting 21 years later and skip seeing their family during crunch time? To be honest, I just don't like how you disparaged the programmer out-of-context. Talk is cheap.

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).

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#54
post #28

Earlier 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.

Most binary save game files are human editable, too; unless they go through a separate encoding stage.

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#55
post #10

This is the kind of thing I'd expect from Raymond Chen - which is extremely high praise! I'm glad they tracked it down even further to figure out exactly why.

Raymond is a wizard. Read his blogs for many years and love his style and knowledge.

Raymond knows everything. From microcode bugs on Alpha AXP to template meta programming to UI.

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#56
post #47
post #35

Earlier quoted context omitted.

You misunderstood. Game developers should use a _good_ third–party library, not a _bad_ one. At a minimum they should be able to read the source code so that they know it is good. Thus open source libraries should be at the top of the list. If you don't know what “good” looks like, take a look at [Serde]( https://serde.rs/ ). It’s for Rust, but its features and overall design are something you should attempt to appro…

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.

Re: How a 20 year old bug in GTA San Andreas surfaced in Windows 11 24H2

#60
post #24

Earlier quoted context omitted.

Why weren't binary files used like I would expect in the 1990's DOS game? fread into a struct and all that

By the 2000s, portability was a concern for most titles. Certainly anything targeted at a rapidly changing console market back then.

Definitely, and architectures back then were far less standardized. The Xbox 360 was a big-endian PowerPC CPU, the PS2 had a custom RISC-based CPU. On the desktop, this was still the era of PowerPC-based Macs. Far easier (and I would argue safer) to use a standard, portable sscanf-like function with some ascii text, than figure out how to bake your binaries into every memory and CPU layout combination you might care about.
Post reply on HN