←back to thread

3883 points kuroguro | 5 comments | | HN request time: 1.593s | source
Show context
breakingcups ◴[] No.26296724[source]
It is absolutely unbelievable (and unforgivable) that a cash cow such as GTA V has a problem like this present for over 6 years and it turns out to be something so absolutely simple.

I do not agree with the sibling comment saying that this problem only looks simple and that we are missing context.

This online gamemode alone made $1 billion in 2017 alone.

Tweaking two functions to go from a load time of 6 minutes to less than two minutes is something any developer worth their salt should be able to do in a codebase like this equipped with a good profiler.

Instead, someone with no source code managed to do this to an obfuscated executable loaded with anti-cheat measures.

The fact that this problem is caused by Rockstar's excessive microtransaction policy (the 10MB of JSON causing this bottleneck are all available microtransaction items) is the cherry on top.

(And yes, I might also still be salty because their parent company unjustly DMCA'd re3 (https://github.com/GTAmodding/re3), the reverse engineered version of GTA III and Vice City. A twenty-year-old game. Which wasn't even playable without purchasing the original game.)

replies(40): >>26296812 #>>26296886 #>>26296970 #>>26297010 #>>26297087 #>>26297123 #>>26297141 #>>26297144 #>>26297184 #>>26297206 #>>26297323 #>>26297332 #>>26297379 #>>26297401 #>>26297448 #>>26297480 #>>26297806 #>>26297961 #>>26298056 #>>26298135 #>>26298179 #>>26298213 #>>26298234 #>>26298624 #>>26298682 #>>26298777 #>>26298860 #>>26298970 #>>26299369 #>>26299512 #>>26299520 #>>26300002 #>>26300046 #>>26301169 #>>26301475 #>>26301649 #>>26301961 #>>26304727 #>>26305016 #>>26311396 #
greggman3 ◴[] No.26301961[source]
Tell that to Valve. The Source engine and all its games (Half Life 1, 2, Portal, Alyx) have horrible load times. They might not be as bad as the GTA example but they're long and extremely frustrating.

And yet, no one cares, Those games (and GTA5) all sold millions of copies.

The only way this stuff gets fixed is if (a) some programmer takes pride in load times or (b) customers stop buying games with slow load times.

(b) never happens. If the game itself is good then people put up with the load times. If the game is bad and it has bad load times they'll point to the load times as a reason it's bad but the truth is it's the game itself that's bad because plenty of popular games have bad load times

Also, any game programmer loading and parsing text at runtime by definition, doesn't care about load times. If you want fast load times you setup your data so you can load it directly into memory, fix a few pointers and then use it where it is. If you have to parse text or even parse binary and move things around then you've already failed.

replies(2): >>26302381 #>>26302606 #
1. danlugo92 ◴[] No.26302606[source]
Do you have a link to how one would archiece this data pointer magic? I wouldnt know what to search for.
replies(2): >>26307282 #>>26313609 #
2. wmil ◴[] No.26307282[source]
In the simplest case, in C you can read file data into memory, cast it as a struct, then just use that struct without ever doing any parsing.

As things get more complex you're probably going to need to manually set some pointers after loading blobs of data and casting them.

It's just the standard way of dealing with binary files in C. I'm not sure what you'd need for search terms.

replies(1): >>26327780 #
3. imtringued ◴[] No.26313609[source]
Just use flatbuffers/capnproto.
replies(1): >>26327782 #
4. danlugo92 ◴[] No.26327780[source]
Oh I understand now, thank you.
5. danlugo92 ◴[] No.26327782[source]
Thank you.