Hello, in this video we are going to cover what is object oriented programming. So I've got this little diagram here, and it says car, race car and truck. So they all are very similar and these arrows are pointing to this car. So if we let's say we're creating a racing game, and in there you can have the same not just cause so you could have two vehicles in general. So you can have motorbikes and you can have some sort of car, some sort of car essentially, they're all you know, a vehicle and they're gonna share common characteristics. common characteristics being they're gonna have wheels in you know, this case, obviously, if you go into other for vehicles, such as planes and boats, they will not really have wheels.
Obviously, technically a plane does have a wheel wheels as well, but it's not for the same sort of purpose. But you can, you know, modify that. So the vehicle class, in this case, when we have a car and a bike can be, can have wheels, but the number of wheels would depend on what type of vehicle you're creating, you can also have a speed variable, you could have functions to make the actual vehicle move could have in an acceleration variable, because the you know, a bike will accelerate different to a car. And obviously, different cars will accelerate, you know, get unique to each other. So with object oriented programming, you can have a vehicle class, and then you could have a car class that essentially inherits from it. And that will allow us to say we'll get all the properties of the vehicle.
No, no, no wheels, you know, this is gonna have some speed, acceleration, maybe some sort, all. Maximum Speed, it could have something to do with how much damage or take a bit crushing into a certain objects, all of these different characteristics and then we can modify it for that unique car. Now we could do something similar for vehicle because at the end of the day, they're very similar concepts of vehicle on a car. So we all have a vehicle, they all have a wheel, they all have you know, an engine, they all have no way of steering, etc. So with object oriented programming allows us to, you know, reduce the amount of code instead of duplicating the again and again, even if you're not doing inheritance, which again is slightly later topic for you know, later, you can still create optional classes. The benefit of doing that is the allows you to group common variables and functions together.
And by grouping them together, you can create objects of that class again and again and again and again. instead of you having to write the code for let's say, if you only have one type of car in there If you're going to have 100 of those calls existing at any one point in the game, don't have to duplicate the code again and again and again and maintain it. You can just create an object of it and get all of its properties get all of this functionality, and it's a lot easier. So we'll be diving right into that. Yeah, really looking forward to it. If you have any questions, feel free to pop me a message.
And as usual, I look forward to seeing you in the next video.