I Made a GTA V Clone in 24 hours

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
grand theft auto 5 took three years and 265 million dollars to make and today my dumbass is going to try and recreate it in 24 hours with a 300 budget so let's see how far i get now the first thing i needed was an open level and somehow i managed to find this amazing 200 acre map and it was completely free and despite my gtx 3080 getting 40 fps on this map i just had to go with it it was too good the map had a lot of things that i needed uh the key one being it has roads which is important because i'm adding vehicles to the game and it also has foot pass which is really important because i need to code civilians that are going to like walk around the mat next i needed a character advanced locomotion system was free and despite being difficult to use it provided so much functionality i couldn't pass it up you get weapon animations mantling foot ik ragdolling and so many other features that i just had to have this pack next i dropped 100 on modern mail pack i want to make a customizable character so i need modular body pieces i started by adding them all to the existing blueprint logic and then i sync them all up using a feature of unreal engine called the master pose component i wanted to get the ui done as fast as possible so i googled the gta font i made a quick demo ui and then added some black outline to complete the look a single blueprint node then adds the ui to the screen all right so now i just simply switch the level i'm going to change the gum models to some custom ones from the fps weapon bundle and we're looking pretty damn good i didn't like the default menu from the locomotion system so i ripped this radial menu out of the smart ping system plug-in and then i turned it into a weapon wheel so that it's more like gta with vehicles being such a huge part of the game i decided to tackle these next vehicle variety pack was free and i had lots of different vehicles so i used that i use an invisible sphere to track whether the player is near the car and then pressing e controls the car when you control the car we simply make your character invisible and then spawn him back next to the car when you want to get out guys you know your boy is poor so i gotta shout out my course we teach you in 40 videos how to code games in c plus plus with unreal engine and at the end of it you have a game you can literally play on steam with your friends what is cooler than that we make vehicles weapons an inventory system and equipment system and loads of other stuff in there as well so if you're interested you can grab that for 25 over on my patreon thank very much back to the video i gotta admit things were going way too well my first robot came in the form of ai just getting civilians walking around the level turned out to be really tricky i decided to create a network of nodes that the ai would follow each node can lead to any number of other nodes when you see a fork in the road the ai will randomly choose one of the nodes to go to this happened to solve my issue of keeping the ai on the footpaths because by default the ai will just choose the shortest path so they'll end up walking through foliage and bushes and it looks ridiculous i added a little bit of randomization by mapping a random number to a random clothing piece super basic but it ended up working pretty well another huge problem is that with the 200 acre world generating navigation for the entire world is way too slow so we optimize this by only generating navigation around the actual character itself and of course it wouldn't be gta if you couldn't run people over with your car so you know i had to code that in as well i added some very simple firing logic that deals damage to whatever you hit i also created the particle systems myself so i was able to save some money now i needed npcs to support the damage system and also run away when you shoot at them i wrote some blueprint code that figures out the opposite direction from the player and then generates a random location to flee to here is the logic with debugging to show how it works civilians should drop cash when killed so i whipped up pickups for both cash and also ammo an invisible sphere will add to the player's money or spear ammo variable when overlapped now i simply hook up the npc's to drop a random amount of cash when killed [Music] so missions were going to be one of the hardest parts of the project in gta the player usually receives missions by either cutscene or by a phone call since i didn't have time to create cutscenes i decided quests would be given and updated using phone calls instead to make my phone system i took the best looking smartphone i could find and then i added some basic script to make it animate play audio and display the caller hey what's up man um look you remember the other day when we were hanging out in my driveway and you dropped your phone um i didn't realize but you left like a giant crater in the ground like you've completely destroyed my driveway so please hit me back as soon as possible dude without a map the player has no idea where their objective is so i had to do the map before i could get to the quests i started by taking a super high resolution screenshot of the map from a bird's eye view i think greyscaled the map in photoshop to make it look a little bit more like gta to pan the map around we take the player's offset from the center of the map divide it by the size of the map and then multiply that by the dimensions of the map screenshot this gives us the maps offset next i had a map icon so i can make objective markers for the quest these tell the player where to go i also added health and special meter bars but i haven't hooked those up yet with the final minimap systems complete i can now finally get to the quests i decided to use my narrative quiz plugin to create missions in the game basically you design the mission and then the plugin just handles the rest of the logic my first quiz would be really basic big smoke is gonna call you on the phone and he's gonna ask you to get him a package you then find it and then deliver it to his daughter the gray nodes are states in the quest and the orange nodes represent actions that move you through the quest reaching the green node means that you succeeded the quest let's start our quest big smoke calls you and once the call ends the begin quiz node tells narrative to start the quest i created a new pickup for the package that tells narrative you've taken the package when you walk over it this lets narrative know you've completed this step and to update the quest i used another basic trigger sphere that again tells narrative when you deliver the package to big smoke's house so with all that done we're ready to try the quest out i'm gonna spawn into the mat big smoke has queued up to call us which begins the quest the level blueprint has a bit of logic to add and remove quest markers so it adds a marker that tracks the package the package actor queues up the next phone call from big smoke when you take it finally the invisible sphere at big smoke's doorstep tells narrative that you've completed this step it then completes the quest and queues up one last phone call from big smug thank you once again homeboy for retrieving the package for me yours really big smoke so now at this point i only had 10 hours left and i had one final goal which is to do a mission with some combat and maybe even a sidekick to help you if i had time for that as well so this meant that my dumbass wandering ai needed to get a little bit smarter i realized i screwed up when i started writing a separate weapon system for the ai because i realized the ai and the player could actually just share the same weapon system so i refactored it all and added a new base class and then i have the ai and the player share that same base class so that they can share the weapon system and the health system and stuff like that for enemy ai i wrote a new behavior tree that includes the same wandering behavior but with some added combat logic on top instead of fleeing the player when shot at if the ai has a weapon they will begin firing and update their rotation to face you as they fire this approach works just fine but the ai has no concept of losing sight of you so he'll just stand there shooting even if you run behind a wall to fix this i added an ai perception component to the ai so this is a really handy component it's configured with whatever senses you want and i decided to add sight and hearing sensors to it and then i binded an event that fires when the ai perceives something at this point the ai has a target and then the firing logic can begin if the ai loses track of you he will walk to your last known location and if he still can't find you he'll just go back to patrolling around so now that the player can be killed by the ai i added the classic wasted screen and i also changed the time dilation so the player falls in slow motion since i needed to code a partner to help you kill some rival goons in the final mission i decided to whip one up i was super intimidated by this and i thought it would be really hard but in the end all i had to do was copy the logic from the enemies the only difference is your partner looks for enemies to shoot instead of where the enemies look for your player to shoot this means that coding the partner actually turned out to be really easy the only major difference was that i added a new behavior tree to make the partner follow your player around so the final quest involves you and your buddy basically getting into a big shoot up with a rival gang and then stealing some weapons from them but with just three hours left i was about to encounter one of the biggest challenges that i'd encountered yet so the only thing left to do was code the final mission i again use narrative to whip up the quest with the quiz containing five steps pick dynamic up from his house drive him to the rival gang house kill the two rival gang members find your gang's stolen weapons and then finally drive dynamic back to his house dynamic has code to say different lines of dialogue as you advance through the quest you receive the quiz via phone call which again has code to start the quest after the call ends dynamic is coded to walk to the car when you get within range and once within range he gets in the gang house has a sphere to check when you've reached it alright we're here the house is just over the bridge let's go get these fools and then the two enemies have code in them that tells the narrative questor when they are killed and that updates the quest and the ui yeah we showed them all let's find those weapons and get out of here same goes for the weapons when you pick them up a simple sphere checks for when you take them yeah we got the weapons could you please give me a ride home i i don't actually have a car so if you could do that it'd be real good and then another sphere for when you return dynamic to his house and that's basically how the quest works hey yo thanks once again homie we showed those fools and with that we reached the end of my voice acting career and you know that i had to make a credit screen too and shout out all the patreons in there and so with 24 hours all used up mountains of spaghetti code and a whole bunch of marketplace assets the question needs to be asked did we actually succeed in making grand theft auto 5 absolutely not you
Info
Channel: reubs
Views: 3,309,072
Rating: 4.8996873 out of 5
Keywords: Unreal, Engine, C++, Tutorial, Beginner, Game, Programming
Id: 3DjY1T42b_M
Channel Id: undefined
Length: 14min 46sec (886 seconds)
Published: Sun Mar 07 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.