2 ms·
I don't think it was simple. It came down to the odd specifics of scanf making the algorithm O(n^2) which wasn't obvious at all from the programmer standpoint.
by indeedmug 6y ago
I don't think it was simple. It came down to the odd specifics of scanf making the algorithm O(n^2) which wasn't obvious at all from the programmer standpoint. A lot of people pan Rockstar for being incompetent but in reality, it's a C footgun that any programmer would make.
Edit: I reread the article and I overlooked how there was a second issue of a poorly implemented "hash table" that was a linked list that checked the entire list for dups in every update. Since we don't have access to the source code, it's hard to say if this is poorly implemented piece of code on Rockstar's part or someone else. It could be some deeply buried piece of code that no one ever looked at for years until now.
- 295310e0 6y agoOn the gripping hand, if someone had run a profiler on the code in all of these years, it would have popped out immediately that some investigation was warranted.
- indeedmug 6y agoIt seems like the original GTAV is a efficient and well optimized game. I played it and it looks amazing for how fast it runs. They certainly ran a lot of profilers to nail the performance down. It's amazing what video games can do, look at the Doom series. https://www.youtube.com/watch?v=UsmqWSZpgJY https://www.youtube.com/watch?v=UsmqWSZpgJY But this is online GTA. I can imagine that they handed it off to another department that didn't have the same amount of discipline and expertise. it's probably an off shoot team that creates content for the engine but don't necessarily need to dig down into how the engine works.