This is just a developer thing. If I had a nickel for every time I've written some code and immediately said "this is the dumbest fucking shit I've ever made," I would be able to retire.
This may be a surprise to those not working on code, but in big productions there's always something TODO, half complete features and so on. The UI might be clean, but it's always somewhat dirty in the back.
@@ericcricket4877 Sure, but after 13 years of updates and literal billions of dollars, you'd think they'd fix some shit. Like the longass loading times that were fixed by just some guy and not R* noticing it was being really stupid and scanning every file or code line or whatever.
@@JZStudiosonlineNot to excuse the loading times, that was a travesty. But in general: why do those TODOs matter? There is always something that can be improved. At my job, we always have a boatload of tickets with improvements that we want to do. But time is limited and you have to pick your battles. If the TODO doesn't cause a bug, and isn't necessary for a feature to work... Why bother fixing it? If a TODO has been there for 13 years and nobody has actually needed to fix it, then the fix was never necessary in the first place. The shortcut was the right solution, as obviously it got the job done and took less development effort than a "proper" solution. Only build what you need, and improve/extend as necessary.
@@JZStudiosonline Ours has run for more than 20, and occasionally i find stuff from 2004 that's still waiting for completion. These are colossal projects. You'd think that only because you don't work on it yourself.
@@wouf_ It is dude. They are using in-house propeitery game engine. Which probably hasn't been updated in god knows how many years and pair this with the fact that new people who are also working on the game don't know the documentation of the engine properly. So yeah it's special and not in a good way. It's basically a fuck fest going on over there at the DEV studio. LMAO
1:43 TODO - this makes shit really slow but without it it will crash As a fellow programmer, that's the most relatable thing I've read all week. God bless those poor devs at Rockstar.
@@blueeple I have this problem when opening map in Far Cry 5. It start with normal 60 fps, then every few second it will lose fps one by one... so maybe ubisoft devs did implement code like yours)
That function must be left over from GTA3 I remember that exact thing happening. When your car's doors are blocked on all sides you just teleport on the roof or a short distance away near the car.
@@kristof910k But that isn't meant here. Here it means twice the work, as he is recomputing something that was computed before somewhere else, but accessing it would require more work on the developers part
@@cracked21 work, especially in game and engine dev is usually referring to the amount of cycles needed to run a specific section of code. Double the work means the computer has to do double the amount of cycles for something. They're basically saying, it could run faster, but they just don't care.
@@ze_rubenator Reinterpret cast is ok, don't be brainwashed by modern C++ people. Just because the world is full of idiots that don't know how when and why use this doesn't mean it should never be used. That code is pretty scary though.
Its actually a good bug detector. If theres a fixed reason why it should never have more than 4 shows at once, it causing a crash should highlight an oversight elsewhere.
unironically, this video is a very good lesson on how to do code comments, not to explain the code itself, but why the code exists in the first place and what to do with it, because half decent code explains itself anyways. these people are elite developers no joke.
Actually, code comments are just there to complain, apologise to future developers and occasionally write a political manifesto - probably about why it's morally justifiable to kill your boss.
I wonder if he was talking about the sun inside the game, or the sun in real life. My guy probably hadn't slept in 3 days and was on his 52nd cup of coffee trying to hit a big deadline.
@@narrativeless404 pretty much, yeah. they've probably been building on the same codebase for every new GTA. You can tell because a lot of the module names in the GTA 3 codebase start with the "C" prefix. "CVehicle", "CImagePixelType", "CBaseModelInfo", "CAssetRef", "CEntityFlags", etc. I see those same names here.
after watching this i have a slightly better idea how GTA Online loading code ended up being accidentally quadratic and with a linear search through a hashmap in a hot loop
Looks like this is the code from the real game engine. IIRC the loader is a separate team altogether (not to bash them, the poor souls) and I doubt it has comments that are this helpful.
@@louroboros Didn't we, like; got the full source code? Everything is supposed to be in there i suppose, and that stupid glitched linear search as well Because otherwise we wouldn't be able to recompile GTAV
@@mortal_aethr there was a write up about how a guy sped up loading time to GTA online by 70%. Turns out that when loading to GTA online, the game was doing a bunch of completely unnecessary work, and after media started reporting, rockstar finally took notice and fixed it. It was a really simple mistake that caused some people to have loading times up to 8 or 10 minutes, and it was there for most of the lifetime of the game. It's unreal that this wasn't caught earlier
I hate it. In Angular/Typescript I had to start changing all requests to "Post request" instead of put or delete just to get the red line to go away, even knowing full well it was supposed to be a put or delete request because I wrote the fucking backend API myself and tested it myself on Postman.
You can control how strict the linter is in your project - there’s certainly a way to prevent the syntax warning without changing the HTTP method of your api call.
@@TheOriginalPyroBEAST I know it's been 2 months, but I've swapped to Alpine.js and am using a router for it called pinecone router and it's so much better than Angular. Pretty similar to Angular's HTML syntax with the ng-for and ng-if in the html but it uses x-for and x-if/x-show and other things. And it doesn't use the typescript or need any fancy compilers and linting. Just one HTML page and a bit of JS and CSS. Best front end I've ever used.
@@maximumcockage6503 I think you have an skill issue. Why Angular will force you to change your request to POST? Angular has a HTTP PUT method. You just need the proper return type for it to work.
0:32 properly emphasizes the war between artists going HAM with their creativity vs programmers having non-zero awareness about reality of implementing stuff in the actual product.
properly emphasizes the war between artists having zero awareness about reality of implementing stuff in the actual product without going HAM with creativity vs programmers not talking to any other discipline before deciding on things that will effect the entire project. :D
I am the only sysadmin at a company of like 300 people. And I am basically fresh out of school. This is exactly my mood every other day. Id this fails, I am fucked
@@Name-tn3md gameplay -- yes, source code -- no. PS4 uses x86 architecture, PS3 used it's own Cell architecture. It is absolutely different architecture to write the source code on.
@@scrambledmandible No That looks like a terrible advice Most variables and method names are just incomprehensible and all comments do is just complain about how shitty the code is
@@narrativeless404 nothing funny, those dumbass put +50GB of useless stuff in this game, they know nothing but add some shitty models and textures for the eyes of the kids. With 50GB, you can create another GTA 5.
0:39 That quote is taken directly from my project m0d-s0biet-v-Redux. You can even see it says ~gir489 after it, it is in the source code listed as project ATK-003. or Attack 3. They were using it to see how well they could defend against attackers (modders). Eventually, they just stopped using codebases as unit tests, and just implemented Arxan directly to defend against modders.
Sobeit was the og of GTA mod menus, i wish GTA 5 mod menus has spider cars function like Sobeit, it was wild trolling freeroam servers on SA-MP driving above the ceiling inside tunnels
Wouldn’t be surprised if some of these comments date back to GTA3 I once worked on a popular music game featuring heros and guitars, which was just one in a long chain of hacks piled on to the engine of a popular skateboarding game engine year after year. Plenty of random skateboard references everywhere, but I don’t remember reading any comments.
Yes about 2.1 billion is the max for 32 bit signed integer. They're smart because they cap the money to that number otherwise it would overflow and go back to -2.1 billion dollars and you'd end up in a massive debt ☠️
@@lizardpeter I don’t know where to download it safely. Everytime I ask someone who claims they have it, they don’t answer. Part of the reason I low key think it’s fake. I’ve seen a bunch of people say they have it, but not a single person say the actual place they got it from.
@@Nick-kb2jc Probably a torrent site or the dark web. And yeah, you can’t be sure it’s safe. Just don’t execute anything. The raw code itself should be fine.
@@unoriginalperson72probably a big call to make but I think rockstar probably takes bug squashing more seriously than any other studio and that's commendable. I believe they literally spend a year looking for bugs and performing polish at the end of their dev cycles now
The more I watch this the more I respect engineers in general. We're walking on or in this case playing on what overworked brains built and I think they're still unsatisfied with what they built 😂
Yeah as a SWE its like this all the time lol. part of it is time crunches, part of it is your brain just didnt think of the best solution that day and then you go back months later and are like damn, i should change it but now i got this other pile of stuff to do. Technical Debt :(
I haven't coded a single line in my life but I can absolutely relate to the "fuck it, it works. I have no idea how or why but it does and that's good enough" phase of exhaustion at work.
My journey through game development: Discovering skyboxes for the first time while noclipping in Unreal 1 back in the day: "Oooh, I think I understand how this works now. That's so cool; that's like... space magic." Learning to code for the first time: "How do people do this? How did someone figure out how to make any of this work? It's like... computer magic." Having launched a game on Steam: "There is no magic. There is no god. There is only jank that somehow works and you don't remember why, and you're afraid to refactor it in case it stops working entirely."
Keep in mind, gta 5 was also developed on the ps3, which had the craziest hardware I've ever seen on a video game platform, which made it super efficient, but extremely batshit crazy to actually understand and work with.
@@FLMKane that is why I mentioned in physics the cell processor is still being used. To us gamers it’s not used because devs don’t want to go through the process of learning different tech. Yes our computers in today’s ages are great but not on the supercomputer level. Amds & Radeon’s, are mostly used in a commercial setting meaning its commercial use. CERN is most processed by cell processors and other cell like chips. Which is most privately used in the science communities. The cell has been upgraded over the years and was built faster stronger it’s just that Sony and Microsoft chose the jaguar x86 chip sets instead of going with the cell like processor.
@@rayojordan2838 I actually have experience in computational mechanics and no we no longer use 32 bit processors. That said, I wish IBM hadn't fumbled the ball with marketing PowerPC chips. It's an incredibly good design.
Watching this makes me feel so much better about my coding skills so far. I do stuff and it works awesome sometimes. Then others I’m doing the same thing for hours, or two days and have no idea what is wrong or why. The life of solo development is ripe with strife.
@@michuXYZ depends, AAA games are split in parts so changing one thing is probably around 1-2 minutes. The whole project at once takes way longer probably
1:19 That little specific part being public in the middle of everything else looks like some one day just said "fuck it" and just made what he needed public and hope it won't break anything else 😂
@@r6scrubs126 but it means it could be used in something else on the future by attempting to change its value, breaking other things attached to those parts if they were never intended to be changed like that in the first place
@@r6scrubs126 Yeah it can, if they are using reflection features of the programming language to invoke a private method specifically, that code would break if you changed the signature to public.
I love videos like this. I enjoy seeing the inner workings of video games, and how dev teams communicate with each other. If it’s one thing I’ve learned, it’s that coding for a game as big as GTA is stress inducing, and some just throw code at the wall and see what sticks. If it doesn’t stick, fix it until it does.
@@zaremol2779that comment doesn’t appear anywhere in the source code and you can disprove that the coconut image does not keep the game stable by just deleting your textures directory and the game runs perfectly fine, just without any textures
I've done unspeakable things as well. One time for my capstone project we had to make an S3 client in rust to upload a html report generated from some data (we were doing a data science thing for a mining company). Damn client couldn't work and we were getting back errors from localstack which was an aws emulator we were using. It was literally the night before the project was due so we just said fuck it, and made the app execute terminal commands to use the aws cli to upload the damn file.
I'm learning programming right now, and this reminds me that, on a large enough scale, all software developers are just earnest fools trying to figure out how to make this shit work at the end of the day in a way that make the Muggles go "wowwwwwwwww" without exploding the sun. Or, in Rockstar dev terms, "gone and fucked the sun up."
nah these guys aren’t earnest fools lmao. If anything the content of this leak indicates just how intelligent rockstar devs are. Writing C++ this heavily optimized in a work environment like rockstars is extremely challenging, it causes hiccups like the code that is commented in this video but all in all there’s really no comparing beginning programmers to people this proficient in C++
@@addmix i dont know what is inside (not game dev), but if game core is ok, but some missions and mechanics are full of crutches and hacks - its a good code base where you can onboard and progress pretty fast, but in some projects you will need to find dev, who wrote that shit and ask how it works.
@@БеловБорис-у4щ I don't know if i'm speaking nonsense, but the way Online works in GTA 5 seems to be alot of hacky stuff, bunch of tricks and lots of googling involved, the server being client sided somehow (which explains why modders can easily alter whatever the heck can happen in the session), the many different buttons just to do stuff, like sometimes at some missions, the game asks you to press E, or F, or Q to interect with mission objectives, it feels like the thing is scripted differently on each DLC rather than importing from a base of another code, or the vehicles special ability, there is always 3 inconsistent buttons, sometimes boost is E or X, missiles / machine gun is space or mouse click, or jump ability / vtol is either G or H.
@@FilippoCalipp0 I meant that if core code (api for missions, core mecanics etc) works fine its not a seriouse problem to overwrite a few thousands of crappy code for some feature. Fast development before release could bring more value than costs extra week of development years later.
@@TheTransitmtl usually objects have a public interface, where outside code uses the object's methods to make the object do stuff, but the object also has some private internal state or data, which can only be changed according to some rules that only the object itself knows about, so outside code shouldn't modify it directly. This is called encapsulation. If this state is made public, then the outside code can freely modify it and it's very likely that something will break because the state will change at times when we don't expect it to, or to the values we don't expect, and it won't necessarily be easy to spot. State that is supposed to be private leaks and it's very easy to make some stupid mistake
@@BGTech1It's not that easy to find a new variable name on a project that big... If you take a name too simple, you are at risk that something conflic at some point, that a name too long and it became annoying to type and difficult to read... Edit: You have some cool videos on your channel 😁
I was thinking the same thing. Maybe for those type of missions that have 5+ stars for extra tension, but the game engine isn't actually spawning any extra cops + any cops around are less aggressive than usual, for the sole purpose of letting you complete the mission.
Writer: “I wish I could put the f-word ten times more often in that game but they wouldn't let us release that …” Devs: “I think I might have a solution”
I once programmed a Lego Mindstorms robot to detect brick colors via an ambient light sensor. I said it was "theoretically perfect and should never fail." It just ran into walls shouting "RED RED RED RED."
All of that wasn't very bad. These types of problems always exist in projects as large as GTA V, doubly so when they have a specific release schedule and take several years to make.
To everyone either starting or wanting to start a career in software. DO NOT GO IN GAMING. You will make less money, wirk more hours and be treated wirse than almost any other CS career
The fact, going by this, that changing something can fuck up the entire game in a single go, thats actually insane, even my shit pile of code wouldn't do that
"Why the fuck is this public?"
Rockstar rn
LMAO
Lol golden comment right here 😂😂
Oh snap.
the dev meant the public keyword inside the code
@@KirksCountDownsMI’m lazy and not gonna Google how many Os are in wooosh
I can’t tell if rockstars developers are more or less insane than Valve’s developers
Probably around the same amount of insanity
all developers are insane, just comes with the job
More of course.
This is just a developer thing. If I had a nickel for every time I've written some code and immediately said "this is the dumbest fucking shit I've ever made," I would be able to retire.
because we think- and often KNOW that there is a better solution out there, that we just cant comprehend rn@@PhantomTissue
"But it should never fail" - every programmer be like after making a small change
the next thing you know, there are 5 shows at once, and the game crashes
@@monad_tcp Only 5? It'd more likely be 500 shows at once somehow that runs simultaneously.
@@keatonwastaken Nah
Imagine the in-game TV actually glitching this much, because i can't 💀
Me when pushing to prod with no code review or testing
If it it works, don't touch it, or it may never work again.
seeing "TODO" so many times in a production build that has been worked on for like 13 years truly authenticates this gem
This may be a surprise to those not working on code, but in big productions there's always something TODO, half complete features and so on. The UI might be clean, but it's always somewhat dirty in the back.
like your mom@@ericcricket4877
@@ericcricket4877 Sure, but after 13 years of updates and literal billions of dollars, you'd think they'd fix some shit. Like the longass loading times that were fixed by just some guy and not R* noticing it was being really stupid and scanning every file or code line or whatever.
@@JZStudiosonlineNot to excuse the loading times, that was a travesty. But in general: why do those TODOs matter? There is always something that can be improved. At my job, we always have a boatload of tickets with improvements that we want to do. But time is limited and you have to pick your battles. If the TODO doesn't cause a bug, and isn't necessary for a feature to work... Why bother fixing it? If a TODO has been there for 13 years and nobody has actually needed to fix it, then the fix was never necessary in the first place. The shortcut was the right solution, as obviously it got the job done and took less development effort than a "proper" solution. Only build what you need, and improve/extend as necessary.
@@JZStudiosonline Ours has run for more than 20, and occasionally i find stuff from 2004 that's still waiting for completion. These are colossal projects. You'd think that only because you don't work on it yourself.
Writing a single function for this game must be the scariest fucking thing in the world.
No cap, specially considering that RAGE is a 20 years old engine with tons of legacy and undocumented code.
Writing a new function is easy and fine. The pain is changing already existing ones and that will affect other parts of the code.
what are yall saying lmao its just like coding a game there is nothing special here 🤷♂🤷♂
@@wouf_ It is dude. They are using in-house propeitery game engine. Which probably hasn't been updated in god knows how many years and pair this with the fact that new people who are also working on the game don't know the documentation of the engine properly. So yeah it's special and not in a good way. It's basically a fuck fest going on over there at the DEV studio. LMAO
@@wouf_ just a couple million of lines of code ez stuff
1:43 TODO - this makes shit really slow but without it it will crash
As a fellow programmer, that's the most relatable thing I've read all week. God bless those poor devs at Rockstar.
Same bro all I did was use a different render step for a function and caused the game to slowly lose fps every 20 secs
I pushed a fix like this earlier today
@@blueeple I have this problem when opening map in Far Cry 5. It start with normal 60 fps, then every few second it will lose fps one by one... so maybe ubisoft devs did implement code like yours)
@@zaicol850 Plot twist: He works in Ubisoft and wrote the code.
@@zaicol850 yea but in reality I put a render step in a render step and that crashed the engine then I made two then that happened 💀
Michael finally got the white collar gig he always wanted. I’m so proud of him
If Michael actually got a job in that Life Invader mission and continued to fix Ricky's code.
Yes, this is how I like to imagine Michael would be like if he worked at the Lifeinvader office.
1:29 This one just makes sense. If all doors are blocked, we can't have the player still stuck in the car, so teleport them out.
Sleeping dogs did it better. The character breaks through the windshield.
@@Redwan777I wonder if it will be like this in GTA6?
@@Redwan777what if windshield is blocked?
That function must be left over from GTA3 I remember that exact thing happening. When your car's doors are blocked on all sides you just teleport on the roof or a short distance away near the car.
@@Barmemthen the character teleports out, seriously you have to be REALLY going out of your way to block all doors AND the windshield.
“Double work, but at the moment I dont give a shit” did i write this code ? 😂
what does double work mean in this context?
@@cracked21 "double" is a variable type in programming
EDIT: my bad it's not that kind of double actually lol
@@cracked21 I'm assuming the code is doing double the work than it needs to be, i.e. being inefficient af.
@@kristof910k But that isn't meant here. Here it means twice the work, as he is recomputing something that was computed before somewhere else, but accessing it would require more work on the developers part
@@cracked21 work, especially in game and engine dev is usually referring to the amount of cycles needed to run a specific section of code. Double the work means the computer has to do double the amount of cycles for something. They're basically saying, it could run faster, but they just don't care.
"I won't even begin to claim that I know what the f**k is going on here."
The veracity, the audacity
Did you read the code it was commenting on? "Unwarranted chumminess with the implementation" doesn't come near it.
@@AdrianColley I felt personally attached to this one, considering I myself have wrote something similar in the past 🤣
There's a reinterpret cast, a.k.a. a shining beacon that signifies "shit's fucked." No context needed.
You can tell the programmers are pretty tight with the writers.
@@ze_rubenator Reinterpret cast is ok, don't be brainwashed by modern C++ people.
Just because the world is full of idiots that don't know how when and why use this doesn't mean it should never be used.
That code is pretty scary though.
"someone gone and fucked the sun up" sounds like a line from a really lighthearted cosmic horror story
Aztec lore
"...but it should never fail"
Famous last words
_GTAV.exe has stopped working_
"Worked on my computer."
that HR call next morning
I now need to try and get 5tvs in one place to play channels
Its actually a good bug detector. If theres a fixed reason why it should never have more than 4 shows at once, it causing a crash should highlight an oversight elsewhere.
unironically, this video is a very good lesson on how to do code comments, not to explain the code itself, but why the code exists in the first place and what to do with it, because half decent code explains itself anyways.
these people are elite developers no joke.
That approach works better for higher level programming languages, not so much at lower levels
@@TragicGFuel well for low level code (anything lower than c++) you can always just give up.
We learn from these videos that you are not supposed to explain the code in comments, but just to comment how fucked the code is
Actually, code comments are just there to complain, apologise to future developers and occasionally write a political manifesto - probably about why it's morally justifiable to kill your boss.
true
I think there is more strong language in code than in the game itself
Fr
When you don't have to worry so much about the virtue signalers and narcs, it allows you to lower your defenses and be yourself
@@ValorQuestStudios Hoping GTA 6 doesn't cave to that shit
@@d1ssolv3rRockstar's whole thing is that they're offensive. If they don't do, people will be very disappointed.
@@sylverlight You never know in the 2020s haha
"these must be aligned, keep them here to stop the compiler from bitching" as a coder that is true 😂
The amount of "shut up " comments that I wrote is unreal. It's definitely a big part of the culture of programming
Remember, the compiler is always right, linters are a different beast, but still...
"warning: undefined re-" SHUT UP
@@skillaxxx Just write your own C++ compiler that doesnt bitch about non-issues
ion get it what does that mean from compiler from bitchin
1:32 is beautiful, as its clearly some incredibly specific and odd state an NPC got into, and they've just wrapped an if statement around it.
seems to just be basic npc state checking so they don't talk while also being thrown around and screaming
i.imgur.com/jSCFImU.png
I kinda feel bad for the NPC that got its own code to unstuck itself.
Probably Goat Simulator NPC with ragdoll
"Someone gone and fucked the sun up" sent me.
Lightning and lightning-related shaders are hard to get satisfied with, so i felt the pain
@@0x0michael sun is always a formless blob in gta games
@@ivan4087 And in most other games
@@rykehuss3435but why $265 million game still have that sun, its strange
I wonder if he was talking about the sun inside the game, or the sun in real life. My guy probably hadn't slept in 3 days and was on his 52nd cup of coffee trying to hit a big deadline.
you know it's a different era when there's a reference to 9gag in the code comments
There was time when most memes online were 9gag watermarked. Website is still on but I saw barely any memes, most of it was political nonsense.
@@Cat_in_The-Box9 gag died around 2017. Since 2016 it started to crumble and I effectively gave up on it in 2018.
GTA V was being developed at the height of popularity of 9gag (2011-2013).
9gag was never alive, it was a trash bin for all the dying memes doomed to become popular
@@赴大家惡化不得好死時 copium much?
1:25
really love the unhinged variable name: "bPoliceDontReallyCare"
This variable is also in the GTA 3 source code from 2001. Cool to see how some things have not changed in over 20 years.
realistic coding lmao
@@Nick-kb2jc
Yep, it seems like GTAV is just GTA3 with mods
@@narrativeless404 This is the saddest attempt I've witnessed at pretending to have coding knowledge lol
@@narrativeless404 pretty much, yeah. they've probably been building on the same codebase for every new GTA. You can tell because a lot of the module names in the GTA 3 codebase start with the "C" prefix. "CVehicle", "CImagePixelType", "CBaseModelInfo", "CAssetRef", "CEntityFlags", etc. I see those same names here.
"le9gagmemeface"
Yup, that's some pre-2013 code right there.
Why?
after watching this i have a slightly better idea how GTA Online loading code ended up being accidentally quadratic and with a linear search through a hashmap in a hot loop
Looks like this is the code from the real game engine. IIRC the loader is a separate team altogether (not to bash them, the poor souls) and I doubt it has comments that are this helpful.
@@louroboros Didn't we, like; got the full source code?
Everything is supposed to be in there i suppose, and that stupid glitched linear search as well
Because otherwise we wouldn't be able to recompile GTAV
does anyone have a normie translation of this
@@mortal_aethr there was a write up about how a guy sped up loading time to GTA online by 70%. Turns out that when loading to GTA online, the game was doing a bunch of completely unnecessary work, and after media started reporting, rockstar finally took notice and fixed it. It was a really simple mistake that caused some people to have loading times up to 8 or 10 minutes, and it was there for most of the lifetime of the game. It's unreal that this wasn't caught earlier
@@Bravo-oo9vdNah some other guy outside R* fixed it, then R* paid him 10K
"Keep here so the compiler doesn't bitch" real as hell
I hate it. In Angular/Typescript I had to start changing all requests to "Post request" instead of put or delete just to get the red line to go away, even knowing full well it was supposed to be a put or delete request because I wrote the fucking backend API myself and tested it myself on Postman.
You can control how strict the linter is in your project - there’s certainly a way to prevent the syntax warning without changing the HTTP method of your api call.
@@TheOriginalPyroBEAST Yeah I eventually turned the linter off all together and just write like it's Javascript at this point lmao
@@TheOriginalPyroBEAST I know it's been 2 months, but I've swapped to Alpine.js and am using a router for it called pinecone router and it's so much better than Angular. Pretty similar to Angular's HTML syntax with the ng-for and ng-if in the html but it uses x-for and x-if/x-show and other things.
And it doesn't use the typescript or need any fancy compilers and linting. Just one HTML page and a bit of JS and CSS. Best front end I've ever used.
@@maximumcockage6503 I think you have an skill issue. Why Angular will force you to change your request to POST? Angular has a HTTP PUT method. You just need the proper return type for it to work.
0:32 properly emphasizes the war between artists going HAM with their creativity vs programmers having non-zero awareness about reality of implementing stuff in the actual product.
Timothy Cain, the creator of Fallout has a video on his UA-cam channel talking about this exact thing.
@@Nick-kb2jclink?
@@Clarity-808 probably from GDC?
properly emphasizes the war between artists having zero awareness about reality of implementing stuff in the actual product without going HAM with creativity vs programmers not talking to any other discipline before deciding on things that will effect the entire project. :D
@@MemoriesLPNope, Tim Cain has a personal channel.
1:58 - "If this fails, we're fucked" that's the most relatable IT thing when working with the servers.
Forrealz as a sysadmin lol that’s us relying stuff to eachother lol😂
I am the only sysadmin at a company of like 300 people. And I am basically fresh out of school. This is exactly my mood every other day. Id this fails, I am fucked
@@lucariolps277 Try being the only one and self taught
God IMAGINE the commentary on the source code for the ps3 version, coding on the ps3 was a total nightmare!
That ProDG comment makes it seem like this is the PS3 source, since that was the debugger the PS3 development kits used
@@studebaKer Woah! I thought it was just a witty comment or something.
Lol PS4 version is just expanded ps3 version
@@Name-tn3md gameplay -- yes, source code -- no. PS4 uses x86 architecture, PS3 used it's own Cell architecture. It is absolutely different architecture to write the source code on.
Half of this is just what a regular programmer thinking in written form. 😂
I think more programmers should just go ahead and write those down, if nothing more than hilarity for those perusing
@@scrambledmandible No
That looks like a terrible advice
Most variables and method names are just incomprehensible and all comments do is just complain about how shitty the code is
@@narrativeless404 Well I mean be reasonable about it
@@scrambledmandible This is more like : "what not to do unless bored af"
@@narrativeless404 i mean its not supposed to be EVEN seen
2:10 Just in case anyone forgot that this code was written over a decade ago
even the programmer lives in GTA V
Lmfao fr
@@narrativeless404 nothing funny, those dumbass put +50GB of useless stuff in this game, they know nothing but add some shitty models and textures for the eyes of the kids.
With 50GB, you can create another GTA 5.
0:39 That quote is taken directly from my project m0d-s0biet-v-Redux. You can even see it says ~gir489 after it, it is in the source code listed as project ATK-003. or Attack 3. They were using it to see how well they could defend against attackers (modders). Eventually, they just stopped using codebases as unit tests, and just implemented Arxan directly to defend against modders.
Sobeit was the og of GTA mod menus, i wish GTA 5 mod menus has spider cars function like Sobeit, it was wild trolling freeroam servers on SA-MP driving above the ceiling inside tunnels
Yup, you're right!
wait, am i missing something? i don't see any text that says ~gir489
@@b1txh Any names were cropped to remove references to specific individuals, but it was indeed in there.
@@kpjVideo ah i see, thanks! didn't mean that i don't believe anyway, just curious
*_" Why did they hire a coder that can't run an antivirus software?! "_*
*_" I guess it was the weather. "_*
LMFAO@@AJRacer522
" *_Bad luck I guess._* "
It's the economy. It's in shambles 😂
Antivirus software slow down compilation speeds drastically, even by factor of 2x. so its better to keep it disabled.
Wouldn’t be surprised if some of these comments date back to GTA3
I once worked on a popular music game featuring heros and guitars, which was just one in a long chain of hacks piled on to the engine of a popular skateboarding game engine year after year. Plenty of random skateboard references everywhere, but I don’t remember reading any comments.
True, I was the hero
I think I saw someone close to me say something slightly close to what you're describing, lmao
Why the fuck would a guitar 'savoir' game run on a skateboarding game engine?
@@ratgreen Because they're both just DDR for dudes?
@@ratgreenGuitar Hero was worked on by Neversoft, the same people that made the Tony Hawk Pro Skater games.
0:12 Fun fact this number is the maximum number for 4 bytes storage or integers that's why he is checking that it didn't surpass it
Ah nice. Love interesting facts like this, thanks for sharing. I wish we could see more of the code to analyze it further.
Yes about 2.1 billion is the max for 32 bit signed integer.
They're smart because they cap the money to that number otherwise it would overflow and go back to -2.1 billion dollars and you'd end up in a massive debt ☠️
@@Nick-kb2jcWhy can’t you? The whole thing leaked.
@@lizardpeter I don’t know where to download it safely. Everytime I ask someone who claims they have it, they don’t answer. Part of the reason I low key think it’s fake. I’ve seen a bunch of people say they have it, but not a single person say the actual place they got it from.
@@Nick-kb2jc Probably a torrent site or the dark web. And yeah, you can’t be sure it’s safe. Just don’t execute anything. The raw code itself should be fine.
This is exactly what I expected
This shit is always the best out of any source code leaks
1:32 should have gone with the Bethesda approach and kept it
See the difference between Rockstar and Bethesda is that Rockstar at least attempts to fix them while Bethesda just hopes it fixes itself
@@unoriginalperson72probably a big call to make but I think rockstar probably takes bug squashing more seriously than any other studio and that's commendable. I believe they literally spend a year looking for bugs and performing polish at the end of their dev cycles now
It just works
1:18 R* Legal & PR rn
1:43 is about the loading intro screen
Who would’ve thought, GTA V was coded by *the characters of GTA V* 😂
The more I watch this the more I respect engineers in general. We're walking on or in this case playing on what overworked brains built and I think they're still unsatisfied with what they built 😂
Yeah as a SWE its like this all the time lol. part of it is time crunches, part of it is your brain just didnt think of the best solution that day and then you go back months later and are like damn, i should change it but now i got this other pile of stuff to do.
Technical Debt :(
I haven't coded a single line in my life but I can absolutely relate to the "fuck it, it works. I have no idea how or why but it does and that's good enough" phase of exhaustion at work.
programming is like if a prankster tried to learn math
yes
Emphasis on “tried” - a programmer
programming is like medicine. you might think you know what you are doing but most of the time you dont.
and yes I hate doctors
when a prankster learns programming you get Cat-Mario and the I Wanna Be The Guy series among others
1:23 the variable "bPoliceDontReallyCare" is so funny to me for some reason lol
it probably is just set to true during certain missions where you can't get a wanted level. It is kinda funny that that's what they named it, lol.
Everything sounds like something Michael would actually say
sheesh, if thats what ended up in the code imagine what the git log must look like ...
My journey through game development:
Discovering skyboxes for the first time while noclipping in Unreal 1 back in the day: "Oooh, I think I understand how this works now. That's so cool; that's like... space magic."
Learning to code for the first time: "How do people do this? How did someone figure out how to make any of this work? It's like... computer magic."
Having launched a game on Steam: "There is no magic. There is no god. There is only jank that somehow works and you don't remember why, and you're afraid to refactor it in case it stops working entirely."
Every time a game's source code leaks, I'm always excited for when one of these videos inevitably comes out
Keep in mind, gta 5 was also developed on the ps3, which had the craziest hardware I've ever seen on a video game platform, which made it super efficient, but extremely batshit crazy to actually understand and work with.
The cell is still probably as powerful as most computers now a days.
But because of its bottlenecks it’s used in semi - physic uses…
@@rayojordan2838uh... No? The "cell" was just a 64 bit PowerPC chip. And they had 8 of them. Powerful for the time but also aged very fast
@@FLMKane that is why I mentioned in physics the cell processor is still being used. To us gamers it’s not used because devs don’t want to go through the process of learning different tech.
Yes our computers in today’s ages are great but not on the supercomputer level. Amds & Radeon’s, are mostly used in a commercial setting meaning its commercial use.
CERN is most processed by cell processors and other cell like chips. Which is most privately used in the science communities.
The cell has been upgraded over the years and was built faster stronger it’s just that Sony and Microsoft chose the jaguar x86 chip sets instead of going with the cell like processor.
@@rayojordan2838 I actually have experience in computational mechanics and no we no longer use 32 bit processors.
That said, I wish IBM hadn't fumbled the ball with marketing PowerPC chips. It's an incredibly good design.
@@FLMKane uhm actually it had a single powerpc core and the 8 cores were SPUs (one disabled, one for the OS)
I imagine one day, source code for reality gets leaked and we will probably see the exact same comments.
That'd explain half of the world's problems
"I don't know what the appendix does but if I delete it the humans come out deformed"
"Just fucking kill me" sums up most of my coding experience
i want more. i was waiting for this to come out ngl!
1:02 “do jack shit” lmao
Art of writing efficient comments in code to help other coders
There will be more swears in GTA 6's code comments than the campaign.
Watching this makes me feel so much better about my coding skills so far. I do stuff and it works awesome sometimes. Then others I’m doing the same thing for hours, or two days and have no idea what is wrong or why. The life of solo development is ripe with strife.
this is the way.
Watching this makes me feel good that i didnt get into programming
The tone of the code matchs the tone of the game. Brilliant.
All game code has this tone though. There's been source code of kids games with the same swearing lol
Can't believe we've all had this shit in our GTA V copies for years! 😂😂
Like there is another world goin on under the hood 😂😂
Sorry for ruining the fun but comments are ignored by the compiler
@@Wujek_Foliarz What doesn't change the fact that comments are still there inside source code
@@michuXYZ yeah but not on the discs
@@Wujek_Foliarz Aaaaah yeah thats a fact, how do you think, how long does it take to compile a source code as huge as gta v?
@@michuXYZ depends, AAA games are split in parts so changing one thing is probably around 1-2 minutes. The whole project at once takes way longer probably
1:19 That little specific part being public in the middle of everything else looks like some one day just said "fuck it" and just made what he needed public and hope it won't break anything else 😂
Making something public wouldn't ever break something else that has already been written
@@r6scrubs126 but it means it could be used in something else on the future by attempting to change its value, breaking other things attached to those parts if they were never intended to be changed like that in the first place
Probably talking about the public attribute which violates OOP principles
Gigachad makes all public
@@r6scrubs126 Yeah it can, if they are using reflection features of the programming language to invoke a private method specifically, that code would break if you changed the signature to public.
I love videos like this. I enjoy seeing the inner workings of video games, and how dev teams communicate with each other. If it’s one thing I’ve learned, it’s that coding for a game as big as GTA is stress inducing, and some just throw code at the wall and see what sticks. If it doesn’t stick, fix it until it does.
0:18 I bet this code is still better written than whole Yandere Simulator code.
To be honest this isn't even that bad, certainly not as bad as TF2 source code comments. Like I've had way worse comments in my own code comments lol.
cue coconut.jpg
@@zaremol2779that comment doesn’t appear anywhere in the source code and you can disprove that the coconut image does not keep the game stable by just deleting your textures directory and the game runs perfectly fine, just without any textures
@@zaremol2779
TODO - this feel like shit
I've done unspeakable things as well. One time for my capstone project we had to make an S3 client in rust to upload a html report generated from some data (we were doing a data science thing for a mining company). Damn client couldn't work and we were getting back errors from localstack which was an aws emulator we were using. It was literally the night before the project was due so we just said fuck it, and made the app execute terminal commands to use the aws cli to upload the damn file.
I'm learning programming right now, and this reminds me that, on a large enough scale, all software developers are just earnest fools trying to figure out how to make this shit work at the end of the day in a way that make the Muggles go "wowwwwwwwww" without exploding the sun. Or, in Rockstar dev terms, "gone and fucked the sun up."
Muggles? Didn’t know this was HP
especially game development, where you can't just the print the result of something in a console to see if everything worked correctly.
i think every proffesional is potrayed as more calm and collective than they really are, every human is winging it through life
nah these guys aren’t earnest fools lmao. If anything the content of this leak indicates just how intelligent rockstar devs are. Writing C++ this heavily optimized in a work environment like rockstars is extremely challenging, it causes hiccups like the code that is commented in this video but all in all there’s really no comparing beginning programmers to people this proficient in C++
Didn’t know what was being told at first until I knew it’s devs telling other people to not fuck with the code 😂
“If this crashes we’re fucked”..
The amount of times I’ve thought this in my professional career is astounding.
"Someone gone and fucked the sun up"
1:23 PoliceDontReallyCare
The code is very human
Their coding is unironically on brand with games/story’s they make.
Unhinged? This is normal programmer behavior
maybe, in prison
@@MrSN99 you should check Valve's source code for TF2, it has much of the same stuff. it's not all that uncommon to see swears in code
It’s almost like these devs are apart of the universe they are creating 😂
"Why did I code here? Bad luck I guess..."
i like when devs leave notes like these in their code
1:18
> Why the fuck is this public
- Rockstar, 2023
yeah like releasing stupid source code even lead to something. never lead tp creation of any game
It was probably written in 2013 not 2023
@@Anti_Septikumno the joke is that it was leaked in 2023, as in why is the code public
Rockstar office culture hasn't changed since 2004. San Andreas object names were swear. Actually, whole game code could be swear on gta san andreas.
it has absolutely changed since 2013, the political climate doesnt allow for their early 2000's "culture" anymore.
@@ٴۥٴٴٴ you a snowflake
@@ٴۥٴٴٴ Yeah, but nobody cares about what they write into the source code
And if Rockstar would bend under the political bs, they are DEAD to us
Rockstar used to organize parties and trips to the strip club between devs
Lmao@@kwiky5643
As expected from a game as complex in nature as gta
nah bro this is all just bad code. Seems like there's not enough separation of engine and game
@@addmix i dont know what is inside (not game dev), but if game core is ok, but some missions and mechanics are full of crutches and hacks - its a good code base where you can onboard and progress pretty fast, but in some projects you will need to find dev, who wrote that shit and ask how it works.
@@БеловБорис-у4щ I don't know if i'm speaking nonsense, but the way Online works in GTA 5 seems to be alot of hacky stuff, bunch of tricks and lots of googling involved, the server being client sided somehow (which explains why modders can easily alter whatever the heck can happen in the session), the many different buttons just to do stuff, like sometimes at some missions, the game asks you to press E, or F, or Q to interect with mission objectives, it feels like the thing is scripted differently on each DLC rather than importing from a base of another code, or the vehicles special ability, there is always 3 inconsistent buttons, sometimes boost is E or X, missiles / machine gun is space or mouse click, or jump ability / vtol is either G or H.
@@БеловБорис-у4щ not really, bad code may work without flaws but as soon as a minor change has to be done, lots of the code has to be re-written
@@FilippoCalipp0 I meant that if core code (api for missions, core mecanics etc) works fine its not a seriouse problem to overwrite a few thousands of crappy code for some feature. Fast development before release could bring more value than costs extra week of development years later.
0:55 is the funniest
as a coder I really felt the public one
Why?
@@TheTransitmtl usually objects have a public interface, where outside code uses the object's methods to make the object do stuff, but the object also has some private internal state or data, which can only be changed according to some rules that only the object itself knows about, so outside code shouldn't modify it directly. This is called encapsulation. If this state is made public, then the outside code can freely modify it and it's very likely that something will break because the state will change at times when we don't expect it to, or to the values we don't expect, and it won't necessarily be easy to spot. State that is supposed to be private leaks and it's very easy to make some stupid mistake
@@Bravo-oo9vd By objects, I think you meant classes with public:, protected: & private: components. An object is merely an instance of the class.
@@Spyro-kt8gy By object i meant an instance of a class, with live data tied to that object, but yeah it applies to static methods and fields as well
Brother just check if it compiles after you change it to private. ffs
Least disgruntled game developer:
1:26 "bPoliceDontReallyCare" makes me wonder if this is for missions
Goofy method names and variable names are the best
@@BGTech1It's not that easy to find a new variable name on a project that big... If you take a name too simple, you are at risk that something conflic at some point, that a name too long and it became annoying to type and difficult to read...
Edit: You have some cool videos on your channel 😁
It’s for the wanted system. This variable is also in the GTA 3 source code from 2001.
I was thinking the same thing. Maybe for those type of missions that have 5+ stars for extra tension, but the game engine isn't actually spawning any extra cops + any cops around are less aggressive than usual, for the sole purpose of letting you complete the mission.
@@pierrotAI mean, encapsulation ?
Writer: “I wish I could put the f-word ten times more often in that game but they wouldn't let us release that …”
Devs: “I think I might have a solution”
Ned Luke's AI voice fit this so perfectly I can't even😭
As a developer, I've found developers who have left these comments to be very specific to the nature of the game itself.
I love them
This leak was truly a blessing.
Le9gagmemeface, GTA V truly is a game of its era.
Looks fun to be a developer at rockstar
I once programmed a Lego Mindstorms robot to detect brick colors via an ambient light sensor. I said it was "theoretically perfect and should never fail." It just ran into walls shouting "RED RED RED RED."
All of that wasn't very bad. These types of problems always exist in projects as large as GTA V, doubly so when they have a specific release schedule and take several years to make.
Level indices starting at 1 instead of 0 is a real crime though
I am pretty sure they code with cigarette in mouth and cursing after each puff
To everyone either starting or wanting to start a career in software. DO NOT GO IN GAMING. You will make less money, wirk more hours and be treated wirse than almost any other CS career
That is unless everything else is boring
i hate wirking and being treated wirse
I love how these werent meant to be leaked but they still wrote some unhinged stuff for their coworkers to laugh it off
Finally, a good use for AI voice synthesis!
I just realized I could work for Rockstar
just do it
have a very sharp c++
This was fantastic. Thank you for taking the time to do this.
"I don't think this really works, but fuck it call it anyway!" That is way too familiar XD
I’m surprised there’s no, “I don’t know why it doesn’t work before, but now I don’t know why it DOES work. GG.”
These comments sound like they are from a GTA world itself
the dude ragdolling in pain fucking shit up is killing me
I feel like only a fraction of these thoughts are written out because boy do I relate to them
The fact, going by this, that changing something can fuck up the entire game in a single go, thats actually insane, even my shit pile of code wouldn't do that
It is the most meta thing that the nature of comments resonates with the language and hostility of the game itself.
"But it should never fail" quote from script that just failed.
It's a miracle games come out at all, these people are very brave and brilliant