GTA3 Code Review: Weapons, Vehicles, Cops and Gangs

preview_player
Показать описание
Today, we'll review the source code for RE3– the reverse-engineered C++ source code for Grand Theft Auto III and Vice City. We'll look at the code for Pedestrians, Vehicles, Cops, and Gangs.
Рекомендации по теме
Комментарии
Автор

wow i wasn't expecting the code to be so readable, it's kinda common big projects have complex codes you can't follow along easily

caiocouto
Автор

This is so cool. I am currently learning C++ and always thought about how big projects are structured and certain things are implemented

JensN
Автор

Having one weapon class stacked with a huge switch case statement sounds bananas but the rest of the code looks pretty clean. This was really interesting!

IronEducation
Автор

This is really fascinating to look at in depth. I used to make mods for GTA 3 around 2002-2003, and was always hampered by the limits of the engine. I haven't been in that scene in years so I wasn't even aware of this project. Great video.

Nomadnetic
Автор

I am not even a C++ dev but this code was so easy to understand.

The variable naming and logic almost makes it feel like reading natural language.

"If x is y, do z" etc.

wlockuz
Автор

My dad used to hide this game from me when i was little.
Felt great to revisit this gem of a game in code form

raveschwert
Автор

As a CS student it is refreshing to see this code being so "simple" and kinda relatable to what we are tough in school. You would think in the real world they would use some crazy logic and algorithms. It is nice to see the switch and the if statements lol

FrankTalksFinance
Автор

I remember I got into programming because of GTA modding so looking at this kinda brings me back to those years. Great video

alexandermeneses
Автор

The degree of complexity is insane. Pretty good labeling for reverse engineering. Good video.

ArmchairRamb
Автор

I like it! Definitely will watch more as if there’s not enough code reviews have to be done at work. Maybe it’s your voice that makes it so satisfying)

Brmngm
Автор

5:58 The differences between the different kinds of cops doesn't warrant another layer of inheritance. They all have the same functionality except for different attributes like model, armor, etc. They all will use the same methods. I think it's very clean and a testament to how well written the base cop class is that they don't need to reimplement methods for each different cop type.

morkallearns
Автор

This is really useful content. I'm in Unity with C# but this is definitely giving me ideas of how to structure my code better and even how to "blueprint" my methods / variables to ensure I'm not forgetting functionality later on.

papafhill
Автор

What you are seeing is the labels given by the person who has reverse engineered the purpose of each "thing", not the original labels by the rockstar programmers. When you disassemble a binary file, you don't have the luxury of retaining any useful labels or comments (sometimes all you have are some unmolested cleartext strings e.g. names of some external .dll files) so you've just got to add your own labels as you discover what each structure does. One hell of a task, and they did a really good collaborative job on this one.

mikerope
Автор

11:21 I really like enums. There are so many little tricks you can do with them, they are simple to understand and lots of enforcement at compile time or static analyze.

pleasedontwatchthese
Автор

That enum trick to keep track of how many items you have in the enum was awsome!

RAPHAELSC
Автор

this is really cool. i’m learning how to code and it’s nice seeing how clean and easy to read this stuff is

WellActualllyyy
Автор

Code looks clear and nice! Thanks for analysis:)

lmallem
Автор

Really Cool !!! Keep making content like this, it's very interesting. Found myself watching the entire video surprisingly

LuisMunoz-fqde
Автор

This is an amazing example why code doesn't necessarily need comments to be perfectly readable

smlgd
Автор

I like the way they wrote it, they didn't go insane with the C++ OOP features, they do a very minimal implementation similar to how it would be done in C. I hate over engineered C++ stuff where there's a bunch of methods that are just one line.

TheGoodChap