How to Make Games in Unreal Engine 5 with AI — Transcript
Full transcript
- 0:00Hi everyone, and this tutorial I will
- 0:02teach you how to use AI to create games
- 0:04in Unreal Engine so you can start
- 0:06building video games today with no
- 0:09coding experience. You'll learn how to
- 0:11connect Unreal Engine with your AI of
- 0:13choice, whether that's Claude or
- 0:15ChatGPT, how to effectively prompt and
- 0:19guide the AI that's always closer to
- 0:21your vision, and what are AI's strengths
- 0:23and limitations so you know when and how
- 0:26to use it. As a test, I created three
- 0:29games with AI over the span of a week.
- 0:32So for the first game, it's your classic
- 0:34remake of Minecraft in UE5 with full
- 0:36world generation and chunk loading.
- 0:38While this is cool, this isn't that
- 0:41impressive because there are thousands
- 0:43of Minecraft clones. Now for the next
- 0:46demo, this is a ninja 2D platformer. I
- 0:49want to push the limits of what an AI
- 0:51could generate. So all of the 3D models,
- 0:54the textures, the animation characters,
- 0:57even the rendering to give the world a
- 0:59pixelated look was generated by AI. For
- 1:02another game, and this blew my mind, I
- 1:05had it procedurally generate a world
- 1:07with smooth terrain, so not voxels like
- 1:09Minecraft, and scatter assets that are
- 1:11from the marketplace. But why stop
- 1:14there? So I made this procedural world
- 1:16an entire planet. Now that I have a
- 1:19planet, why not generate other planets
- 1:22with their own orbits and moons to
- 1:24create a solar system. Since I have
- 1:27randomly generated a star system,
- 1:29nothing is stopping me from generating
- 1:31more stars and planets until I have an
- 1:34entire galaxy. Each of these stars, if I
- 1:37zoom in on them, they have their own
- 1:39planets. And a player can hop into their
- 1:42ship to travel to any of these planets.
- 1:44Essentially, I just made a mini No Man's
- 1:47Sky. For all of these games, I didn't
- 1:49write a single line of code or create a
- 1:52blueprint. These are all AI generated
- 1:55just from me prompting. Now these games
- 1:57were not created by one single prompt.
- 2:00These were hundreds upon hundreds of
- 2:01prompts and a lot of back-and-forth
- 2:03testing. Also, because I know the
- 2:05different systems that make up Unreal
- 2:07and 3D in general, I knew what to ask
- 2:09from the AI and guide it in the right
- 2:12direction using my prior experiences. I
- 2:15will show you the process of creating
- 2:17this game called Blob Siege, which is a
- 2:19tower defense game that sees you defend
- 2:21a castle against an army of evil blobs.
- 2:24The blobs come in waves and as you
- 2:25defeat each wave, you can upgrade your
- 2:27defenses. With AI, the potential is
- 2:30limitless. So I am creating this game as
- 2:32an example to show you how, but I
- 2:34encourage you to create your own game
- 2:35with the workflows I'm about to show. I
- 2:37will assume that you know the very
- 2:38basics of Unreal. If you're brand new,
- 2:41luckily for you, I just uploaded a new
- 2:43Unreal Engine beginner course. That
- 2:45video covers all the fundamentals of the
- 2:46engine. So I recommend watching that
- 2:48first before starting this tutorial.
- 2:51Before we jump into how to set up AI, we
- 2:53first have to talk about the general
- 2:55landscape of AI because a lot has
- 2:57changed this month and last month. So
- 3:00I've always been following the
- 3:01development of AI. Whenever a new model
- 3:04releases, I plug it into Unreal to see
- 3:06what its capabilities are with game
- 3:08coding. And while they have always been
- 3:10okay, it never felt like you had to use
- 3:12it. That was until last month with the
- 3:15release of GPT-6 Astra and Opus 5.5,
- 3:19its capabilities with game coding
- 3:21shocked me. The reason why we have seen
- 3:24an explosion of game merging, modding,
- 3:27decompilations, things we didn't think
- 3:29were possible beforehand is because
- 3:32these AI capabilities at games are
- 3:35leagues better than the previous models.
- 3:38In this tutorial, I will use and I
- 3:39recommend you use the state-of-the-art
- 3:41models, essentially the newest models
- 3:44that are released. So the ranking right
- 3:46now for the AIs that are best at game
- 3:49coding, and do keep Keep mind that this
- 3:51changes month to month. Whenever a new
- 3:53model releases, this ranking will
- 3:55change, but the best one right now for
- 3:57game coding and Unreal is Claude Opus
- 4:005.5. When Fable 5.5 releases, that will
- 4:03be above Opus. Now, if you do have a
- 4:06ChatGPT subscription, below these two is
- 4:09GPT-6 Astra and GPT-6.1
- 4:13Soul. So, those are also insanely good.
- 4:15In fact, for the majority of the game
- 4:17demos I just showed, I coded the
- 4:19majority of that with GPT-6 Astra. So,
- 4:22if you do have a ChatGPT subscription,
- 4:24you can also follow along. They work
- 4:26exactly the same as Claude. There really
- 4:28is no difference between the two. In
- 4:30this tutorial, I will mostly be using
- 4:32Opus 5.5, but I will show you how to set
- 4:35up ChatGPT. Unreal's right now in a
- 4:37transition. Next year, Unreal Engine 6
- 4:39is releasing and UE5 will get an update
- 4:42early next year that will make it more
- 4:44AI-friendly. So, make sure you follow me
- 4:46for updates because everything is
- 4:47rapidly changing week to week. Another
- 4:50thing is that AI is a sliding scale. You
- 4:52can use as much AI as you want or as
- 4:55little. It's really up to you. Now, for
- 4:57the majority of this video, I am mostly
- 4:59talking about AI-generated code. While I
- 5:01will talk a little bit about
- 5:02AI-generated art, those will be videos
- 5:04for another time. This level, for the
- 5:07majority of the assets, they're all from
- 5:09Fab, which is Unreal's marketplace, and
- 5:11I created the level. I made all the
- 5:13gameplay decisions. Because, while I
- 5:15could ask the AI to create a complete
- 5:18game and it will give me something that
- 5:20probably looks good and plays well,
- 5:22really I wasn't the one who made the
- 5:24game then. That was the AI. For me
- 5:26personally, I prefer to control the AI
- 5:28as much as possible. Instead of just
- 5:30one-shoting a game and letting the AI
- 5:32make all the decisions, I will build my
- 5:34game feature by feature, prompt by
- 5:36prompt, and test it at every stage of
- 5:38its development to make sure I'm guiding
- 5:41it towards my exact vision. And it's fun
- 5:43writing the narrative, creating the
- 5:45world, level building, and making the
- 5:47decisions that count. I don't want to
- 5:50give that all over to the AI. And the
- 5:52benefit of using Unreal Engine, rather
- 5:54than just generating a game from
- 5:55scratch, is that we get access to all of
- 5:58Unreal's tools and its editor. So, if
- 6:00the AI generates something and we don't
- 6:02like it, we can always manually change
- 6:04it. So, we still get full control over
- 6:06our game. Before we can start using AI
- 6:09in Unreal, we first have to set it up.
- 6:11And to do so, there are two main ways
- 6:13that the AI will communicate with
- 6:15Unreal. Number one is through the Unreal
- 6:17MCP, which stands for Model Context
- 6:19Protocol. Essentially, it controls the
- 6:22Unreal Engine editor, everything we can
- 6:24do from editing our level to creating a
- 6:27blueprint, the MCP can also do. And
- 6:30because it requires the editor to be
- 6:32open, it's pretty cool because we can
- 6:33watch the AI work. So, we will set that
- 6:36up in just a moment. The second way is
- 6:39through the AI generating C++ code,
- 6:42because modern AI is a large language
- 6:44model, which means it is insanely good
- 6:47at generating gameplay code for us. And
- 6:50that is how the majority of our games
- 6:51are going to be created now, and that is
- 6:54the AI generating C++ code for us. So,
- 6:57I'll show you how to set that up after
- 6:59this. And there is a third way, and this
- 7:01is how AI works by default, and that is
- 7:04the AI will create C++ and Python
- 7:06scripts to interact with Unreal's API.
- 7:09And there is no setup for that, and I'll
- 7:11show how the AI, I'll point that out in
- 7:14just a moment, because right now we need
- 7:16to show how to set up the Unreal MCP.
- 7:20In case you are curious, I will be
- 7:21building my game inside of the castle
- 7:23environment. So, if you want to learn
- 7:25how to create this exact environment,
- 7:27then you can watch the UE5 beginner
- 7:29tutorial, where at the end, to showcase
- 7:31how we build open worlds, we will create
- 7:33this cute little castle environment
- 7:36where we will place our game. Although,
- 7:38you can use any environment, you can
- 7:40create your own or use a blank template.
- 7:43It's really up to you because after all,
- 7:44this is your game. Just for my case,
- 7:47I'll use the environment I've already
- 7:48created. Because Unreal projects are
- 7:50just files on my computer, we need the
- 7:53AI desktop applications so they can
- 7:55interact with our computer. We can't
- 7:57just use their web versions.
- 7:58Specifically for the majority of this
- 8:00course, I'll be using Claude Code.
- 8:02Although if you do have an Open AI
- 8:04subscription, you can also use Codex
- 8:07because GPT-6 Astra is insanely good. So
- 8:10while I will be using Claude Code for
- 8:12the majority of the time, I will show
- 8:14you how to set up and get started with
- 8:16Codex also. Now to begin, we first have
- 8:18to point the AI towards our project to
- 8:21say, "Hey AI, I want you to work on this
- 8:23Unreal project." For Claude Code, it's
- 8:25pretty simple. Just grab your Unreal
- 8:27project, drag it in, and let go, and now
- 8:29it's pointing at it.
- 8:31Now for Codex,
- 8:33let me open it back up again.
- 8:34Under projects, click on the plus
- 8:36button, and now drag Electric Dreams
- 8:38here.
- 8:40I'll call this
- 8:43and select create project trust folder.
- 8:45And now they're both pointing at it. So
- 8:47we want to do an AI-first workflow, and
- 8:52because of that, we have to start stop
- 8:54underestimating how powerful the AI is.
- 8:57Now I will show you how we could
- 8:59manually set up the Unreal MCP, but you
- 9:02can also just ask the AI to set it up
- 9:04for you.
- 9:05So what I'll do is let me exit out.
- 9:08And now with my AI pointing to Electric
- 9:11Dreams environment castle, I will mostly
- 9:13be using Opus 5.5 on medium.
- 9:16I could type it out, but we are living
- 9:19in the future, so talk to it like it's a
- 9:21co-worker
- 9:22by selecting this mic icon.
- 9:25I want you to enable the Unreal MCP
- 9:27plugin. Also enable the all tool set
- 9:29plugin. Make sure auto start server is
- 9:32enabled. That's how the MCP server will
- 9:34start whenever I open up Unreal.
- 9:36And set up the config files for Cloud
- 9:39Code and for Code X through the Unreal
- 9:42MCP. I want you to verify that the
- 9:45Unreal MCP is working. You can open up
- 9:47the project.
- 9:49And now we're going to watch the AI work
- 9:51its magic. So, it's going to go through
- 9:54and enable it automatically for us. Now,
- 9:56you don't need to be very specific with
- 9:58your prompts. You could just say enable
- 9:59the MCP plugin, enable the tool set
- 10:02plugin, and auto start the server.
- 10:04Although, if you do want to use my
- 10:06prompts, here's the takeaway from this
- 10:08video and that is references screenshots
- 10:11are your friends. You could, instead of
- 10:13manually typing in each letter to get my
- 10:16exact prompt, just screenshot my prompt
- 10:20and then give it to the AI and say
- 10:21activate this prompt.
- 10:23And now the AI is automatically opening
- 10:25up our project
- 10:27to verify the MCP is working. It is done
- 10:30and connected. Now, to just look at this
- 10:33thread, I'll click on this button to
- 10:35hide the side menu.
- 10:37Let's go back into the original level.
- 10:40Within the project we created, let's
- 10:42verify that ChatGPT has access to the
- 10:44MCP.
- 10:45Do you have access to the MCP, aka you
- 10:47list out all the tools
- 10:49specifically for Unreal?
- 10:52That took a while because there are
- 10:53insane amount of tools. Tools are
- 10:55basically the actions that the MCP can
- 10:57take. So, now we know that our AIs are
- 11:00successfully connected to Unreal.
- 11:03Do you keep in mind that I recommend
- 11:04that you set in Cloud Code the mode to
- 11:07auto
- 11:08and then in Code X approve for me. The
- 11:12reason why is because with each new tool
- 11:14call
- 11:15the AI will stop and ask for our
- 11:16permission. We want to give it full
- 11:18permission to use every single tool from
- 11:20the MCP. So, just set that to auto. Now,
- 11:23the way we would manually set up the
- 11:26Unreal MCP is by going to edit
- 11:30plugins
- 11:32MCP
- 11:33make sure that's enabled.
- 11:35And then type in all tool sets. And make
- 11:37sure this is enabled also. Because the
- 11:39MCP by itself doesn't have the tools,
- 11:41this contains all the actions that it
- 11:43can take. And then you have to restart
- 11:46Unreal to get the MCP working. But
- 11:50then go to editor preferences, down to
- 11:52model context protocol. And make sure
- 11:54auto start server is enabled because if
- 11:56it's not, then we have to automatically
- 11:59or manually start the server each time.
- 12:01I want this server to start every time I
- 12:04open up Unreal.
- 12:06And specifically within the console
- 12:08commands, the way we would start the
- 12:10server is model context protocol. And
- 12:13then select start server.
- 12:15And one last thing we need to do is that
- 12:17there are some config files that we need
- 12:20to add to our project depending on what
- 12:22AI you are using.
- 12:24So
- 12:25up here we have generate client config.
- 12:28If you're using Claude code, type in
- 12:30Claude. If you're using Codex, you can
- 12:32type in Codex. Or you can just type in
- 12:34all to generate all of the config files
- 12:38for
- 12:39all the most popular AIs such as Gemini
- 12:42or Codex. So that is how we would
- 12:44manually set it up. And notice now
- 12:47going back into Claude code all the way
- 12:50up here.
- 12:51This is the exact process I just
- 12:53explained to the AI. So this is what I
- 12:55wanted to do. And it was as easy as just
- 12:57telling it, "Hey, this is the process I
- 12:59would do. How about you do that for me?"
- 13:02And then it just set it up automatically
- 13:04for us. Epic Games also has some very
- 13:07useful skills for the Unreal MCP to make
- 13:09it work better. And you can think of
- 13:11skills as just that. It's instructions
- 13:15that if the AI thinks, "Hey, this user
- 13:17is asking me for this specific thing,
- 13:19this skill might be able to help me out.
- 13:21Let me read it." So it adds additional
- 13:23context.
- 13:25You can get it from their GitHub Epic
- 13:27Games Unreal Engine Skills for Cloud
- 13:29Code.
- 13:30I could just
- 13:32copy this link and then paste it here.
- 13:34Or scrolling down, they give me an
- 13:36actual install
- 13:37for Cloud Code. Select that, copied.
- 13:40And then here,
- 13:42put that in.
- 13:44It will find
- 13:46and now install those skills. And they
- 13:49are now successfully installed.
- 13:52If you do want to follow along with me,
- 13:54you can download some assets
- 13:56that I've created for this tutorial.
- 13:58There's a link in the description,
- 14:00specifically game AI assets, which
- 14:03contains the main player character, the
- 14:05weapons, the turrets, everything we need
- 14:07for this blob destroyer game.
- 14:10So, I'll go ahead and open this up.
- 14:13And then migrate, specifically FPS game,
- 14:16into my main project. Or if I didn't
- 14:20want to manually migrate it, I can tell
- 14:22the AI to do it for me. So, I gave it
- 14:24the path. I just copied the path from
- 14:27the file explorer, and then said migrate
- 14:29all the assets within this Unreal
- 14:31project into my main project here, and
- 14:33it's able to do it. Although it did take
- 14:34a while. It took about a minute and 30
- 14:37seconds.
- 14:38And this is the thing. AI is still kind
- 14:42of slow at some things, specifically
- 14:43with the Unreal MCP, because there's
- 14:45just so much context, it doesn't really
- 14:47know what to do. So, what we will do,
- 14:50and the majority of our interactions
- 14:52with AI in Unreal, will be through the
- 14:54C++ coding. So, we will really only use
- 14:57the Unreal MCP at the beginning right
- 14:59now, just to show how to set it up and
- 15:01how it can edit your pre-existing
- 15:03assets, but we will start moving all of
- 15:05the gameplay code from blueprints over
- 15:08to C++, cuz that is where it is just
- 15:11insanely fast and the true unlock will
- 15:13happen there. The folder that contains
- 15:15my assets is FPS game,
- 15:18and then first person maps, first person
- 15:21map.
- 15:22This project essentially contains my own
- 15:25first-person template. So, pressing
- 15:26play, here we have the first-person
- 15:28character. I can walk around, look, and
- 15:30jump, and shoot. And remember, this is
- 15:33the character we used all the way back 2
- 15:35to 3 years ago for the UE5 first game
- 15:38tutorial.
- 15:40And we can see what assets are included
- 15:42within this pack by pressing control
- 15:44space and making sure my folder is
- 15:46selected. Then within filters, select
- 15:49the specific asset type you want to
- 15:50filter for. In my case, it's static mesh
- 15:52all the way over here. Then enable that
- 15:54filter.
- 15:55And now we have all the meshes that are
- 15:57included. Of course, we have our gun.
- 15:59And we also have the turret base
- 16:02and the turret top. So, we will use
- 16:05these to create a turret, which will be
- 16:07the main defenses against the enemy
- 16:09blobs.
- 16:11Now, if you press play, and when you
- 16:13press play and you don't see the exact
- 16:15character you want to use, that's
- 16:17because within the world settings, and
- 16:19if you don't have the world settings,
- 16:21then come up to window
- 16:23down here under world settings.
- 16:26Under the game mode override,
- 16:29make sure you have first-person game
- 16:30mode selected in case you do want to use
- 16:33a specific type of character. Now, for
- 16:36my case, you may have noticed that my
- 16:39viewport is pretty big. That's because I
- 16:41think it is a lot nicer to look at a
- 16:43very clean viewport where we're just
- 16:45looking at the level. I have all my
- 16:47windows docked to the side with the F10
- 16:49button. So, F10 will dock my windows to
- 16:52the side. I also got rid I'm right now
- 16:54hiding the viewport toolbar, and the
- 16:57shortcut for that is control shift and T
- 17:00at the same time. So, normally you would
- 17:02see this view bar, but I'll press
- 17:04control shift and T to hide it. If I
- 17:06need it, I can always bring it back.
- 17:08Now, let's jump back into
- 17:10my other main level.
- 17:13And to very quickly go into a level that
- 17:15I already had opened, I'll come to file,
- 17:18recent levels, and it is the main castle
- 17:21environment.
- 17:22I will not be the first-person
- 17:23character, instead I am the third-person
- 17:25character right now. So, going back into
- 17:27world settings,
- 17:29and let me check first-person game mode.
- 17:32Press play, and out here I am running
- 17:35around my world.
- 17:36I can shoot, and now I'm going to have
- 17:39to defend this castle from the enemy
- 17:41blobs. Before we move on to C++, I do
- 17:44want to mention some use cases for the
- 17:46Unreal MCP. Now, for the majority of our
- 17:49interactions with AI in Unreal, that
- 17:52will all be through C++.
- 17:54When MCP is useful is in very specific
- 17:58situations. You can think of the MCP as
- 18:01a live assistant for when we are
- 18:03literally editing the world. So, if we
- 18:05have a UAsset open, like a blueprint,
- 18:08or a material, and if we have a
- 18:10question, or we want the MCP to make a
- 18:12small edit, then we can ask the AI, but
- 18:16the MCP is limited, and it can be slow.
- 18:19Again,
- 18:20when we connect AI to C++, that is when
- 18:23we can actually start to do anything,
- 18:25and start to program very complicated
- 18:28games.
- 18:29So, when is the MCP useful? Well, let's
- 18:31say if I don't know how a blueprint
- 18:34works. For example, I will open up
- 18:37BP_FirstPerson
- 18:38under FPS Game, First Person Blueprints.
- 18:41Open this up, and out here we have a
- 18:43bunch of blueprint nodes. I'll go ahead
- 18:45and move these and I have no idea
- 18:48what these nodes are doing.
- 18:50Then,
- 18:52with Claude,
- 18:54can you please explain to me
- 18:55BP_FirstPerson?
- 18:56You can grab the nodes by using the MCP.
- 18:59And out here I get a detailed
- 19:01explanation
- 19:03of this node graph. And now
- 19:06that this node graph is in context, I
- 19:07can ask it specific questions. For
- 19:10example,
- 19:13I'm a little bit confused of what the
- 19:14route right mouse button event is doing.
- 19:17Can you explain that?
- 19:19And now it's answering a lot faster
- 19:21because it has already read the entire
- 19:24blueprint and put that into its memory.
- 19:26Or we can now make a direct change to
- 19:28the graph.
- 19:29So now here,
- 19:32can you add the ability for the
- 19:33character to sprint by holding down
- 19:35shift? So when a player holds down
- 19:38shift, then the first-person character
- 19:40will run faster. When they let go, it'll
- 19:42go back to its normal run speed.
- 19:45And send that off.
- 19:47So, this is the same example from the
- 19:50UE5 beginner tutorial.
- 19:52This is why the MCP is cool because we
- 19:54can watch it make changes to my graph in
- 19:57real time. So it just made these two
- 20:00variables.
- 20:01And now here, you can see that they're
- 20:03spawning in.
- 20:05And they should connect any second now.
- 20:08And now that is done. It's even asking
- 20:10me if I want to save it. Yes, go ahead
- 20:12and save.
- 20:14So, that is the main use case for the
- 20:15Unreal MCP is when you're editing the UE
- 20:18assets directly on a graph like this
- 20:21with your editor open up. Now, this was
- 20:23relatively slow. It would have been a
- 20:25lot faster if that was all done in C++.
- 20:28So that's why we're setting C++ up so
- 20:31the MCP or so that the AI doesn't have
- 20:33to worry about creating specific
- 20:35variables or hooking them up. That's
- 20:37just a lot more context, which makes it
- 20:39slower. Now, in the future, the MCP will
- 20:41get a lot faster and a lot better. So
- 20:43maybe we start to move more of our
- 20:46operate of our operations over to the
- 20:48MCP. But as of now,
- 20:50we will mostly be focusing on C++. And
- 20:53another use case for the MCP is that it
- 20:56can help us essentially be a tool while
- 20:59we're creating our environments to maybe
- 21:01scatter assets around or create
- 21:03buildings.
- 21:04And of course, we can now have that that
- 21:06is working by pressing play.
- 21:08Then let me turn around.
- 21:11Start walking and then hold down shift.
- 21:14And now I am running. So a little bit
- 21:16faster.
- 21:18Using C++ is relatively simple. It's
- 21:20just we have to download Visual Studio
- 21:22Community first and then enable some
- 21:24settings and frameworks within Visual
- 21:26Studio Community. The reason why is
- 21:28because while the AI can write the C++,
- 21:31it still needs a way to compile it. And
- 21:34it compiles Unreal C++ code through
- 21:37Visual Studio Community. So you want to
- 21:39go ahead and download the latest
- 21:40version. Specifically, it's not Visual
- 21:42Studio Code which people get mixed up
- 21:45on. It is the actual Visual Studio with
- 21:48the purple icon, not the blue one. If
- 21:51you are installing Visual Studio for the
- 21:52first time, then it will ask you what
- 21:55frameworks or code bases you want to
- 21:56install with it. If you already have
- 21:58Visual Studio installed, then click on
- 22:00modify through the installer so you can
- 22:02pick those frameworks. Now specifically,
- 22:05you want .NET Multi-platform App UI
- 22:07Development enabled, .NET Desktop
- 22:10Development,
- 22:11Desktop Development with C++,
- 22:14and Game Development with C++. It even
- 22:17tells you in the description that this
- 22:18is meant for Unreal. Make sure those are
- 22:20enabled. And there are some additional
- 22:23code bases we need under Game
- 22:25Development with C++.
- 22:27So under here, make sure C++ Profiling
- 22:30Tools is enabled, C++ Build Insights,
- 22:34Windows 11 SDK 10.0.26
- 22:38or newer. This is 261, so this is newer
- 22:41and will work. Visual Studio Tools for
- 22:43Unreal Engine, Visual Studio Debugger
- 22:45Tools for Unreal Engine,
- 22:47and just in case the Unreal Engine
- 22:49Installer, although we already have the
- 22:51installer. This would just download that
- 22:53application for us automatically. So
- 22:55that is a lot of things we have to
- 22:56enable, but enabling all of these will
- 22:58make sure that Unreal Engine can compile
- 23:00C++ code. And then select install or
- 23:03modify. To see if this is working, let's
- 23:05have it create a C++ class and then
- 23:08compile. But in order for it to compile,
- 23:10Unreal Engine has to be closed. So, I'll
- 23:12go ahead and close it.
- 23:14And now within Claude, I'll tell it,
- 23:17"Create a C++ class of just a sphere
- 23:21and compile Unreal. Let me know if
- 23:23everything is working or if I have to
- 23:26make any changes."
- 23:28So, if we did forget something when we
- 23:30were enabling all those frameworks, then
- 23:32Claude will tell us what to enable.
- 23:35And this is the most unfortunate part
- 23:37about developing C++ for Unreal is that
- 23:40we constantly have to close the project
- 23:43for it to compile and then reopen it.
- 23:45Whenever we make a change, for the most
- 23:46part, we do have to close Unreal. And
- 23:49while it is technically possible where
- 23:52when the AI is thinking about what C++
- 23:55code to write and is writing the code,
- 23:57we can still be in the project and make
- 23:59edits. When it's making those changes, I
- 24:01don't recommend you do that. The reason
- 24:04why is because the AI is really smart.
- 24:07It is able to open up Unreal Engine by
- 24:09itself and then test different things,
- 24:11make sure everything compiles, and
- 24:13catches bugs before you even know they
- 24:15exist. And then if we have our own
- 24:17instance of the editor open up and we're
- 24:19making our own changes, then the AI will
- 24:22not double-check its own work and will
- 24:24not open up Unreal by itself. So, it's
- 24:27recommended that you do close Unreal
- 24:30whenever you make a change. And that is
- 24:33a huge hassle and it really does disrupt
- 24:35the flow when you're creating a project.
- 24:37So, Epic Games is working on this.
- 24:40I do expect in a future version of the
- 24:43engine, you'll be able to prompt it to
- 24:45create code for you. And then we can
- 24:47still work in the engine. And if the AI
- 24:50needs to check something, then it will
- 24:52open up its own version of the editor
- 24:55that will not interfere with what we're
- 24:56doing. But, that is
- 24:59a hassle for now. Just know that
- 25:01whenever you do make a change, close
- 25:02Unreal and reopen it when you're done.
- 25:04You can also tell
- 25:07the AI to remind it
- 25:10that it can open up the editor once it's
- 25:12done for us. That's how we don't have to
- 25:14open it up ourselves each time it is
- 25:17done compiling. And I'll show you how to
- 25:18do that in just a moment because now
- 25:20let's see if it did create that C++
- 25:22class. Scrolling down here, if you do
- 25:24not see the C++ folder with the cog icon
- 25:29at the top right-hand corner come down
- 25:31here and make sure C++ is enabled, it's
- 25:33checked under C++ classes. We now have
- 25:37that class I told to make.
- 25:39Everything compiled correctly.
- 25:41And now here is our first C++ object.
- 25:45Often times I will tell the AI that it
- 25:47has full permission to open up the
- 25:48project and to test to make sure that
- 25:51there are no errors and that everything
- 25:53is compiling correctly and that it got
- 25:55the basics of my task down. But, even if
- 25:58you do not explicitly tell to test, the
- 26:00AI will, by itself, just open up Unreal.
- 26:04And you won't even see it open up Unreal
- 26:06because it likes to run programs in
- 26:09headless mode. Which means that it can
- 26:11see the instance of the program it's
- 26:14running, but us, the editors, the
- 26:16humans, we're unable to see it. And then
- 26:18that's called running a program in
- 26:19headless mode. So, even though Unreal
- 26:22Engine isn't open on your end if you
- 26:25check the task manager, you might see
- 26:27that Unreal Engine, or if you're using
- 26:29Blender, is running right here. And that
- 26:31means that the AI is testing. Also, when
- 26:34the AI is running, when it is thinking,
- 26:36you can look at the drop-downs and then
- 26:39see if it's taking any screenshots of
- 26:41Unreal Engine. And that's another way
- 26:42that you know that it's currently in the
- 26:44editor.
- 26:46Now, let's create our first gameplay
- 26:47class and specifically a turret. Now,
- 26:50right now this turret will not be
- 26:52friendly. It'll be shooting at the
- 26:53player just to make sure that these
- 26:55shooting mechanics of the turret are
- 26:57working. And then when I do think that
- 27:00they're working and they look nice, we
- 27:02will convert that into a friendly
- 27:03turret. Because the end goal of this
- 27:06object is to allow me to place the
- 27:08turret anywhere in my world, for
- 27:10example, right here, and then the turret
- 27:12will be scanning, looking for the enemy,
- 27:14and when it sees the enemy, it starts
- 27:16shooting at it. But for now, this turret
- 27:18will be an enemy, so I want to make it
- 27:20that so it's shooting at the player
- 27:22to make sure it's shooting is working.
- 27:25So, included within FPS game meshes, we
- 27:28have turret_base
- 27:30and turret_top.
- 27:33Dragging out base,
- 27:35this is the base of the turret, so this
- 27:37will not move, but turret_top will move.
- 27:40So, it is this that will then be placed,
- 27:43so I have to tell the AI, "Hey,
- 27:45turret_top will be placed attached to
- 27:49the bottom,
- 27:51and its pivot will be right here.
- 27:53So, now if I rotate this, we can see
- 27:55that as I rotate this, it'll be able to
- 27:57look at the player or look at the
- 27:59different enemies.
- 28:01So, this is the class we are going to
- 28:03create right now.
- 28:05And because I know the exact names, base
- 28:08and top, I can explicitly
- 28:11say any asset's name within my content
- 28:14drawer, and the AI will know to use it.
- 28:19Now, let's bring back Claude
- 28:22and then give it a prompt. I want you to
- 28:26create a C++ class called turret that is
- 28:29composed of two static meshes,
- 28:31turret_base
- 28:33and turret_top.
- 28:35Now, turret_top should be attached to
- 28:38the base,
- 28:39and the base has a hole inside of it.
- 28:42The top has a sphere pivot. The sphere
- 28:44pivot should be slightly elevated. It
- 28:48should be inside of the hole of the
- 28:50base.
- 28:51So, make sure you check on that.
- 28:54Do not use the Unreal MCP. This is all
- 28:56done in C++.
- 29:00And now,
- 29:02I will exit out
- 29:03of Unreal and then
- 29:06send this off. So, I could have worded
- 29:09this several different ways. My best
- 29:11suggestion is that when you're
- 29:12communicating with AI, you just act like
- 29:15it's another co-worker. Except it is a
- 29:19co-worker that is available to you 24/7
- 29:22and is an expert at coding C++ in
- 29:25Unreal. And now it is done. And what is
- 29:27nice about AI is that it will give you a
- 29:29little summary as the output, basically
- 29:32explaining what it did to achieve your
- 29:34task. For example, right here it's
- 29:35telling me that it ran a headless editor
- 29:38command
- 29:40to then measure the exact sphere area of
- 29:43turret_top and the base. That's how to
- 29:46line it up better. So, let's see if it
- 29:47actually worked by
- 29:50jumping into
- 29:52my project. On the subject of Claude's
- 29:54output, some people have complained in
- 29:56the past that Claude way over explains
- 29:59things. It might mention something or
- 30:01give a detail that is not necessary to
- 30:04the output. And if you do think Claude
- 30:06is being too wordy, over explaining,
- 30:08then you could change its output style
- 30:10to be more concise, to get to the point
- 30:13quicker, and to still give you enough
- 30:15information where you know what it did.
- 30:17To do so, go into Claude code settings.
- 30:20Under Claude code, scroll down where you
- 30:22get to output style, and then you can
- 30:24set it from default to concise.
- 30:27So, now Claude will not over-explain, it
- 30:30will not be as wordy, in case you don't
- 30:32like the output. In my case, I'll just
- 30:33leave it at default, but it's good to
- 30:35know that it is there. Now, this issue
- 30:37isn't that big of an issue on the newer
- 30:39models, but it was in older. So, now
- 30:41let's jump
- 30:43into the environments.
- 30:45Okay, going into C++ classes, electric
- 30:48dream sample, we now have a turrets.
- 30:50Dragging this in, and this looks pretty
- 30:53cool. It was able to almost correctly
- 30:56line up the top with the bottom,
- 30:58although
- 31:00I do think that's a little bit too high
- 31:02compared to where I want it to be with
- 31:05these static meshes. So, what I could do
- 31:07is ask it to lower it or
- 31:10and here's the big takeaway from the
- 31:11video, reference is key.
- 31:14If you want the AI to do something
- 31:16specific, make sure you have a photo or
- 31:19a video and give it to the AI. The AI
- 31:21will then have a lot more context to be
- 31:23able to achieve what you want. So, I am
- 31:26going to screenshot this
- 31:29and then exit out again.
- 31:31Right here, give it the screenshot and
- 31:33say,
- 31:35"Can you lower the turret {underscore}
- 31:37top to be more like this image?"
- 31:41And then send it, and it'll be smart
- 31:43enough to know what to do. It is done
- 31:45running. This took about 15 seconds. So,
- 31:48open it back up.
- 31:50Now, in case you're ever curious and you
- 31:51want to know more information about how
- 31:54the AI achieved something specific, then
- 31:57we can ask it right here. For example,
- 31:59"I'm curious, what commands did you use
- 32:01to measure the turret base and the
- 32:05turret top to determine the positioning?
- 32:08Can you tell me the exact process that
- 32:11you did?"
- 32:12And right off the bat, it's going to be
- 32:14really fast because it's already loaded
- 32:16in its context, so it doesn't have to
- 32:17search anything up. It already remembers
- 32:21within the context because this wasn't
- 32:22that long ago how it achieved that. And
- 32:25it's telling us right now that
- 32:28and this is what I meant with Python
- 32:29scripts, it wrote a Python script to
- 32:32then grab those assets and analyze it
- 32:34itself. And this is
- 32:37significantly faster than going through
- 32:40the Unreal MCP. Because if it had to use
- 32:43the MCP, then it would have to load up
- 32:45the Unreal Engine, wait for the MCP
- 32:47server to start,
- 32:49and then go through all the different
- 32:51MCP tools, pick out what it needs, and
- 32:53that is just such a slow process.
- 32:55Remember, modern LLMs are insanely good
- 32:59at programming. It's a lot faster for
- 33:02the AI to write a Python script, to then
- 33:05it grab that data directly, analyze it,
- 33:08and then throw away the Python script.
- 33:10I'm really glad that I asked it how did
- 33:12it achieve it, because this is such a
- 33:14good example of why we should, for the
- 33:16most part, not really use the MCP and
- 33:19just interact with the engine through
- 33:21C++ and Python scripts. So, I want to
- 33:24explicitly tell Claude to remember,
- 33:28"Hey, do not use the MCP." Because in my
- 33:31original prompt, if I didn't explicitly
- 33:33tell it, "Do not use Unreal MCP," then
- 33:36there was a good chance that it might
- 33:37have opened up Unreal by itself, and
- 33:39then start to use the MCP. But
- 33:41unfortunately for us,
- 33:43now,
- 33:44and this is something that does trip up
- 33:46a lot of new users, when we have
- 33:48different chats. So, we have one chat
- 33:50right here, another chat right here.
- 33:52They're also called threads and
- 33:53sessions. These threads and sessions
- 33:55don't necessarily communicate with each
- 33:57other. So, I can do something within
- 33:59this thread, and then the next thread
- 34:01will not know what I just did. For
- 34:03example, I will Now, as a goofy example,
- 34:07I'll say,
- 34:08"I am a dog that barks."
- 34:13"Woof. Nice to meet you."
- 34:16"All right, cool." So, now I'll create a
- 34:18new chat.
- 34:20"What animal am I?"
- 34:24It can't tell. So, there isn't memory
- 34:26between the threads. If you want to save
- 34:29information, that's how each thread has
- 34:30access to it. For example, the
- 34:32information not to use the Unreal MCP
- 34:34unless I specifically tell you to, then
- 34:37you would save that. You have to tell
- 34:39the AI to save it in a claw.md file or
- 34:43for every other AI agent like Codex and
- 34:47agents.md file. So the memory for AI is
- 34:50either in a claw.md or an agents.md. Now
- 34:54right now I'm using Claude, so I would
- 34:56have to tell it to save it to the
- 34:57agents.md.
- 35:00I need you to remember, so save this in
- 35:02the agents.
- 35:03My bad. To the claw.md because this is
- 35:07Claude code that
- 35:10you should only use the Unreal MCP when
- 35:13I tell you to. By default, just run
- 35:16Unreal headless through scripts not the
- 35:19Unreal MCP unless I tell you to use it.
- 35:22I get it mixed up because I do use Codex
- 35:25a lot, so then that will be saved to the
- 35:27agents.md. Hopefully Claude will move
- 35:30over to agents.md with everyone else.
- 35:32And now I'll just create a claw.md
- 35:34which is located in our project file
- 35:36down here. Here's a claw.md. I can open
- 35:39this up with any text editor because a
- 35:41.md file is just a fancy.txt
- 35:44file except now we have headers and
- 35:47formatting.
- 35:48So edit in notepad.
- 35:51And this is the memory of Claude for our
- 35:53project. So you can see that it's
- 35:56explicitly now telling, "Hey, do not use
- 35:59the Unreal MCP unless I tell it to."
- 36:02So this file will be loaded up whenever
- 36:05we create a new session.
- 36:08I actually don't like how it's
- 36:10specifically saying a Python script
- 36:12because what if a C++ script might be
- 36:14better? So I'll tell it to
- 36:17in the claw.md get rid of the default
- 36:20because I want you to be able to use any
- 36:22language, for example C++, with the
- 36:25scripts that would be fastest. So we
- 36:27don't need default. I just don't want
- 36:29you using Unreal MCP.
- 36:32Before we move on to adding in more
- 36:34features, let's talk about effort level.
- 36:36Because right now, throughout this
- 36:38entire tutorial, I've been using Opus
- 36:405.5 on medium. And effort level is how
- 36:45long the model will think to itself
- 36:47before it takes an action. If I were to
- 36:49give the AI a task and then set it to
- 36:52ultra code, then the AI might overthink
- 36:55to itself and it would take longer and
- 36:58use up more usage credits. So, by using
- 37:01some of the lower effort levels, for
- 37:03example, medium or low, the model can be
- 37:06significantly faster. Generally, for our
- 37:09use cases for Unreal Engine 5, it is
- 37:11pretty straightforward. So, I would
- 37:13leave it at medium or high. If there is
- 37:16some bug that the lower effort levels
- 37:19cannot find, then I would move up to max
- 37:22or ultra code.
- 37:24Or if I know that I'm about to give the
- 37:26AI a long-running task that it might
- 37:29take a while and it is a difficult task
- 37:32I can tell, then I would leave it at
- 37:34high.
- 37:36For everyone using Claude, as of October
- 37:382026, I recommend everyone to just leave
- 37:41it at medium or high and to use Opus
- 37:435.5. In my case, I will leave it at high
- 37:46for the rest of this video and use Opus
- 37:495.5. When Fable 5.5 releases, probably
- 37:53by the time you're seeing this video,
- 37:54then this would be the new top model.
- 37:57But, Fable does eat up a lot of usage
- 37:59credits and probably for what we're
- 38:02doing, it would not be necessary. It
- 38:04would just be overkill. So, use Opus 5.5
- 38:07on medium or high. And even if you have
- 38:09one of the lower-tier Claude
- 38:10subscriptions, it is pretty hard to use
- 38:13up all your credits when you have Opus
- 38:155.5 on medium.
- 38:17Now, for Codex, Codex also has some
- 38:21really good AI models specifically for
- 38:24the majority of the code for the three
- 38:26games I showed at the beginning of this
- 38:27video. That was mostly done using GPT-6
- 38:31Astra. So, Astra is also good. Opus 5.5
- 38:34is a little bit better. You can leave
- 38:36Astra on medium or high and the lowest
- 38:39here model I would recommend using
- 38:41Unreal with is GPT-6.1
- 38:44Soul. So, if you already have a ChatGPT
- 38:47subscription, you can use Soul or Astra.
- 38:50Those are also great and you can achieve
- 38:52everything I'm doing within this
- 38:54tutorial.
- 38:55Because we know that data isn't shared
- 38:57between threads, what I like to do is
- 38:59when I'm adding a feature, I like to
- 39:01keep that feature within its own thread.
- 39:03So, if I'm going to add in a new
- 39:05feature, then I'll create a new thread
- 39:07or if I'm going to work on a
- 39:09pre-existing feature, then I'll go to
- 39:11that thread's feature. Specifically, we
- 39:13were already working on the turret
- 39:15class, so I'll select this thread
- 39:17because this already has the context
- 39:18that we were working on up above.
- 39:21So, now let's add the ability for the
- 39:23top turret to follow me.
- 39:26So, it says right here,
- 39:28make it so that the turret is always
- 39:31looking at the player character,
- 39:33specifically just the top turret. So,
- 39:35move the turret_top around on its pivot
- 39:39to look at the player character.
- 39:41And then exit out.
- 39:44So, now
- 39:45it is done. I don't need these cuz that
- 39:48was just an example. We have my turret
- 39:50class over here.
- 39:51I'll move it and that's how it's
- 39:52actually on the ground.
- 39:55And then press play.
- 39:58There it is. It is now looking at my
- 39:59player character.
- 40:01On the topic of memories and how the
- 40:03different threads interact with each
- 40:05other, let's say for example, there is
- 40:07some information
- 40:09for some reason I want to give the
- 40:10information of what the turret just did
- 40:13to another thread. What I can do is
- 40:15literally highlight it,
- 40:17control C copy it, and then paste it
- 40:19into another thread. Or, you can ask the
- 40:21AI to write a handoff. So, when we move
- 40:25context from one thread to another,
- 40:27that's called a handoff. So, you can
- 40:29create one by explicitly telling the AI,
- 40:33"Create a handoff
- 40:35of the task you just did, making the
- 40:37turrets move around.
- 40:39Give as much detail as possible within
- 40:41that handoff, because I will give this
- 40:43context to another thread."
- 40:46It is done creating that handoff file.
- 40:48If I select this, there's actually a
- 40:50text editor, so we can read it within
- 40:53Claude code. And this has just an insane
- 40:55amount of detail. Look at all that
- 40:57context.
- 40:59And then I can highlight this, so the
- 41:01name of the .md file,
- 41:03create a
- 41:04new thread,
- 41:06and then say,
- 41:07"Here is the proper context for the
- 41:09turrets. I want to start working on
- 41:10this." So, here it is.
- 41:13And now this thread has the proper
- 41:14context. Now, this was just an example.
- 41:17Honestly, the turret class is so small,
- 41:20and we've barely done any work, that it
- 41:22would have made way more sense if I just
- 41:25started working on the turret right off
- 41:26the bat within this thread, and not even
- 41:28give it a handoff. But, if I did have a
- 41:30thread that's hundreds and hundreds of
- 41:33turns long, and there's essential
- 41:35information in that thread, then I would
- 41:37ask for a handoff to hand it off. But,
- 41:40in this case, it would make way more
- 41:41sense if the AI just read the code,
- 41:44because this is a very small class right
- 41:46now. So, now let's make the turret class
- 41:48actually shoot bullets at me. Because
- 41:50right now, it is looking at me, but it's
- 41:52not shooting at me. So, let's make it
- 41:54shoot the same bullets that we have
- 41:57coming from my gun. And specifically,
- 41:59that is in FPS game,
- 42:01first-person, blueprints, and it is
- 42:04bullet projectile.
- 42:06So, I will tell it to shoot the
- 42:08blueprint class called bullet
- 42:10projectile. Now, let's say if I didn't
- 42:12know what the class was that was being
- 42:14shot out of my gun, then I could go into
- 42:17the gun blueprints
- 42:20and then see what's being spawned
- 42:22right here, or I could have asked the
- 42:24AI.
- 42:26I want the turret to now fire at the
- 42:28player, specifically the blueprint class
- 42:30called bullet projectile, every 0.5
- 42:33seconds. So, when the turret is looking
- 42:36at the player character, have it fire
- 42:38the bullets. Also, use the same sound
- 42:42from the player character's gun that
- 42:44plays.
- 42:46Exit out.
- 42:48I like how it does tell you the
- 42:49different tasks that the AI is going to
- 42:51go through, but right now it says
- 42:52compile and update handoff. We do not
- 42:54need to update the handoff, so I'll say
- 42:56In fact, I'll just
- 42:58say delete handoff, we don't need it.
- 43:03You can see that the AI is now telling
- 43:05me that it will delete the handoff file
- 43:07now. So, that's always a good feature.
- 43:09If you do see the AI is going in the
- 43:11wrong direction, then you can always
- 43:12steer it with additional prompts to
- 43:14change the way it's working.
- 43:16Unfortunately for me,
- 43:19this isn't working. Uh-oh. So, if it's
- 43:21not working, that's because
- 43:24Claude probably didn't test it.
- 43:26So, I'll tell it right now,
- 43:28it is not working. The turret isn't
- 43:29firing. You have permission to open up
- 43:31Unreal in headless mode, figure out
- 43:33what's wrong.
- 43:35Now it is fixed. Claude found a bug,
- 43:37fixed it. It also found two bugs and
- 43:39fixed it. So, a lot of bugs right there.
- 43:42And now pressing play,
- 43:44it is firing at the player. Ouch. Let me
- 43:47go behind this tree, this log. Now it's
- 43:49hitting the log. If I press shift and F1
- 43:51at the same time, that brings back my
- 43:53mouse. Now that I have my mouse on the
- 43:56toolbar, I can select the eject button.
- 43:59Now I can move my camera around, and you
- 44:01can see right here is the player
- 44:03character.
- 44:04And that's the turret
- 44:07is currently shooting at that character.
- 44:11Now, what the AI generated was good, but
- 44:14we always want control over what it
- 44:16generated. Because let's say what if I
- 44:18don't like the firing speed or something
- 44:20else. We want to expose as many
- 44:23properties of the generated object, in
- 44:26our case the C++ class, as possible.
- 44:29That's how we get back control and so
- 44:31that if we do want a change to the C++
- 44:34class, we don't have to prompt it. We're
- 44:37able to just change it within its
- 44:38details panel. And in older models, I
- 44:41had to literally explicitly say, "Hey,
- 44:44expose this variable. Make sure I can
- 44:45edit it in the details panel." in order
- 44:48for it to do it. But now with the latest
- 44:49models, the AI are so smart that it's
- 44:53automatically exposing these variables
- 44:55for us. So, whenever it thinks that
- 44:56there's a setting that it's creating
- 44:59that the user, the level editor, wants
- 45:01to edit, it will automatically expose it
- 45:03for us by having it selected in the
- 45:06details panel. I have to scroll all the
- 45:07way down. This is annoying.
- 45:09Scrolling down.
- 45:11And it automatically created these
- 45:12settings for us. So, we can change
- 45:15what's being fired. Right now it's the
- 45:17bullet projectile, which is what we
- 45:19want, the firing sound, and the fire
- 45:21interval. I can bring this down because
- 45:24odds are we would want to change this
- 45:26for gameplay reasons
- 45:28to 0.1 seconds and now it's going to
- 45:30rapid fire.
- 45:33That's crazy.
- 45:35Obviously, that is way too fast. So, now
- 45:37I can change it back. And if it ever
- 45:40exposes or creates a setting and you
- 45:42don't know what that setting does, then
- 45:44you can hover over the name of that
- 45:47setting and there'll be a brief
- 45:49description. Now, if it's not giving you
- 45:51descriptions, then you should tell the
- 45:54AI that whenever it creates a setting
- 45:56for it to also give you a description
- 45:58for it.
- 45:59Now, if the AI did not expose these
- 46:00properties because you might be using an
- 46:03older model or a different model that's
- 46:05not created by Open AI or Anthropic,
- 46:08then you just want to explicitly say
- 46:12expose the fire interval to the details
- 46:14panel, that's how I can change it in the
- 46:17level.
- 46:18So, in case you do not get these
- 46:20settings, ask the AI to just expose it.
- 46:22Pretty simple.
- 46:24Now,
- 46:25I did not like for these settings
- 46:27how I have to come all the way down here
- 46:31to then see it. So, let's tell the AI
- 46:34to move it up.
- 46:35So,
- 46:38for the generated settings within the
- 46:39details panel, I want you to move that
- 46:42entire group, so for every setting you
- 46:44generate, up to the very top of the
- 46:47details panel, so I have easy access to
- 46:49them.
- 46:51I go ahead and send that off. Close the
- 46:53editor.
- 46:54So, to get back control, expose, expose,
- 46:57expose, expose as many variables and
- 46:59settings as possible. So, you will see
- 47:01that whenever I am prompting, I might
- 47:04just explicitly tell it, "Hey, make sure
- 47:05you expose it to the details panel."
- 47:07Even though Claude might automatically
- 47:09do it for me, I just want to make sure
- 47:11that I do get those settings. And now in
- 47:13the details panel, it's at the very top,
- 47:15so it's easy access for me. I actually
- 47:18want to put this
- 47:20below the transform for no reason other
- 47:22than I'm used to seeing the transform
- 47:24options at the very top before anything
- 47:26else. And I do think the positioning of
- 47:29an object is more important than these
- 47:31settings.
- 47:32Another thing that I will do is that I
- 47:34will explicitly tell Claude to save to
- 47:37the Claude.md that whenever it exposes a
- 47:40variable, it should be at the top of the
- 47:42details panel below the transform.
- 47:45Because we will create other classes, I
- 47:47don't want to have to explicitly tell
- 47:48Claude each time, "Hey, make sure these
- 47:51settings are at the top." Instead, I can
- 47:54set it as a rule in the Claude.md, so it
- 47:57will always do that for me.
- 47:59You can move the third settings
- 48:01below the transform group. So, have it
- 48:04be the second group. And I want you to
- 48:06write a rule within the claw.md that
- 48:09whenever you expose a setting in the
- 48:12details panel, those settings should be
- 48:14the second group below the transform.
- 48:17And that goes for all new C++ classes.
- 48:20So, whenever we're working on a C++
- 48:22class and you expose a variable, make
- 48:25sure that is in a group near the top,
- 48:27second, right below the transform.
- 48:30Now, these settings are below the
- 48:32transform and we've set up a rule in the
- 48:34claw.md. That's how future settings for
- 48:37future classes will always be up here.
- 48:39Don't have to scroll all the way down
- 48:41because that would be pretty annoying.
- 48:44Now that we are already setting rules
- 48:45right now, we can add in another rule
- 48:47specifically because we are going to
- 48:50expose a lot of variables. Maybe there
- 48:51might be a setting we don't understand.
- 48:54So, we want the description to be more
- 48:56detailed. So, I'll tell it that it could
- 48:58create very detailed descriptions. Also,
- 49:01I will make it that's how whenever it is
- 49:04done and compiled, when the task is
- 49:06finished, to automatically open up
- 49:08Unreal. That's how I don't have to
- 49:10manually open it up each time. Just as a
- 49:12little time saver.
- 49:15Also, add to the claw.md some other
- 49:18rules, specifically that the details
- 49:21that are generated by the exposed
- 49:22settings can be
- 49:24very detailed and explanatory. So, it
- 49:28could be several sentences to a
- 49:29paragraph long.
- 49:31Also, when a task is complete and when
- 49:34the engine has compiled, you can
- 49:36automatically open up Unreal for me.
- 49:41Now, I do not need to close down Unreal
- 49:43because we're not making any changes to
- 49:45the project. This is just changing the
- 49:47claw.md.
- 49:49Claw is smart enough to ask us whether
- 49:50or not we want to rewrite these details
- 49:54according to the new standards. No,
- 49:57everything's pretty self-explanatory.
- 49:58This is for future settings.
- 50:00So, not now.
- 50:02There is also
- 50:04some specific situations where we do not
- 50:07have to close the project if the AI does
- 50:09make a C++ change, and that's when we're
- 50:12not creating any new variables or we're
- 50:15not creating a new components or a
- 50:18function. For very technical terms, and
- 50:20this is only for the programmers out
- 50:22there, if we do not make a change to the
- 50:24header file, so if the AI just changes
- 50:27the C++, then we do not have to close
- 50:30down Unreal Engine, and we can click on
- 50:32the live compile button down there. But,
- 50:34for the vast majority of the changes we
- 50:36will make with AI to our C++ code, we do
- 50:40have to close down Unreal and compile.
- 50:42So, for example, if I wanted to change,
- 50:46let's say,
- 50:47the fire interval default, so instead of
- 50:500.5 seconds to 1, then since I know this
- 50:53will be a very simple number change, I
- 50:56can ask the AI to change this default,
- 50:59and then instead of having to close down
- 51:01Unreal, once the AI is done with this
- 51:04task, I can click on the live compile
- 51:05button. But, for the vast majority use
- 51:08cases, and just in case, I almost always
- 51:12just exit out of Unreal
- 51:14and do a full compile. That's how I know
- 51:16nothing will go wrong.
- 51:17Now, we're about to enter the fun part
- 51:19of the tutorial where we just keep
- 51:21prompting and prompting to build out our
- 51:23game feature by feature. Because you
- 51:26haven't really seen how AI can increase
- 51:29our speed, our productivity yet. Because
- 51:31throughout this tutorial, I've been
- 51:33covering the basics of AI and how to
- 51:35connect it to Unreal. Now, we're at the
- 51:37point where we can just start prompting
- 51:39a lot of features at once and watch our
- 51:42game start to be built in front of our
- 51:44eyes. So, this will be really fun, and I
- 51:46do want to note that you may have
- 51:48noticed that as I am prompting that
- 51:51there is no engineering behind it.
- 51:54Again, the best way you can treat the AI
- 51:56is that it's like a coworker. You just
- 51:58want to talk to it like it's an actual
- 52:00software developer, and the best thing
- 52:02you can give that software developer is
- 52:05as much context, as much details as
- 52:07possible. When you're talking to the AI,
- 52:10you can make it very long, a basically a
- 52:13stream of consciousness, and as long as
- 52:15you give it as much information as
- 52:17possible, you can get it aligned with
- 52:19your vision. So the way I will prompt,
- 52:21and what you're about to see, is that it
- 52:23is literally a stream of consciousness.
- 52:25I just keep on talking and talking, but
- 52:27that is great because it gives as much
- 52:29detail, as much context to the AI, so it
- 52:33is as close as possible to what I
- 52:36envision this feature will be.
- 52:38So that's what we're about to do right
- 52:39now, because
- 52:42I don't like how this was just a test to
- 52:45see how the turret locks onto the player
- 52:47right away. Instead, I want to make it
- 52:49where by default the turret is scanning,
- 52:52going back and forth until it finds the
- 52:54player, and then it locks on, and then
- 52:56when the player leaves its radius or
- 52:59goes behind something, then the turret
- 53:02then locks off and continues scanning.
- 53:06Also, when the turret locks on to add a
- 53:08little bit of game feel, to let the
- 53:10player know, "Uh-oh, I'm in trouble." We
- 53:12also have under FPS game audio,
- 53:15blueprint switch scanner 01Q.
- 53:18Playing that
- 53:19will be the lock on and lock off sound.
- 53:23So let us start prompting.
- 53:29I want to change the turret that's how
- 53:31it doesn't lock onto the player
- 53:32automatically. Instead, by default, the
- 53:35turret is scanning. So the top of the
- 53:37turret is rotating a certain degrees
- 53:40back and forth, scanning until the
- 53:43player enters its field of view
- 53:46and then the turret then locks onto the
- 53:48player.
- 53:49When the player
- 53:51goes out of range of the turret or goes
- 53:53behind something then the turret then
- 53:56locks off and the player is safe. The
- 53:59turret goes back to scanning at that
- 54:00point. When the turret locks on and
- 54:03locks off, I want a sound to be played.
- 54:07Specifically blueprint switch scanner
- 54:0901_Q.
- 54:12So make sure you play that sound
- 54:14when the turret locks on and locks off.
- 54:17Also make sure to expose the degree that
- 54:21the turret is scanning, the angle.
- 54:23Also the field of view angle.
- 54:26How far the player has to be in order
- 54:29for the turret to see the player because
- 54:31of course if the player is across the
- 54:33map, I do not want I do not want the
- 54:35turret to see the player or to lock on.
- 54:38And
- 54:39also volume controls for the previous
- 54:43sound so I can control how loud they
- 54:44are.
- 54:45So go ahead and start to work.
- 54:48Just like that. And that is how I
- 54:50prompt.
- 54:52Stream of consciousness. Give it as much
- 54:54details as possible. Let it know what
- 54:55you want and it will start working. We
- 54:58are back. If I select the turret, go to
- 55:00details, it is exposing all the
- 55:02properties that I want. I can change its
- 55:04scanning angle, its field of view, and
- 55:07its sound.
- 55:08Pressing alt and S we'll see that it is
- 55:10scanning going back and forth within
- 55:13that angle.
- 55:15And now pressing play.
- 55:18I'll jump into its angle and then the
- 55:20turret will start to shoot at me.
- 55:22Now let's see what happens with the
- 55:23player goes behind an object.
- 55:25So I have
- 55:27this cube right here. I'll go ahead and
- 55:29raise this up.
- 55:31The player will now go behind.
- 55:33And then when the player then pops out
- 55:36we can see that it then logs on, it logs
- 55:38off.
- 55:40But currently there is no smooth
- 55:41animation.
- 55:43When the turret locks onto the player, I
- 55:45want a smooth animation cuz right now
- 55:47it's just snapping to immediately look
- 55:49at the player. That is not very
- 55:50realistic.
- 55:52So, let's add in a smooth animation and
- 55:54dampening
- 55:55to just tell the AI
- 55:58add a dampening and smoothing effect.
- 56:00Also give me properties to control the
- 56:02dampening and smoothing. That's how the
- 56:05turret doesn't just automatically lock
- 56:08onto the player. Instead, there should
- 56:10be some animation of the turret when
- 56:12it's locking on, starting to look,
- 56:15turning to look at the player.
- 56:17This is pretty crazy, but even the AI
- 56:20realized, "Hey, this looks wrong.
- 56:22Something might be up." Because for its
- 56:24previous output, it said two behaviors
- 56:26to know about, the lock on snap, and
- 56:28then it gave an explanation of what was
- 56:30happening. So, even the AI was like,
- 56:32"Maybe you should fix this."
- 56:35So, now this is a lot better. If I press
- 56:36play,
- 56:38and then walk up to the turret,
- 56:40we can see that it then locks on
- 56:42smoothly.
- 56:43And it also exposed all the necessary
- 56:46properties here. It even added a lock on
- 56:48delay, so notice how there was half a
- 56:50second where the turret didn't move. I
- 56:51do want to decrease that to 0.1 seconds,
- 56:54but there's also an issue now and then
- 56:56now you can see that when I'm moving
- 56:58normally, it's fine, but then as soon as
- 57:00I go behind the tree,
- 57:03it locks on and it locks off again. So,
- 57:04we need to fix that. Let's open up
- 57:06Claude.
- 57:07When the player goes behind an object,
- 57:08there should be a little bit of a lock
- 57:11off delay. That's how the player doesn't
- 57:13go behind a small object and then
- 57:15immediately enters the turret's field of
- 57:17view again, activating the lock on and
- 57:19lock off sound. So, there should be a
- 57:21little bit of a little bit of a delay,
- 57:23but
- 57:24if the turret cannot see the player, the
- 57:26turret should not fire. But the turret
- 57:28can still be locked on for just a little
- 57:30little more. Also, even if the player
- 57:32leaves the turret's field of view when
- 57:34the turret is locked on, the turret
- 57:36should still be locked on. It isn't
- 57:38until the turret leaves the distance
- 57:41radius
- 57:42or goes behind an object for a little
- 57:44bit, should the turret then lock off.
- 57:48So, now that issue is fixed. Pressing
- 57:50play,
- 57:51lock on to me,
- 57:53and then it will fire.
- 57:55If I go behind a small object, then it
- 57:57will not just lock off.
- 57:59And then if I go behind here, I have to
- 58:00wait.
- 58:01And then there's a little bit of a
- 58:03delay. Checking right here, we can see
- 58:05that the delay was
- 58:071 seconds.
- 58:09So, that's fine, but right now it is
- 58:11kind of hard to visualize the field of
- 58:14view, visualize how close the player has
- 58:16to be to the turret in order for the
- 58:17turret to lock on. So, that's why we can
- 58:19now add in essentially debug lines or
- 58:23visualizers just for ourselves as the
- 58:25level editor to make it easier for us
- 58:27when we are editing these properties.
- 58:29Because right now we do not have a good
- 58:30sense for the scan angle
- 58:33and the field of view and the detection
- 58:34range. So, we can expose these as debug
- 58:38visualization lines and also give
- 58:41ourselves 3D controls because it would
- 58:43be easier to control these properties
- 58:46with essentially a 3D widget in space
- 58:48than having to go into the details and
- 58:51then change it here.
- 58:53Create visualization lines for me that
- 58:55represents the scan angle and also the
- 58:58field of view and detection range to
- 59:00make it easier for me to edit those
- 59:02properties. Also, at the same time, give
- 59:04me 3D widgets in space that will control
- 59:07those properties. Make the lock on delay
- 59:09default 0.1 seconds.
- 59:13Oh, also, make sure that these debug
- 59:16visualizations, these lines will only
- 59:18show when the turret is selected and
- 59:22when we are not inside of game view
- 59:23mode. This is just for the level editor
- 59:25and it and I do not want every turret to
- 59:27show these lines, only when a turret is
- 59:29selected.
- 59:32I added the last part right here because
- 59:34obviously, if we have a lot of turrets,
- 59:36and then if we're debugging them, then
- 59:38all those lines will be everywhere, and
- 59:39they will get in the way of our level
- 59:41design.
- 59:42You do not have to add in 3D controls.
- 59:44This is just what I am doing personally
- 59:46because I think it is a lot nicer, and
- 59:48it is also a lot cooler controlling your
- 59:51gameplay elements this way. So, now if I
- 59:53select this,
- 59:54and I'll have to go out of game view
- 59:55mode, we now have visualizers. So, I can
- 59:58visualize its scan angle and its field
- 1:00:01of view.
- 1:00:02Also, let me dock.
- 1:00:04So, undock from sidebar the details
- 1:00:05panel, so we can actually look at it.
- 1:00:07And now if I grab one of my controls,
- 1:00:10when I control it, we'll see that's also
- 1:00:12controlling for the details. And I love
- 1:00:14doing this. I love giving my controls in
- 1:00:16the 3D world because after all, you're
- 1:00:19making a 3D game, so why don't your
- 1:00:21controls also be in the actual world?
- 1:00:23So, we control all of these
- 1:00:25easily, and also the detection range.
- 1:00:28I'll bring that in,
- 1:00:31too. So, everything we're able to
- 1:00:34control now a lot easier. And coding
- 1:00:37something like this probably wouldn't
- 1:00:39make sense if you're just solo devving.
- 1:00:41You would just have to push through, and
- 1:00:43then expose everything in in the details
- 1:00:45panel. But because the cost of adding in
- 1:00:48more features, more tool sets for
- 1:00:50yourself as a level designer is
- 1:00:52significantly less now than having to
- 1:00:54code it from scratch, it makes sense to
- 1:00:57basically create your own tools, expose
- 1:00:59as much as possible, create your own
- 1:01:01workflows that previously just didn't
- 1:01:03make sense beforehand. And I love this
- 1:01:07new workflow. Now, really quickly for
- 1:01:09all of my traditional developers who
- 1:01:11like blueprints, I will show the
- 1:01:12relationship between AI generated code
- 1:01:15and blueprints. If you are just purely
- 1:01:17vibe coding right now, in fact, if
- 1:01:19you've never even opened up a blueprint,
- 1:01:21then you can skip this part because I'm
- 1:01:23only talking to the pre-existing
- 1:01:25developers. Because right now we are in
- 1:01:28a transition period where UE6 next year
- 1:01:31will get rid of blueprints. Now, that
- 1:01:32doesn't mean you can't use blueprints.
- 1:01:35Of course, you can still use Unreal
- 1:01:36Engine 5, but blueprints is going away.
- 1:01:39In case you still want to use blueprints
- 1:01:41and use it with your C++ generated code,
- 1:01:43that is totally a viable option and
- 1:01:46workflow for you in the meantime.
- 1:01:48Specifically, we have always had a
- 1:01:50debate, well, should I use blueprints or
- 1:01:52should I use C++? And that's largely
- 1:01:54come down to personal preference. For me
- 1:01:56personally, I would always use
- 1:01:58blueprints. I love blueprints. Although
- 1:02:00you can do the majority of your game
- 1:02:02coding to C++, but in the end, just
- 1:02:04because it's easier for the engine to
- 1:02:06manage and for you to make quick
- 1:02:08changes, eventually your C++ class will
- 1:02:11become a blueprint class.
- 1:02:13Now, with AI, that has of course changed
- 1:02:15because the AI is better at managing C++
- 1:02:18code than blueprint nodes. But in case
- 1:02:21you still want to use blueprints,
- 1:02:23you can always, because this is just a
- 1:02:25normal C++ class, create a blueprint
- 1:02:28from this class,
- 1:02:29and I'll just save it in FPS game.
- 1:02:32I will delete this, so you do not have
- 1:02:34to follow along right now. And then this
- 1:02:36will create a blueprint like normal,
- 1:02:38even though its parent class was
- 1:02:39generated by C++. It is a normal
- 1:02:42blueprint. We can do all of the previous
- 1:02:45actions on it. For example, we can
- 1:02:47manually hand program some nodes right
- 1:02:49here or go into the class defaults,
- 1:02:52and then change, let's say if I want
- 1:02:55this variation, this child of the
- 1:02:57turret,
- 1:02:58to basically be a rapid fire turret,
- 1:03:01then under fire interval,
- 1:03:03I'll change this to 0.1 seconds.
- 1:03:05And to indicate that this is a new class
- 1:03:08from the original, located within my
- 1:03:10turret,
- 1:03:11I have a green color that I can use.
- 1:03:13I'll drag out to here.
- 1:03:15So, now my turret is green.
- 1:03:17Also, don't forget to compile.
- 1:03:20And now I will drag out
- 1:03:24my new green turrets,
- 1:03:27which is a blueprint. Press play,
- 1:03:30and now it is rapid firing at me.
- 1:03:33If I want to extend the logic of this
- 1:03:35blueprint, remember it is just a C++
- 1:03:38class. So just like in traditional C++
- 1:03:41coding with no AI, we will just expose
- 1:03:44properties and events to the blueprint
- 1:03:46graph.
- 1:03:47And to do so, just like everything in
- 1:03:49this tutorial, literally ask the AI.
- 1:03:52Now, I will reverse this. So this is
- 1:03:54just a temporary edit to show how
- 1:03:58I want a new event that will be called
- 1:04:02whenever the player shoots and hits the
- 1:04:04turrets. Call this turret death event.
- 1:04:08Also, I want you to expose this event so
- 1:04:10I can program it in blueprints. So
- 1:04:13whenever the player shoots a bullet and
- 1:04:16then that bullet hits the turrets, then
- 1:04:18we will call this event that's exposed
- 1:04:20to blueprints.
- 1:04:24So now within my event graph, we have
- 1:04:26exposed the turret event turret death
- 1:04:29that will be called when the player
- 1:04:31shoots a bullet at it. Now, I've already
- 1:04:33gone ahead and created the blueprint
- 1:04:35nodes that will handle this logic. So
- 1:04:39when the player hits it, we will of
- 1:04:41course start to simulate physics. Then
- 1:04:43we'll add an impulse so that the top
- 1:04:45static mesh pops out of the base and
- 1:04:48then play a nice little explosion
- 1:04:51Niagara effect and then we will play a
- 1:04:54sound to go along with that explosion.
- 1:04:56Pressing play, shoot,
- 1:04:58boom, pops right out.
- 1:05:01So now what this is essentially a hybrid
- 1:05:03workflow. Even though the majority of
- 1:05:05our turrets logic is being handled by AI
- 1:05:07generated C++ code, we still get control
- 1:05:10in case we really want to, to create
- 1:05:12normal blueprints nodes.
- 1:05:14Like how we used to. Now, we also could
- 1:05:17have used the Unreal MCP to create these
- 1:05:19nodes, but again, that wouldn't make
- 1:05:21sense. That'd be pretty slow having to
- 1:05:23go through the node graph. If we're
- 1:05:25already using AI, we're pretty much
- 1:05:26better off with just using the C++
- 1:05:29generated code. Now, for my case, I am
- 1:05:31not going to use blueprints. Instead,
- 1:05:33I'll just ask the AI to remake this
- 1:05:35functionality within the main turret C++
- 1:05:39class. Because the entire gaming
- 1:05:41industry is right now moving to AI
- 1:05:43generated code. For UE6, the primary way
- 1:05:47we program will be AI generated code.
- 1:05:49But in the meantime, in case you do want
- 1:05:51to slowly transition to this new future,
- 1:05:54you can of course still use blueprint
- 1:05:56programming in case you really want to.
- 1:05:59Now,
- 1:06:00let me go ahead and I'll delete that
- 1:06:01because I don't need it. In fact, I will
- 1:06:03delete my entire blueprint class because
- 1:06:05I will create variations of this turret,
- 1:06:07but those will all just still be C++.
- 1:06:10Now, I might still create a blueprint
- 1:06:13child class like the My Turret because
- 1:06:17one thing I like to do when I'm creating
- 1:06:18my levels is I like to select an object,
- 1:06:20press Ctrl B, which is the shortcut to
- 1:06:22jump to that location in the content
- 1:06:24drawer. That's how I can quickly grab it
- 1:06:27like this. Now, for C++ classes, if I
- 1:06:30select this, I'm unable to press Ctrl B,
- 1:06:32so I cannot jump to that C++ class. I
- 1:06:35have to manually go to it, which is a
- 1:06:37huge hassle. Also, what if I want to
- 1:06:39change its defaults?
- 1:06:41So, right now with the details, remember
- 1:06:43I changed its
- 1:06:45lock-on delay to 0.1 seconds. I would
- 1:06:47have to either jump manually into the
- 1:06:49C++ code to change its default or ask
- 1:06:53the AI to change its default. If I did
- 1:06:55make a child of the class, then editing
- 1:06:59the defaults is as easy as going to
- 1:07:01class defaults and then editing it here.
- 1:07:03So, then that's another benefit I would
- 1:07:05use for the blueprints. Essentially, the
- 1:07:08blueprints child classes are just
- 1:07:10wrappers now for the C++ class where the
- 1:07:13majority of the programming is now
- 1:07:16stored.
- 1:07:17I do not touch the event graph
- 1:07:19and maybe for the viewports, I would
- 1:07:21make some edits visually if I do think
- 1:07:24it makes more sense to edit visually
- 1:07:25within the editor. But for all the
- 1:07:28programming that is now done with C++.
- 1:07:32So, that is the example.
- 1:07:34Let me jump to this and delete it
- 1:07:37because we will move all that logic now
- 1:07:38to C++.
- 1:07:40Now, for me personally, I still do think
- 1:07:44we need a node graph to essentially
- 1:07:46function as
- 1:07:48a more advanced details panel because
- 1:07:50when we're interacting with the details
- 1:07:52panel, we can only change each variable
- 1:07:55once. We're unable to control, let's
- 1:07:58say, a workflow. So, what I would want
- 1:08:00to see from UE6 is the ability,
- 1:08:03essentially, a framework of a node graph
- 1:08:05where when we are prompting, the prompts
- 1:08:09will automatically expose different
- 1:08:10variables to a node graph, which will
- 1:08:12give us more manual control in the
- 1:08:14engine that just manually editing a
- 1:08:16variable here. Essentially, a
- 1:08:18higher-level orchestration level where
- 1:08:21the node framework is already built into
- 1:08:23the engine for us. For example, what if
- 1:08:25I'm creating a quest and then I want to
- 1:08:28create a new quest. Well, instead of
- 1:08:30having to each time create a new quest,
- 1:08:32have it do that and prompt that quest by
- 1:08:34default, the engine might automatically
- 1:08:36expose a lot of the essential quest
- 1:08:39events to this other graph orchestration
- 1:08:42level where I can then edit it like a
- 1:08:45details panel manually instead of having
- 1:08:47to use the AI. And I know that might
- 1:08:50have sounded like a mouthful and I might
- 1:08:52have gone into the theoreticals of what
- 1:08:55an engine should be. I'll probably make
- 1:08:57another video on this. So, I still do
- 1:09:00want a node graph, but the use cases
- 1:09:02would not be the hard programming.
- 1:09:04Instead, it would just be higher level
- 1:09:06settings than just your normal details
- 1:09:09panel.
- 1:09:10When the turret dies, stop its rotation,
- 1:09:12stop its shooting, it is now dead, and
- 1:09:15add physics enabled for the top turret,
- 1:09:18added an impulse that's how the top
- 1:09:20turret will pop out the base,
- 1:09:22and within the FPS game folder, there is
- 1:09:24an explosion particle, play the
- 1:09:27explosion particle, and play the
- 1:09:29explosion sound. Still give me the
- 1:09:31options to change the sound and the
- 1:09:33particle effect, also the volume of the
- 1:09:35sound within the details panel.
- 1:09:38And also, expose the impulse cuz maybe I
- 1:09:40want a lot of impulse or not that much.
- 1:09:43So, that is the logic for the turret's
- 1:09:44death.
- 1:09:46Now, that death function is inside of
- 1:09:48the C++ firing on it,
- 1:09:51it will explode and get a little bit of
- 1:09:53physics. So, now it's time to finish our
- 1:09:55turret build. Specifically, we will
- 1:09:57create two more turrets. And as a
- 1:09:58reminder, these turrets will not be for
- 1:10:00us, so we will eventually switch it
- 1:10:02over. That's how the turrets are only
- 1:10:04going after the enemies cuz these
- 1:10:05turrets will be friendly. We are the
- 1:10:07ones that are placing the turrets around
- 1:10:09our world.
- 1:10:10Specifically, I'll create two turrets.
- 1:10:12So, one turret will be green and will be
- 1:10:14a rapid fire turret. The other one will
- 1:10:17be blue and then essentially shoot out a
- 1:10:20grenade. We have a grenade located
- 1:10:23within the FPS game folder, SM_Grenade.
- 1:10:27This will shoot out a grenade
- 1:10:29and then it will bounce a little, and
- 1:10:32then have the same exact explosion,
- 1:10:34and damage me or the enemies within the
- 1:10:37specific radius around the explosion of
- 1:10:40the grenade.
- 1:10:42And
- 1:10:43for especially for the rapid fire, we've
- 1:10:45already remade a rapid fire turret
- 1:10:47specifically within the blueprint, but
- 1:10:49for our cases,
- 1:10:51we are going to purely vibe code this
- 1:10:53game just as a showcase of what is
- 1:10:55possible. So, I will remake that.
- 1:10:58This will be a pretty long prompt. In
- 1:11:00fact, the longer the prompt, the better
- 1:11:02because then you're giving it more
- 1:11:03details and you're aligning the AI a lot
- 1:11:06closer to your vision. So, the longer
- 1:11:08the prompts,
- 1:11:09the better. And I would say that
- 1:11:12even for this turret, we could have
- 1:11:13created everything we just did in one
- 1:11:16long prompt. Instead, I did a
- 1:11:17step-by-step to show what the workflow
- 1:11:19is by implementing a gameplay element
- 1:11:22feature by feature slowly. But, we could
- 1:11:24have also done this all with just one
- 1:11:26shot. And that's what we would do for
- 1:11:28the two variations.
- 1:11:31Create two variations of the turret. One
- 1:11:34turret will be a rapid-fire turret and
- 1:11:36the other turret will shoot out a
- 1:11:37grenade. For the rapid-fire turret, give
- 1:11:40it the green material color in FPS Game
- 1:11:44and then set its fire interval to 0.1
- 1:11:47seconds.
- 1:11:48I also want a
- 1:11:50new exposed properties for all my
- 1:11:51turrets, specifically to control the
- 1:11:54projectile speed because maybe I will
- 1:11:56want to decrease the initial projectile
- 1:11:58speed in the future.
- 1:12:00And for the grenade turret,
- 1:12:03I want that to use the blue color
- 1:12:05located in FPS Game. And within FPS
- 1:12:09Game, you'll see that there is a grenade
- 1:12:10mesh.
- 1:12:11I instead of the turret shooting out the
- 1:12:14bullet projectile, that blue turret will
- 1:12:16now shoot out the grenade mesh.
- 1:12:19So, the grenade will be fired and it
- 1:12:21will bounce twice. Although, give me
- 1:12:23control over how many bounces it takes
- 1:12:25for the grenade to explode. When it
- 1:12:27explodes, use the same particle effect
- 1:12:30and the sound that the death turret is
- 1:12:34currently using.
- 1:12:35Also, when a grenade explodes, there
- 1:12:38will be a radius. Give me control over
- 1:12:39the radius of effect where that turret
- 1:12:42will then damage.
- 1:12:44Now, I just realized that our player
- 1:12:46doesn't have health. So, also add in a
- 1:12:48health bar for my player. Give it 100
- 1:12:51points of health and
- 1:12:54the bullet projectile when it hits the
- 1:12:56player will do
- 1:12:57five damage to the player's health and
- 1:13:01then their grenade will do 10 damage.
- 1:13:03So, make sure I'm able to control the
- 1:13:05radius of the grenade.
- 1:13:09Okay, so that wasn't an insanely long
- 1:13:11prompt. You could even see that I did
- 1:13:13repeat myself at times, but that is
- 1:13:15fine. The AI will parse it. Again, there
- 1:13:17really is no prompt engineering. You
- 1:13:20just want to make sure that you give as
- 1:13:22much detail, as much information as
- 1:13:23possible
- 1:13:25to let the AI work.
- 1:13:28Now, we have two new turret classes. So,
- 1:13:31we have our grenade turret, our
- 1:13:33rapid-fire turret, and a grenade
- 1:13:35projectile, which will be the grenade
- 1:13:37that is shot at the player. If I press
- 1:13:39play, you'll see how on the bottom
- 1:13:41left-hand corner, we also have a health
- 1:13:43bar that will go down when I get shot.
- 1:13:46So, let me activate the grenade
- 1:13:48getting near this person.
- 1:13:50Now, it is
- 1:13:52going to fire a grenade at me and then
- 1:13:55it is decreasing my health.
- 1:13:57So,
- 1:13:58we no longer need that
- 1:14:00and let's check on the rapid-fire
- 1:14:02shooting at me just a bunch.
- 1:14:05Also going to fire at that. If you would
- 1:14:06like to support the channel, then you
- 1:14:08can check out the Unreal Master Class
- 1:14:10and continue learning Unreal after this
- 1:14:13video. The Unreal Master Class is an
- 1:14:15expanding collection of exclusive
- 1:14:17courses covering everything from
- 1:14:19creating a complete game from scratch to
- 1:14:21animating your own short film or in-game
- 1:14:24cutscenes. Whether you are interested in
- 1:14:26virtual reality, environment design,
- 1:14:28architectural visualization, or
- 1:14:30cinematic filmmaking, you'll learn how
- 1:14:32to use the engine's most powerful
- 1:14:34features and gain a deeper understanding
- 1:14:37of what's possible with Unreal. It's the
- 1:14:39largest and most comprehensive Unreal
- 1:14:41Engine training program available,
- 1:14:43designed to take you from the
- 1:14:44fundamentals all the way to advanced
- 1:14:47topics.
- 1:14:48The masterclass will continue to grow
- 1:14:49and evolve alongside Unreal. As new
- 1:14:52versions like Unreal Engine 6 are
- 1:14:53released, members will get access to new
- 1:14:56and updated courses. There's a link to
- 1:14:58check out the masterclass in the
- 1:14:59description below.
- 1:15:01If you want to take your AI skills to
- 1:15:03the next level and create more complex
- 1:15:05Unreal projects, then you're in luck
- 1:15:08because I just launched the AI Centrals
- 1:15:10for Unreal, which is a brand new course
- 1:15:12that is inside of the Unreal
- 1:15:13masterclass. The course goes beyond what
- 1:15:16we covered in this tutorial, taking a
- 1:15:18deeper dive into the fundamentals of AI
- 1:15:20assisted programming, how to effectively
- 1:15:22communicate with AI, and how to use it
- 1:15:24to build more complex systems and even
- 1:15:27entire games. And best of all, these
- 1:15:29skills aren't limited to Unreal Engine.
- 1:15:32The AI fundamentals you learn can be
- 1:15:33applied to other game engines and
- 1:15:35software development in general. To
- 1:15:38learn more, check out the Unreal
- 1:15:39masterclass. If you are a member of the
- 1:15:41masterclass, then that turret example
- 1:15:44might have been familiar to you because
- 1:15:46in the masterclass, one of the courses
- 1:15:48covers C++ coding and specifically to
- 1:15:52teach how to code. As long as you do
- 1:15:54know the essentials of programming
- 1:15:55through blueprints, we created these
- 1:15:57turrets. And these turrets function
- 1:16:00exactly the same as the turrets that we
- 1:16:03just made through AI. So, these are
- 1:16:05turrets
- 1:16:06that were programmed in C++. To then
- 1:16:09create
- 1:16:11a simple game
- 1:16:12where the player has to navigate this
- 1:16:14obstacle course, destroy the turrets,
- 1:16:16and then get to the very end. And this
- 1:16:18was all done about 1.5 years ago when
- 1:16:22C++ coding AI generated code wasn't
- 1:16:25really good. So, we went through and
- 1:16:28then everything was hand coded. And now
- 1:16:30we were able to recreate this
- 1:16:32functionality just with a couple of
- 1:16:34prompts. And we were doing small
- 1:16:37prompts, creating the turrets feature by
- 1:16:39feature to show how to AI code. But for
- 1:16:43our cases we totally could have just
- 1:16:44created all three of the turrets through
- 1:16:47one massive prompt by one shotting it.
- 1:16:50So, what we used to code by hand can now
- 1:16:53be done just with one single prompt. And
- 1:16:55that is insane how much has changed in
- 1:16:58just 1.5 years from when this course
- 1:17:00released.
- 1:17:02So, now the question is should we still
- 1:17:03learn how to program? And I would say,
- 1:17:06yes, you should still learn how to
- 1:17:07program because it gives you a
- 1:17:09fundamental understanding of what the AI
- 1:17:11is doing. It helps you think like a
- 1:17:13developer and the higher level
- 1:17:15decisions, such as architecture, how
- 1:17:18your game works, how you the level
- 1:17:20designer will interact with the code is
- 1:17:22still up to you. So, by knowing how the
- 1:17:25code works or by having a very broad
- 1:17:27understanding of the fundamentals of
- 1:17:29programming, it can help you prompt
- 1:17:31better.
- 1:17:32But when you are learning how to program
- 1:17:34by hand, know that you're doing it for
- 1:17:35yourself. You're doing it to build your
- 1:17:37own confidence. If you actually want to
- 1:17:39build something, for all practical
- 1:17:42intentions, do not hand write code. Do
- 1:17:44not create complicated blueprints.
- 1:17:47Because AI, and only it wasn't like this
- 1:17:50until recently, AI can code better and
- 1:17:54faster than humans. If you actually want
- 1:17:56to build, do something, AI generate it.
- 1:18:00And the best game programmers in the
- 1:18:02world, such as John Carmack and Notch,
- 1:18:05now they are using AI coding. So, if
- 1:18:08they know that the AI can help build
- 1:18:11better and faster, then we should all be
- 1:18:14using AI coding tool. And it's actually
- 1:18:16equalizer because now we all have access
- 1:18:19to the same tools, which means we can
- 1:18:21all build similar things. We're no
- 1:18:23longer limited to our knowledge. Now
- 1:18:25literally the sky is a limit. I would
- 1:18:27say that
- 1:18:29when I was getting my computer science
- 1:18:30degree, they had me learn assembly and
- 1:18:33write a mini compiler. Now, throughout
- 1:18:36my software engineering career, did they
- 1:18:38actually think I would need to write
- 1:18:40assembly or create a compiler? Probably
- 1:18:42not. But, doing that helped give me the
- 1:18:45fundamental understanding of the history
- 1:18:48of software, what is happening behind
- 1:18:50the hood, and it gave me more confidence
- 1:18:52when I was writing the higher-level
- 1:18:54languages such as C++, such as Python.
- 1:18:57Now, everything has just moved where if
- 1:19:00you learn C++ and how to program, then
- 1:19:02you build more confidence for yourself
- 1:19:05when you are AI generating. But, all
- 1:19:07code moving forward is now going to be
- 1:19:10AI generated. Before we move on to now
- 1:19:12creating our enemies and actually
- 1:19:14building out our entire game, let's talk
- 1:19:16a little bit about AI generated art. So,
- 1:19:20so far throughout this entire tutorial,
- 1:19:22we have been using AI generated code,
- 1:19:25not art. The reason why I make that
- 1:19:28distinction is because as of October,
- 1:19:30Steam makes that distinction. If you use
- 1:19:33AI generated code, like everything we
- 1:19:36just did, but all the art assets are
- 1:19:38human-made, you do not need the Steam AI
- 1:19:41disclosure because every game at this
- 1:19:44point now uses AI generated code one way
- 1:19:47or another. You cannot interact with a
- 1:19:49piece of software, whether that be
- 1:19:51YouTube, your OS, an engine, without
- 1:19:53interacting with AI generated code. It
- 1:19:56is now industry standard. It is
- 1:19:58everywhere. What is it is AI generated
- 1:20:01art as of now. So, Steam, you only have
- 1:20:04to show that you're using AI if you are
- 1:20:07using AI generated art, which includes
- 1:20:10your materials, sounds, narrative, the
- 1:20:133D models. These 3D models I made
- 1:20:16myself. They were handmade. Also, there
- 1:20:19are a bunch of a really great 3D models
- 1:20:21on Fab currently that you can use in
- 1:20:24your project. And just like what I
- 1:20:26showed earlier, the way that you would
- 1:20:28have the AI use the 3D models that
- 1:20:30already exist within your project is to
- 1:20:33just tell the AI, "Hey, when you're
- 1:20:35building this class, I want you to use
- 1:20:37turret_base or turret_top."
- 1:20:41So, you can download any of these models
- 1:20:43or asset packs for Fab and simply tell
- 1:20:45the AI to use them. And there are
- 1:20:48thousands upon thousands of free amazing
- 1:20:51assets. You can come over to price and
- 1:20:53make sure only free product is turned on
- 1:20:56to look at them. The reason why I bring
- 1:20:57this up is because this is a huge
- 1:20:59benefit of using Unreal is that you
- 1:21:01already have all of the products that
- 1:21:04are currently on Fab, whether that be
- 1:21:06paid for or free, that you can use. You
- 1:21:08don't have to just generate them all
- 1:21:10from scratch. Because AI can generate 3D
- 1:21:13models, it does take, as of October, a
- 1:21:16lot of time. Now, the AI model
- 1:21:18generation is getting really good. So,
- 1:21:21as a high-level summary of what is
- 1:21:23happening, and I will have videos about
- 1:21:25this a lot in the future, there are
- 1:21:28currently two ways we can generate 3D
- 1:21:30models. is through using a specialized
- 1:21:33AI that only generates 3D models.
- 1:21:36Because you can train an AI model to
- 1:21:38only be good or just do one thing. For
- 1:21:41example, with Midjourney, the only thing
- 1:21:43it does is that it produces images.
- 1:21:45There are specific models, and the only
- 1:21:48thing they do and they've been trained
- 1:21:49on is create 3D models. Specifically,
- 1:21:52the biggest ones are Hunyan from China,
- 1:21:55Tripo, and Meshy.
- 1:21:58And when Epic Games showed off their new
- 1:22:00AI node graph that is releasing next
- 1:22:02year, they showed off a using Tripo to
- 1:22:04generate a 3D model inside of Unreal
- 1:22:07Engine. So, those are the three big
- 1:22:09ones, although there are now tens and
- 1:22:12dozens of 3D model generators. We will
- 1:22:14talk about those in the future. And the
- 1:22:16second way is through large language
- 1:22:18models. And this wasn't possible until
- 1:22:21recently, specifically July, because the
- 1:22:24AI models, the LLMs, so your big AIs,
- 1:22:27such as ChatGPT and Claude, which we
- 1:22:29have been using throughout this entire
- 1:22:31video, have gotten insanely good at 3D
- 1:22:34model generation. Because in the end, 3D
- 1:22:37model generation is just text. It's just
- 1:22:40points in space and the relationships
- 1:22:42between these points. So a large
- 1:22:44language model like Opus 5.5 can create
- 1:22:48scripts and can create the text to then
- 1:22:50generate these 3D models. Or they can go
- 1:22:53through a program like Blender, because
- 1:22:55whenever we're taking an action within a
- 1:22:57piece of software like Unreal Engine,
- 1:22:59like Blender, all these actions can be
- 1:23:02represented by text, too. So Blender has
- 1:23:04their own MCP, and the modern AIs, such
- 1:23:08as Astra and Opus and Fable, are
- 1:23:10insanely good at using the Blender MCP
- 1:23:14to create 3D models from scratch. So you
- 1:23:17can watch it use Blender and create a
- 1:23:19model from nothing. So that is the
- 1:23:21second way 3D models are now created. So
- 1:23:24this is a rapidly evolving field. It
- 1:23:27wasn't until July did the LLM's become
- 1:23:30capable at creating 3D models. And we
- 1:23:33are near approaching the point where you
- 1:23:35cannot tell if your 3D model was created
- 1:23:37by a human or was created by the AI. So,
- 1:23:42as of now though, we already have a
- 1:23:44bunch of 3D models. We don't have to
- 1:23:46generate them from scratch, so we can
- 1:23:48use FAB. Another part of game design
- 1:23:51that the AI struggles with right now is
- 1:23:53with character animation, locomotion,
- 1:23:56and game feel. And by locomotion, I mean
- 1:23:59the animations of the character when you
- 1:24:01control them in third person. So
- 1:24:03specifically for this demo, the entire
- 1:24:06game is pretty much all AI generation
- 1:24:09through procedural algorithms the AI
- 1:24:11created, except the character. This
- 1:24:13locomotion, this animation system, feels
- 1:24:16really good because it's from FAB. It
- 1:24:18was already pre-created. So it has that
- 1:24:20game feel built into it. And this is a
- 1:24:23big issue with a lot of AI-generated
- 1:24:25games now, specifically the third-person
- 1:24:27ones, and that is you look at the game
- 1:24:30and it's mechanically sound. The code is
- 1:24:32there, but the actual character
- 1:24:34animations are terrible.
- 1:24:36So, that is one of the benefits of using
- 1:24:38Unreal Engine. If you generate a game
- 1:24:40for the web through Claude or ChatGPT,
- 1:24:43essentially what you're doing is that
- 1:24:45you're you are rewriting the engine,
- 1:24:47creating brand new tools each time you
- 1:24:49generate a new game. And that doesn't
- 1:24:51really make sense if we already have a
- 1:24:53good foundation within the engine and
- 1:24:55pre-existing assets on Fab. Specifically
- 1:24:58for the planet generation demo, I am
- 1:25:01using the Advanced Locomotion System V4
- 1:25:04by Caleb Longbuyer. Now, this is a
- 1:25:06really famous asset. It was so famous
- 1:25:09that Epic Games went ahead and then
- 1:25:10hired this person to then work on
- 1:25:13essentially the spiritual successor,
- 1:25:15which is the game animation sample that
- 1:25:18we have all used in the community. And
- 1:25:21this is an amazing pack. It comes with
- 1:25:23hundreds of different animations. And if
- 1:25:25we were to have the AI generate all of
- 1:25:28these, now it could, and it is getting
- 1:25:30better. Epic Games themselves are
- 1:25:32experimenting with AI-generated
- 1:25:34animations. So, you could use a
- 1:25:37dedicated AI just for character
- 1:25:39animation and then through hundreds and
- 1:25:42hundreds of prompts get to a locomotion
- 1:25:44system that feels good. But why would we
- 1:25:47go through that hassle? And most people
- 1:25:49don't when they're generating a game
- 1:25:51when you already have a great sample
- 1:25:53content here for you ready to be used.
- 1:25:56So, that's what I suggest you do,
- 1:25:58especially if you're doing a
- 1:25:59third-person game, is don't generate
- 1:26:02everything. Go on Fab, use the existing
- 1:26:05assets, use the tools inside of Unreal
- 1:26:07Engine, and you will get a lot out of
- 1:26:09your game. For the rest of the tutorial,
- 1:26:11I will just be prompting, testing,
- 1:26:14prompting, iterating on the game,
- 1:26:16testing new features. Maybe I don't like
- 1:26:18a feature, then I get rid of it, and
- 1:26:20just experimenting and seeing how this
- 1:26:22game pans out. Because the true power
- 1:26:26with AI is iteration. Because games are
- 1:26:29just made up of features. And sometimes
- 1:26:31when you're creating a game, you think
- 1:26:33that a feature might be good, so you
- 1:26:35spend 2 weeks coding that feature, it's
- 1:26:38in your game, and then you realize,
- 1:26:39uh-oh, this doesn't make sense. It
- 1:26:42doesn't feel good in the game, it
- 1:26:43doesn't fit in it. So then you have to
- 1:26:45scrap that feature, and there goes 2
- 1:26:47weeks. Now, and this is the true power
- 1:26:50with AI is that your feedback loop for
- 1:26:53creating your game is now what was 2
- 1:26:56weeks is now just 1 hour. So, I can test
- 1:26:59a feature by just a single prompt. And
- 1:27:02then if I don't like that feature, roll
- 1:27:04back, get rid of it, and continue with a
- 1:27:07new feature. So, by continually
- 1:27:09iterating over and over again, you can
- 1:27:11create an even better game than you
- 1:27:13would have than coding everything
- 1:27:15manually because of the time save. And
- 1:27:18you can hand the AI as much creative
- 1:27:21control as you want. In my case, I like
- 1:27:24to get back creative control, so my
- 1:27:27features, each time I prompt, will be
- 1:27:29pretty small. That's why I can test that
- 1:27:31feature before moving on, but you could
- 1:27:34and I mentioned this with the turrets,
- 1:27:36that with all the turrets right now, we
- 1:27:38did a prompt by prompt, I could have
- 1:27:40just told it to create the turret, gave
- 1:27:43it all the different instructions, say
- 1:27:44to create three different turrets, and
- 1:27:46the AI also would have done it. And that
- 1:27:48is sort of what we are about to do with
- 1:27:50the enemy because now let's make the
- 1:27:52blob enemy. So, we'll make an enemy, and
- 1:27:56then I will switch the turrets over, so
- 1:27:58they're no longer firing at me, and
- 1:28:00they're now firing at the blob.
- 1:28:03Specifically, I want a blob enemy that
- 1:28:05is similar to the enemy that was
- 1:28:07generated for the Unreal Engine 5
- 1:28:09beginner tutorial 2026. Close out of my
- 1:28:12prompt.
- 1:28:12>> So, this blob was already generated. I
- 1:28:14have it on my computer. I could migrate
- 1:28:16this enemy asset over to my new project,
- 1:28:21but then that would kind of defeat the
- 1:28:23purpose of this tutorial, and that is I
- 1:28:25want to show you the entire process of
- 1:28:28generating everything. So, instead I
- 1:28:30will regenerate this blob.
- 1:28:32But, I will take the specific prompt
- 1:28:35that I used right here.
- 1:28:36And instead of typing out this prompt,
- 1:28:39I will steal it. So, I'm stealing my
- 1:28:41prompt.
- 1:28:42Going back into Claude, because this is
- 1:28:45a brand new feature, we really don't
- 1:28:47need the context of me creating the
- 1:28:49turrets. I'll create a new chat, making
- 1:28:52sure it's in my current project.
- 1:28:54The plus,
- 1:28:55and then I will add that image in there.
- 1:28:58And I do want it to be as close to my
- 1:29:00original blob that I generated as
- 1:29:02possible.
- 1:29:03So,
- 1:29:04I'll take a photo of my blob. This looks
- 1:29:07like a good one, so I will also
- 1:29:09screenshot this guy.
- 1:29:12And then add it right here.
- 1:29:14If there's ever something you find on
- 1:29:16the internet and you like it, you want
- 1:29:18to use it as inspiration for the AI,
- 1:29:21literally just take a screenshot, upload
- 1:29:23it, and now I'll say,
- 1:29:26"Run this prompt from the first photo
- 1:29:28and make it look like the blob from the
- 1:29:30second photo." And then send it off.
- 1:29:33Because this is a pretty big task,
- 1:29:36I will set it to high for the effort
- 1:29:39level.
- 1:29:40Currently, the AI is a little bit
- 1:29:41confused because in this prompt, I'm
- 1:29:42referencing a death function and an
- 1:29:44obstacle course that we were creating in
- 1:29:46the previous video. So, I'll go ahead
- 1:29:48and tell it, "Ignore the obstacle course
- 1:29:50and the death function. Just focus on
- 1:29:52creating the enemy blob, and make sure
- 1:29:54the enemy blob is going towards the
- 1:29:55player. You can ignore those other
- 1:29:57phrases."
- 1:29:59If we analyze the prompt, and you can
- 1:30:00watch me generate the original blob
- 1:30:03within the UE6 beginner tutorial, but as
- 1:30:05you'll see multiple times, I talk about
- 1:30:08a squishy sphere, I talk about squash
- 1:30:10and stretch, and making it feel alive.
- 1:30:13That is me telling the AI to add in cool
- 1:30:16animations to make it feel lively, like
- 1:30:19it's an actual character. Also notice
- 1:30:21how I say this is a long-running task.
- 1:30:24That's also to tell the AI, "Hey, you
- 1:30:26can take your time. Make sure this looks
- 1:30:29really cool."
- 1:30:31Do keep in mind that teaching AI game
- 1:30:33development, this entire process, and AI
- 1:30:36in general is non-deterministic. That
- 1:30:38means it is random. You can give the
- 1:30:40same exact prompt as me, and the results
- 1:30:43can be completely different. This is an
- 1:30:45interesting switch for me because in the
- 1:30:47past, if I'm teaching blueprints, if I'm
- 1:30:49teaching C++, you, the audience, you
- 1:30:52could just follow along, and then you'll
- 1:30:54get exactly what you see on my screen.
- 1:30:57Now, that is no longer the case because
- 1:30:59AI is so random. Because of that, even
- 1:31:02though you're watching me right now
- 1:31:03create prompts, go back and forth,
- 1:31:05you're just watching the workflow and
- 1:31:07you see how I'm going about creating
- 1:31:08this game. This is, after all, your
- 1:31:10game. You should be prompting stuff
- 1:31:12completely different because even if you
- 1:31:14do try to get a game pretty similar to
- 1:31:17mine, you're going to you're going to
- 1:31:18end up with something entirely
- 1:31:20different.
- 1:31:21And now, this is the blob. Pressing
- 1:31:24play.
- 1:31:26This is what I was expecting. This looks
- 1:31:28good. You can see when he bounces
- 1:31:29around, there's a lot of squash and
- 1:31:30stretch.
- 1:31:31He's just trying to jump at the
- 1:31:32character. So, number one, I want to
- 1:31:34make it where when I shoot at the blob,
- 1:31:37maybe it makes like a little noise, and
- 1:31:39there's some impact. The blob might
- 1:31:41flash red a little bit to tell us that
- 1:31:43we are making impact at the blob. And
- 1:31:46number two, his eyes are way too small.
- 1:31:48I did not like that.
- 1:31:50So, let's bring back Claude.
- 1:31:53Make the blob's eyes bigger and more
- 1:31:56elongated like an oval. Also make sure
- 1:31:58that the blob can also blink. And
- 1:32:01currently, when the blob is jumping up
- 1:32:04and down, its eyes go into its body. So,
- 1:32:07its eyes clip into its bodies, its eyes
- 1:32:09disappear. I do not want that to happen.
- 1:32:11The eyes should always be out front, not
- 1:32:14clipping into the blob's body. Now, I
- 1:32:17want to give the blob health, and its
- 1:32:19health will go down when the player
- 1:32:21shoots at it. So, when a bullet hits the
- 1:32:23blob, then the blob will be injured. Add
- 1:32:25a little bit of pushback. So, the blob
- 1:32:28will go back when it's shot. And have
- 1:32:32the blob let out a little bit of a
- 1:32:34screech when it's shot, and also flash
- 1:32:38red
- 1:32:39to indicate that the player is shooting
- 1:32:41the blob.
- 1:32:43And then eventually, let's give it a
- 1:32:45health of
- 1:32:4710, and the bullets will do damage of
- 1:32:50five. So, two hits by the player, the
- 1:32:52blob is dead.
- 1:32:55And we are back. We have a brand new
- 1:32:57blob. Pressing play, let's see what it
- 1:32:59looks like when I shoot at it.
- 1:33:02That is exactly what we want to see.
- 1:33:03Notice how there's a little bit of a
- 1:33:05kickback. Also, it flashes red. This
- 1:33:07makes it really satisfying to hit a
- 1:33:10blob. Also, within the details,
- 1:33:13our first group is the transform group,
- 1:33:15and then below that is the blob group
- 1:33:17that contains all of the exposed
- 1:33:18properties that we need. And it is a
- 1:33:20second group because remember, we set
- 1:33:23that up as a rule for the claw.md.
- 1:33:26Now, at this point, we have crossed the
- 1:33:29Rubicon in that this is AI-generated
- 1:33:32art. Everything we did beforehand was
- 1:33:34AI-generated code according to Steam.
- 1:33:36Now, this is art because we AI-generated
- 1:33:40the sound. We can see down here. I'm
- 1:33:42able to flip the sound.
- 1:33:44So, we have all these nice sounds.
- 1:33:47And also the animations of the blob
- 1:33:49moving by itself is also AI-generated.
- 1:33:52And that is art because it is
- 1:33:54player-facing.
- 1:33:56Now, what I could have done is also use
- 1:33:58an asset from Fab. Specifically, I could
- 1:34:01have gone here, typed in skeleton, and
- 1:34:03find some skeleton enemies. Maybe
- 1:34:07these pirate skeletons are invading the
- 1:34:09castle. Download this, and then use that
- 1:34:13by telling the AI to use the skeleton as
- 1:34:15the main enemy. In my case, I just want
- 1:34:17to make a blob because I think I don't
- 1:34:19know. The blobs just look really cute.
- 1:34:21Also, strategically, I'm picking a blob
- 1:34:24enemy because I know that within the
- 1:34:27engine, a sphere is already
- 1:34:29pre-existing. This is the most common
- 1:34:32type of object in 3D.
- 1:34:34So, if I did say to generate, for
- 1:34:37example, a skeleton, then the AI would
- 1:34:39have taken a very long time, and the
- 1:34:41odds of that 3D model looking nice would
- 1:34:44probably have been low. So, I picked a
- 1:34:47sphere because spheres already exist. It
- 1:34:49would be easy for the AI to generate it.
- 1:34:52Now, it's time for the great switch-up,
- 1:34:55and that is for my turrets. The turrets
- 1:34:57are currently evil. Now, my turrets will
- 1:35:00be my friends.
- 1:35:01So, I will tell the AI to now target.
- 1:35:05That's how the turrets will attack and
- 1:35:07try to destroy the little blob guys.
- 1:35:10The turrets are my friends. They will no
- 1:35:12longer attack me.
- 1:35:14So, let's tell Claude.
- 1:35:16Make all the turrets now friendly. They
- 1:35:18behave exactly the same as they did
- 1:35:20beforehand, but now instead of targeting
- 1:35:22the player, they will only target and
- 1:35:24attack the blob enemies.
- 1:35:29All right, the moment of truth. I'm
- 1:35:31going to move my turret over here.
- 1:35:34Then assimilate.
- 1:35:38All right, what if there's multiple
- 1:35:39blobs?
- 1:35:49Brutal execution.
- 1:35:52So, this is now working and if I'm the
- 1:35:54player character
- 1:35:57going into, we'll see that the turret is
- 1:35:59not targeting me.
- 1:36:01It is just targeting these blobs.
- 1:36:06I do want to edit its death, maybe make
- 1:36:09it where the blob then disintegrates.
- 1:36:12Also, give me the option. Let's see if I
- 1:36:14already do have the option to increase
- 1:36:15its health.
- 1:36:19Okay, I do. So, I can increase the
- 1:36:21health here.
- 1:36:24I like the way that the blob currently
- 1:36:26works
- 1:36:27for its death, but I want to add in a
- 1:36:28new death that is an emissive
- 1:36:31disintegration.
- 1:36:32So, instead of the blob flattening,
- 1:36:36then the blob will still be a red
- 1:36:38emissive, but then the entire blob will
- 1:36:41then slowly
- 1:36:43not slowly, but transition randomly into
- 1:36:46a particle effect where the particles
- 1:36:48are glowing red at first, but then they
- 1:36:50turn into dust. So, the entire blob mesh
- 1:36:53will become a Niagara particle with a
- 1:36:56lot of particles to indicate essentially
- 1:36:58the blob becoming embers and dust. I do
- 1:37:02want to save the original death feature
- 1:37:04in case I want to roll back to it. So,
- 1:37:06make this a toggle, but enable it by
- 1:37:09default for the death disintegration.
- 1:37:13This is what I often like to do is that
- 1:37:15when I'm adding in a new feature and I'm
- 1:37:17not sure if I like that feature, maybe I
- 1:37:18want to AB test, see what it feels like
- 1:37:21with the feature turned on or off, then
- 1:37:23I will explicitly tell the AI, "Hey,
- 1:37:26keep the way that this originally works
- 1:37:29because I want to test both of them."
- 1:37:30And then if I do like the new feature, I
- 1:37:32can always tell the AI to get rid of the
- 1:37:34old one or just keep the old feature
- 1:37:36because it's not enabled.
- 1:37:38It is now done and something that was
- 1:37:40pretty cool was that I did forget to
- 1:37:42close Unreal and whenever you do, don't
- 1:37:44worry, the AI will then remind you,
- 1:37:46"Hey, you forgot to close Unreal. Let me
- 1:37:48know when you close it." So, I closed
- 1:37:50it. I told it that I closed it, and then
- 1:37:52it continued working. Within Unreal
- 1:37:55headless mode, it even took photos
- 1:37:58of the particle effect to make sure
- 1:37:59everything was working. So, now let's
- 1:38:02take a look at it.
- 1:38:04Okay, I do like
- 1:38:06I do like the look of that. Now, the
- 1:38:09turret stopped firing because it went
- 1:38:12out of its range. So, remember, I can
- 1:38:14just grab the detection range and then
- 1:38:16increase the size.
- 1:38:18So, that will ensure
- 1:38:20that those blobs never escape
- 1:38:22the range of the turret. So, now it is
- 1:38:24time to work on actually the majority of
- 1:38:27our game, and that is the wave system.
- 1:38:29So, I want it where the blobs will spawn
- 1:38:31somewhere. They'll go towards the
- 1:38:33direction of which will eventually be
- 1:38:36the castle, but for now, just as
- 1:38:39an example, let's create just a mini
- 1:38:41castle. So, just grab this thing
- 1:38:45and bring it all the way over here.
- 1:38:48So, the blobs will attack
- 1:38:51this mini castle.
- 1:38:53So, I need to define the area that the
- 1:38:55blobs will spawn in, the area that the
- 1:38:57blobs will then go towards, and attack.
- 1:39:00And then we can test the wave system
- 1:39:03from there.
- 1:39:04Now, specifically, when we are working
- 1:39:06in 3D and we need to define an area for
- 1:39:09gameplay, that is called a volume. If I
- 1:39:11come up to the plus, go down to volumes,
- 1:39:14you'll see that we have a bunch of
- 1:39:15different options. For example, a
- 1:39:18location volume, and I'll press G key to
- 1:39:21make sure I do see it. And a volume is
- 1:39:23just a box in space. And what we are
- 1:39:26going to do is that I want to tell the
- 1:39:27Unreal to create a volume, which will be
- 1:39:29the spawn location for the blobs, and
- 1:39:32then a volume which will represent where
- 1:39:34the blobs are going to attack. And right
- 1:39:36now, the blobs will just walk in a
- 1:39:38straight line going from their spawn to
- 1:39:40the attack location, but we will path
- 1:39:43that later with a spline.
- 1:39:45So, I'll create a new feature.
- 1:39:49Let's create the core logic for a
- 1:39:50wave-based tower defender. Specifically,
- 1:39:53the player with the turrets will be
- 1:39:55defending the tower against a wave of
- 1:39:57enemy blobs. So, have two volumes. One
- 1:40:00volume is the blob spawner, where the
- 1:40:02blobs will spawn, and the other volume
- 1:40:03is the attack volume, where the blobs,
- 1:40:05after they spawn, will immediately start
- 1:40:07to rush towards the attack volume. As
- 1:40:10soon as a blob enters the attack volume,
- 1:40:12they will blow up using the same
- 1:40:14explosion mechanics from the turrets,
- 1:40:17and then the tower will lose health. Of
- 1:40:19course, when the tower's health is at
- 1:40:22zero, then the player will lose. So, the
- 1:40:24entire point of the game is for the
- 1:40:26player to defend the tower, and as the
- 1:40:28player or turret defeats a blob, then
- 1:40:32the player will earn some cash. And with
- 1:40:34that cash, the player can then press the
- 1:40:36R key to open up a menu where they can
- 1:40:39then buy the other turrets.
- 1:40:41Specifically, we just have three turrets
- 1:40:42right now. The least expensive turret,
- 1:40:45the basic one, is the orange turret. And
- 1:40:47then the rapid-fire turret is the tier
- 1:40:49above that, and the most powerful turret
- 1:40:52is the grenade turret.
- 1:40:53After each wave, the player has 10
- 1:40:57seconds to set up more turrets to defend
- 1:41:00the tower. With each new wave, then the
- 1:41:02blobs will
- 1:41:04be increased, so there'll be more blobs,
- 1:41:06and then also the blobs' health will
- 1:41:08also increase. I do get the size of the
- 1:41:10blobs, that's how they look more
- 1:41:12interesting.
- 1:41:14Now, for the settings for this tower
- 1:41:16defense game, I want you to expose all
- 1:41:19the necessary settings, as much as you
- 1:41:21can think of,
- 1:41:22to an actor called wave settings. So,
- 1:41:25this actor, I can drag it to my world, I
- 1:41:27can just select it, and then the details
- 1:41:29will contain all the necessary settings
- 1:41:31where I get full control over this game.
- 1:41:34So, go ahead and create the core game
- 1:41:35logic, specifically the spawn volume,
- 1:41:38the attack volume, and the wave settings
- 1:41:41actor.
- 1:41:44So, you can see that this was
- 1:41:46an insanely long prompt. You just
- 1:41:48watched me for 1 minute say all of this,
- 1:41:51but that's because this is the majority
- 1:41:53of our game.
- 1:41:55So, I'll go ahead and exit out.
- 1:41:57Notice how I did mention that I wanted
- 1:41:59object that contains all the necessary
- 1:42:01settings for my game. Often times, if
- 1:42:03there is a game mechanic that spans
- 1:42:05multiple different game elements as a
- 1:42:07way to control all of them easily, I
- 1:42:10will ask the AI to basically create a
- 1:42:12settings actor, which in our case is
- 1:42:15just an object I could drag into the
- 1:42:16world that I can select and from there
- 1:42:19just control all those different
- 1:42:20settings easily for me.
- 1:42:23And we are now back.
- 1:42:25So, we have a lot of new classes,
- 1:42:28specifically the blob spawn volume. It
- 1:42:30even has text right there to remind me
- 1:42:32that this is the blob spawn. I'll go
- 1:42:34ahead and move this over here. Again,
- 1:42:36this is all just a test right now. This
- 1:42:37is, of course, not the final tower
- 1:42:39defense. And then the tower attack
- 1:42:42volume.
- 1:42:43I'll move that over here. So, when the
- 1:42:44blobs are trying to get to this location
- 1:42:47to attack,
- 1:42:48and the wave settings,
- 1:42:51which even has a nice little widget
- 1:42:54to make it easy for me to select in the
- 1:42:56details panel.
- 1:42:58Let's see. Where is it? Right here. So,
- 1:43:00we have all the different
- 1:43:02wave options. I could go in here and
- 1:43:04then edit any of these
- 1:43:07to slowly start to tweak. So, what I
- 1:43:09would do is continually play taste play
- 1:43:12test my game over and over again, tweak
- 1:43:15each of these different variables to see
- 1:43:18which one makes the most sense. Because,
- 1:43:20for example, maybe for balancing, you
- 1:43:23would want to lower the amount of money
- 1:43:25that the player gets. Maybe they get way
- 1:43:26too much, so now the game is no longer
- 1:43:28fun anymore. Or maybe it's too hard.
- 1:43:30Maybe it's impossible to play the game.
- 1:43:32So, you have to tweak these settings to
- 1:43:34make it easier to defeat the blobs.
- 1:43:37But, of course, let's see if the blobs
- 1:43:39and press play to see if the HUD is
- 1:43:41working.
- 1:43:42Okay, here it is.
- 1:43:44And then, I'll press enter to start the
- 1:43:46wave.
- 1:43:47Or by default, up here at the top left
- 1:43:49hand corner, there's a countdown. It is
- 1:43:51starting by default.
- 1:43:54And we can see here are
- 1:43:56the little guys. So, they're running
- 1:43:59towards the tower.
- 1:44:10All right. Well, I let them hit it that
- 1:44:11time to make sure everything was
- 1:44:12working. And
- 1:44:14yeah, these blobs are exploding.
- 1:44:17Now, I'll press R
- 1:44:19and I can bring in a basic turret.
- 1:44:22I'll set it right here.
- 1:44:24And then, start to help turrets
- 1:44:29attack these blobs.
- 1:44:34And then, I can now add in a rapid-fire
- 1:44:37turret. And you can see that this is a
- 1:44:39full game at this point.
- 1:44:43A 3D tower defense game.
- 1:44:51THAT'S
- 1:44:54MAYBE THAT'S A SYMBOLISM FOR life
- 1:44:55because they didn't even get a chance.
- 1:44:57They were
- 1:44:59immediately destroyed upon birth.
- 1:45:02Now, let's say I want to add in a
- 1:45:03feature, but I don't really know how to
- 1:45:05word the feature. It is fuzzy in my
- 1:45:08mind.
- 1:45:09I have a sense for what I want that
- 1:45:11feature to be, but I don't know how to
- 1:45:13give the AI the proper details to
- 1:45:15implement that feature. Specifically, I
- 1:45:18do want a friendly blob that I can spawn
- 1:45:21in and it will help defend the castle
- 1:45:22with me. But, I don't know what that
- 1:45:24specifically looks like.
- 1:45:27Or maybe I don't feel like talking to
- 1:45:29the AI that much. How do I now align the
- 1:45:32AI with me without having to then just
- 1:45:35spill another long paragraph?
- 1:45:38Well, personally, I would just spill
- 1:45:40another long paragraph, but what you
- 1:45:42could do, and this is a common feature
- 1:45:44for a lot of AI software developers, is
- 1:45:46essentially use a grill me skill, which
- 1:45:49will essentially force the AI to have a
- 1:45:51conversation with me. I will give the AI
- 1:45:54a task and before the AI even starts
- 1:45:57working on the task, it will then come
- 1:45:59up with a bunch of smart questions to
- 1:46:01then ask me where I can then answer each
- 1:46:03of these questions, which will force me
- 1:46:05to align and give more detail
- 1:46:08specifically for the AI. So, we could
- 1:46:10almost have a conversation going back
- 1:46:11and forth because it's like we're
- 1:46:13talking to a co-worker. You know, I
- 1:46:14could just hand a co-worker a task and
- 1:46:17say do it, but odds are the co-worker
- 1:46:19will come back to me and be like, wait,
- 1:46:20did you mean this or did you mean that?
- 1:46:22The same thing we can do with the AI.
- 1:46:25Specifically with the grill me skill.
- 1:46:27Now, the most popular version of this is
- 1:46:30the grill me by a developer called Matt
- 1:46:32Botack, who's another YouTuber. So,
- 1:46:34before doing anything, I'll say
- 1:46:37install the grill me skill by Matt
- 1:46:39Botack.
- 1:46:40Now that it is installed, before you do
- 1:46:43a prompt, I could do {slash} grill me
- 1:46:46or I could just tell the AI to grill me
- 1:46:48and it will know to use the skill. So,
- 1:46:51grill me
- 1:46:52and just select it right there.
- 1:46:53And now
- 1:46:55I want the player to be able to spawn in
- 1:46:57a friendly blob.
- 1:47:00This will force the AI to get back to me
- 1:47:02with a list of questions that I will now
- 1:47:04have to answer. So, it will force me to
- 1:47:07give detail.
- 1:47:09In case and it's also good in case the
- 1:47:10AI is confused about something. Cuz so
- 1:47:13far, this hasn't happened to me yet
- 1:47:14throughout all my prompts, but if you
- 1:47:16are very vague, the AI will get back to
- 1:47:19you if it's an essential thing that it's
- 1:47:21worried about. For example, maybe you're
- 1:47:23changing an element of the game that you
- 1:47:25haven't changed yet, then the AI will
- 1:47:27get back and be like, "Are you sure you
- 1:47:29want to do this?"
- 1:47:30But that hasn't happened to me yet. And
- 1:47:32now, here are
- 1:47:33all the questions that it has produced.
- 1:47:35So, let's go through each one.
- 1:47:39Starting with the first one.
- 1:47:41Question one, what the friendly blob
- 1:47:44does.
- 1:47:45What is the friendly blob for?
- 1:47:47Specifically,
- 1:47:48for question one, make it a kamikaze
- 1:47:51hunter. I do want the blob to run up and
- 1:47:54explode
- 1:47:55on the other blobs.
- 1:47:58Question two, how the player gets one.
- 1:48:01Should a friendly blob be a fourth entry
- 1:48:03in the existing R shop that costs cash,
- 1:48:07rather than a separate hot key, on a
- 1:48:09cool down, or a free limited stock?
- 1:48:11Um it should be a fourth entry.
- 1:48:14Also, put it
- 1:48:17as the second option.
- 1:48:20So, a little bit less expensive than the
- 1:48:23rapid fire turret, but more expensive
- 1:48:25than the basic. Question three, where it
- 1:48:27spawns. Should it spawn where you're
- 1:48:29aiming?
- 1:48:30It should spawn immediately as a player
- 1:48:32places them down, and not as a hologram.
- 1:48:35The blob will not be a hologra-
- 1:48:36hologram. The blob should just be placed
- 1:48:38down immediately, wait there until it
- 1:48:39sees the enemy blobs.
- 1:48:42How to tell it apart. Should the
- 1:48:43friendly blob have one fixed distinctive
- 1:48:46look, for example, glowing cyan or
- 1:48:48white, never one that enemies, random
- 1:48:50candy colors, so you could read it at a
- 1:48:52glance in a crowd?
- 1:48:54Yes, I want the friendly blobs to be
- 1:48:57green.
- 1:48:58And a saturated green.
- 1:49:01So, reserve that color for the friendly
- 1:49:02blobs.
- 1:49:04Friendly fire. Right now, every turret
- 1:49:05targets every blob, and grenades and
- 1:49:08your rifle hurt any blob. Should
- 1:49:10friendly blobs be fully protected? No.
- 1:49:14No, friendly blobs can get in the way.
- 1:49:17They could get shot and killed.
- 1:49:19Waves and cash. Should friendly blobs be
- 1:49:22left out of the wave entirely? That
- 1:49:24means they don't count towards the blobs
- 1:49:26remaining. Yes, yes, they should be left
- 1:49:28out immediately.
- 1:49:30Where the settings live?
- 1:49:31Yes, that keeps your one actor full
- 1:49:33control setup. It should be within the
- 1:49:35wave settings. Notice how for
- 1:49:38I'm setting that off.
- 1:49:40Notice how for all the questions, it
- 1:49:42also gives you a recommended answer,
- 1:49:45too.
- 1:49:47Now, um the way I was answering these
- 1:49:49questions, I was just talking like
- 1:49:52normal. Although, you could go through
- 1:49:54each one and be very direct. Just do Q1.
- 1:49:57Yes.
- 1:49:59Q2.
- 1:50:00No, and and so on, if you want to be
- 1:50:03shorter.
- 1:50:04The way this skill works is that it
- 1:50:06forces a conversation between you and
- 1:50:08the AI. And the questions go in rounds.
- 1:50:10So, the first questions right here that
- 1:50:13we just answered are the main most
- 1:50:14important questions. And then it will
- 1:50:16ask for a second round, these smaller
- 1:50:19questions, or it might have some
- 1:50:22follow-up questions where you have to
- 1:50:24explain your decision more
- 1:50:26within the next round. And it will keep
- 1:50:29on asking more and more questions until
- 1:50:31the AI feels like it has enough
- 1:50:33information about the feature, and then
- 1:50:35it will implement it. This is also good
- 1:50:38because it helps you as the game
- 1:50:41developer think through the
- 1:50:42ramifications of a specific feature.
- 1:50:45Because maybe you didn't think to
- 1:50:46yourself what the controls of the HUD
- 1:50:49would be,
- 1:50:51or whether or not the blobs should be
- 1:50:53faster. So, the blobs that are chasing
- 1:50:56the enemy blobs should be faster or
- 1:50:58should be the same speed. So, these are
- 1:51:00all questions now the AI is getting
- 1:51:02back, and it's like you're having an
- 1:51:03actual conversation to really align your
- 1:51:06goals. That's how what the AI produces
- 1:51:08is as close as possible to what you were
- 1:51:11thinking. Now, in my case, I will end
- 1:51:14the grill me cuz I don't want to go
- 1:51:15through a couple different rounds. I
- 1:51:17think this is good for now.
- 1:51:20Yes to everything and the grill me, just
- 1:51:22work on this.
- 1:51:24And we are back. So, we have a new
- 1:51:27class, friendly blob. I can manually
- 1:51:30drag this in to see its interaction with
- 1:51:32an enemy.
- 1:51:34So, I'll have two enemies. Let's see if
- 1:51:35the blob
- 1:51:37sees them, runs at them, and explodes.
- 1:51:42Okay, it is working. Now, let's see what
- 1:51:44it's like during gameplay. Delete these
- 1:51:46blobs.
- 1:51:48And then, I'll press play.
- 1:51:51I can buy a friendly blob. I'll place it
- 1:51:54down right here.
- 1:51:56And okay, that's a glitch cuz when I
- 1:51:57place it down, I do shoot at the same
- 1:51:59time. We don't want that to happen
- 1:52:01because we could damage the friendly
- 1:52:02blob. There it goes.
- 1:52:05All right, let's see if he actually
- 1:52:07catches it.
- 1:52:09I don't think he's going to catch that
- 1:52:10blob in time. He'll have to turn around.
- 1:52:16Okay, so definitely, let's also make our
- 1:52:18friendly blob faster.
- 1:52:21Maybe that was exposed in the details
- 1:52:23panel of wave settings.
- 1:52:25Luckily for us, we do have all those
- 1:52:27friendly blob settings ready to go, so I
- 1:52:29didn't have to do another prompt to fix
- 1:52:31that. Now, let's see where the speed is.
- 1:52:35Speed. I'll make this eight, so the
- 1:52:37friendly blob is pretty fast. Actually,
- 1:52:39let's give it the speed of 10.
- 1:52:43Now, press play.
- 1:52:45I'll buy a friendly blob.
- 1:52:48And he looks like he is ready to
- 1:52:51sacrifice his life
- 1:52:53for the tower.
- 1:52:56There he goes. He sees jumping after
- 1:52:57him, boom. [laughter]
- 1:53:01I do want to make two changes, and
- 1:53:03instead of prompting each one
- 1:53:04individually, I could just list out to
- 1:53:07the AI a bunch of different changes that
- 1:53:09I want to do, and then it could do it
- 1:53:10all at once. That's how I don't have to
- 1:53:12wait for each prompt for each individual
- 1:53:14one, so that can speed up my workflow.
- 1:53:17So, specifically,
- 1:53:20make it so that when the player buys
- 1:53:22something and then they place down the
- 1:53:23object or the blob, they don't
- 1:53:25automatically fire. So, they should not
- 1:53:27fire when they're placing down an
- 1:53:28object. Also, add a hologram for when
- 1:53:32the player is placing the friendly blob.
- 1:53:35Instead of shooting that off, we could
- 1:53:37see if there's any other improvements I
- 1:53:39want to my game. For example, maybe I
- 1:53:41want to make a change to the HUD right
- 1:53:43now.
- 1:53:44For example, and this is just for the
- 1:53:46video, this entire time I've had a
- 1:53:48health bar on the bottom left-hand
- 1:53:49corner.
- 1:53:50I can also move that to the right-hand
- 1:53:52corner.
- 1:53:55And move the health bar to the
- 1:53:57right-hand corner
- 1:53:59for the player,
- 1:54:00not the left-hand corner.
- 1:54:04What should we call this blob? So, the
- 1:54:06blob is going to be chasing the player.
- 1:54:09So, instead of the blob kamikaze into
- 1:54:12the tower, it will kamikaze into the
- 1:54:15player. What should we call this?
- 1:54:17Uh let's call it an alpha blob.
- 1:54:21I also want you to create a new enemy
- 1:54:23called alpha blob that spawns with the
- 1:54:26rest of the blobs, but instead of going
- 1:54:28after the tower, that blob will go after
- 1:54:31the player character and explode next to
- 1:54:34the character,
- 1:54:35which will cause damage. So, the
- 1:54:37character has to worry about their own
- 1:54:39health and the tower's health.
- 1:54:42We're back. Let's see if those features
- 1:54:43were implemented correctly.
- 1:54:45Pressing play. Okay, now the health bar
- 1:54:47is on the bottom right-hand corner.
- 1:54:49And then if I place down a blob, we have
- 1:54:52a hologram.
- 1:54:53But I am still firing the gun when I
- 1:54:55place it down, so that's wrong. And now
- 1:54:57we have this new blob that is chasing
- 1:54:59after me.
- 1:55:00So, that is pretty scary looking. Let's
- 1:55:02see if our friendly blob can catch him.
- 1:55:05That kind of looks like a Sith Lord with
- 1:55:07the dark red eyes.
- 1:55:09Okay, I I did now caught it. So, we now
- 1:55:12have an alpha blob that's just chasing
- 1:55:14me, the player, and trying to destroy
- 1:55:17me.
- 1:55:18At this point, I'm just doing a very
- 1:55:19small polish pass. And this is the
- 1:55:22misconception with AI is that people
- 1:55:24think that oh, you just generate the
- 1:55:26game once with AI and that's it. Well,
- 1:55:29you could do that or like what I showed
- 1:55:31in this video, you can build up your
- 1:55:33game feature by feature, prompt by
- 1:55:35prompt, slowly, and then refine each
- 1:55:38element of your game. So, just because
- 1:55:40the AI generated it, doesn't mean you
- 1:55:42can't change it. It's all code. You can
- 1:55:44change everything. So, if you don't like
- 1:55:46something, you could go in, polish it,
- 1:55:49and then just keep on adding feature and
- 1:55:51feature. So, I need to tell the AI that
- 1:55:54it did not correctly fix that issue
- 1:55:57where the gun is automatically firing.
- 1:55:59Also, I noticed the turrets, they do not
- 1:56:01have a muzzle flash.
- 1:56:02So, I need to tell the AI to do that.
- 1:56:06For the turrets, add the muzzle and make
- 1:56:08sure you do check that this is correct.
- 1:56:10I want you to use the muzzle flash
- 1:56:12particles that are currently being
- 1:56:14spawned on the player's gun. So, take
- 1:56:16those particles and put that on the
- 1:56:18muzzle of the turrets. Also, when I
- 1:56:20place down an object, the player is
- 1:56:23still firing a bullet. When a player
- 1:56:26places an object, there should be no
- 1:56:27bullet being fired.
- 1:56:29And
- 1:56:30I also want a little animation in the
- 1:56:33top right-hand corner whenever the
- 1:56:34player gets some cash, have there be a
- 1:56:37little animation play in the top
- 1:56:39right-hand corner that tells the player
- 1:56:41that they are getting cash.
- 1:56:43Now, let's test our game. I'll press
- 1:56:45play
- 1:56:46and then grab a basic turret, place it
- 1:56:49down, and let's see.
- 1:56:51Okay, good.
- 1:56:52My weapon didn't automatically fire with
- 1:56:53that. Now, we will Let's if we do have
- 1:56:55muzzle flashes for the turrets.
- 1:56:58And we do. So, there is a slight muzzle
- 1:57:00flash going on.
- 1:57:02That does add a lot.
- 1:57:04And we can watch that turret work.
- 1:57:06And in the top right-hand corner, you
- 1:57:08can see whenever we destroy a blob or
- 1:57:11when we defeat the wave, there is a
- 1:57:12slight animation adding to the amount of
- 1:57:15money that we have.
- 1:57:17There is one more major feature I will
- 1:57:18implement, and that is the ability to
- 1:57:21control the path of the blobs, cuz right
- 1:57:23now it's not very interesting. They just
- 1:57:25spawn right here and go within a
- 1:57:26straight line. Instead, what I will do
- 1:57:28is create a spline actor. That's how I
- 1:57:31can create a road, and it can curve or
- 1:57:34go around, and there's an actual path
- 1:57:37that the blobs will follow. And then I
- 1:57:38will take that spline,
- 1:57:40rearrange my entire world, and then move
- 1:57:43the tower. That's how the blobs are
- 1:57:45actually going to now be attacking this
- 1:57:47castle. So, we have to defend it to
- 1:57:50create an actual game level. So, this is
- 1:57:53the last major feature that I will
- 1:57:55implement. Because this is a tutorial,
- 1:57:57you now know everything you need to in
- 1:58:00order start
- 1:58:01programming with AI in Unreal. And
- 1:58:04honestly, I haven't had this much fun
- 1:58:06with game development in a while.
- 1:58:08I It is an amazing feeling where you can
- 1:58:11literally be working on your game. You
- 1:58:13can just think of a feature,
- 1:58:15and then you can just explain it with
- 1:58:18words, and the code generates for you.
- 1:58:21That feature's then in your game. And
- 1:58:23then after that, you can keep on
- 1:58:24refining it, keep on adding. It is a
- 1:58:27very dynamic and artistic process. It is
- 1:58:30so fun. And now a lot of the busy work,
- 1:58:34so having to type out code, having to
- 1:58:36program everything, that has pretty much
- 1:58:38now at this point been completely
- 1:58:40abstracted away. And while the process
- 1:58:43to get there was fun, in the end what
- 1:58:46matters is the outcome.
- 1:58:48And now the outcome, especially since
- 1:58:50now we can to so many more features on
- 1:58:51top of each other, you could create an
- 1:58:53insanely polished game.
- 1:58:56So, let's go ahead and add in the last
- 1:58:58feature. Also,
- 1:59:00sometimes I could just fall down a
- 1:59:02feature rabbit hole. I could just keep
- 1:59:04on adding and adding and adding. For
- 1:59:06example, if I was going to finish this
- 1:59:09game, then maybe I would add in a blob
- 1:59:11house that would continually spawn in
- 1:59:13friendly blobs. So, we don't have to
- 1:59:15manually place in a friendly blob each
- 1:59:17time. You can think of like that as a
- 1:59:20blob barracks that will continually be
- 1:59:23spawning out your friendly blobs. Maybe
- 1:59:25I even added a feature that allows me to
- 1:59:28control groups of friendly blobs, kind
- 1:59:30of like Total War. So, now we have Total
- 1:59:33War blob warfare. I can add in a turret
- 1:59:36that's firing laser beams. Pretty much,
- 1:59:39honestly, the possibilities are
- 1:59:41limitless. But, let's wrap up our game
- 1:59:45and create that spline feature. So,
- 1:59:48create a new actor called blob enemy
- 1:59:50path that will be a spline actor that me
- 1:59:54as a level editor should be able to
- 1:59:56control. Also, make sure that I can
- 1:59:58control the Y axis. That's how I'm able
- 2:00:01to control the width of the spline to
- 2:00:04indicate how large the path is, the
- 2:00:06width of the path.
- 2:00:08And by default, if there is no spline
- 2:00:12path, then the blobs will, like normal,
- 2:00:14start from the spawn and immediately go
- 2:00:17straight to the tower. But, if there is
- 2:00:20a path, then when the blobs spawn in,
- 2:00:22they should follow that path
- 2:00:24towards the tower. So, make sure this is
- 2:00:27a customizable spline that I can add to
- 2:00:30my world and expose all the necessary
- 2:00:32properties to the wave settings.
- 2:00:36We now have the blob spline. It is blob
- 2:00:40enemy path. Drag that in.
- 2:00:42And then you might be like, uh-oh, where
- 2:00:44is a spline? Where is the path? Well,
- 2:00:46generally when it comes to splines, in
- 2:00:48order to see the spline and edit it, we
- 2:00:51have to select the actor or class that
- 2:00:54has a spline inside of it, go to
- 2:00:55details, and then manually select the
- 2:00:58spline component in order to get access
- 2:01:00to it. Now, this is pretty bright day.
- 2:01:04The ground is kind of yellow, so it's
- 2:01:05hard to see the spline.
- 2:01:07So, I'll go into alt and three unlit
- 2:01:09view mode, so we could better see that
- 2:01:11spline. And in case you never use a
- 2:01:13spline, splines are just 3D points in
- 2:01:16space
- 2:01:17that that interpolates near each other
- 2:01:19to create a smooth line. So, I could
- 2:01:22grab one point, for example, over here,
- 2:01:24move it, and then grab another point. I
- 2:01:27can move this or rotate it. That's how
- 2:01:29the handles are rotating to then change
- 2:01:32that path.
- 2:01:33If I want to create a new point, hold
- 2:01:35down alt to then drag out a new point.
- 2:01:38So, I can
- 2:01:40make this.
- 2:01:41That's how we're starting from the
- 2:01:43spawn.
- 2:01:44The blobs will go around like a little
- 2:01:46zigzag, and then end up at the tower
- 2:01:49right here.
- 2:01:51And within my prompt, I explicitly was
- 2:01:54telling it that I want to be able to
- 2:01:55control the width. So, you can see that
- 2:01:58the spline it does have a width. If I
- 2:01:59want to control it, select it, then I
- 2:02:02can go to scale, and scale it on the Y
- 2:02:05axis will decrease the width.
- 2:02:07And then scaling it out will make the
- 2:02:09path larger.
- 2:02:11Now, if your spline does not have this
- 2:02:12ability, because by default it doesn't
- 2:02:14have a width, you need to explicitly
- 2:02:16tell the AI to make sure that you have
- 2:02:19width that you can scale it on the Y
- 2:02:21axis.
- 2:02:22Because sometimes
- 2:02:24maybe there's an area on my map, and the
- 2:02:27blobs have to really crunch through an
- 2:02:29area, then I could make it small like
- 2:02:32this, or if there's a or if there's a
- 2:02:34really large field,
- 2:02:36and I want to give the blobs a room to
- 2:02:38maneuver, then I could increase it and
- 2:02:40make it pretty large like that. So,
- 2:02:42let's see if this is now working
- 2:02:45with Alt and S
- 2:02:47to simulate. And now those blobs have
- 2:02:49spawned in.
- 2:02:51And it looks like
- 2:02:53that yes, they are following exactly the
- 2:02:56spline path. And this is exactly what we
- 2:02:58needed because now we have all the tools
- 2:03:02that we need to create our own level
- 2:03:05and to actually start to defend the
- 2:03:07castle. So, now I will
- 2:03:10manipulate my level
- 2:03:12and then add in my spline path
- 2:03:15to create a neat little road for the
- 2:03:18blobs to maneuver up and then hit my
- 2:03:20castle.
- 2:03:21For this part, I'm time-lapsing it
- 2:03:23because I am doing nothing new. I'm just
- 2:03:25rearranging my environment to make it
- 2:03:27more friendly to the game style we just
- 2:03:29created. Specifically, right now the
- 2:03:31blobs cannot get to the castle. So, I
- 2:03:34will have to sculpt the landscape and
- 2:03:36then create like a little landscape
- 2:03:39area, a ramp going up to the castle. So,
- 2:03:41the player will actually have to defend
- 2:03:43it because right now the castle is
- 2:03:44pretty well defended being up on that
- 2:03:46cliff area.
- 2:03:47And I am doing nothing new here. If you
- 2:03:50watch the UE6 beginner tutorial, then
- 2:03:52you know exactly how to create this
- 2:03:54environment. You know all the basics. I
- 2:03:56am just moving the objects around,
- 2:03:58sculpting, and also foliage painting. Do
- 2:04:00keep in mind that each mesh has their
- 2:04:03own collision. So, you'll see that if I
- 2:04:05go into the lit view mode and then
- 2:04:07select player collision, I can see the
- 2:04:09world's collision. And for some of the
- 2:04:10meshes, the collisions are not lined up
- 2:04:12with the actual look of the static mesh.
- 2:04:15So, the way I fix that is that I just
- 2:04:17open up the static mesh in the mesh
- 2:04:18editor and then regenerate its
- 2:04:20collision. Something else you could do
- 2:04:22is just tell the AI the name of the mesh
- 2:04:25and tell the AI to fix the collision. If
- 2:04:27you do notice that in player collision
- 2:04:30that one of your meshes is blocking
- 2:04:31something when it shouldn't be. Now,
- 2:04:33unfortunately, there is a weird glitch
- 2:04:35with foliage mode in UE 5.8 where if I
- 2:04:38do move the landscape, the trees are
- 2:04:40supposed to follow along with it. So, if
- 2:04:42I make a change to landscape, the trees
- 2:04:44will also move up and down, but right
- 2:04:46now they aren't. So, I do have to erase
- 2:04:48the foliage, make my sculpt change, and
- 2:04:50then paint the foliage back onto the
- 2:04:52landscape after the sculpt change is
- 2:04:53done. Now, what you're noticing right
- 2:04:55here is that I am testing the path. So,
- 2:04:57in the wave settings, I increase the
- 2:04:59blob count to 100, so I get a bunch of
- 2:05:01blobs, and I want to make sure that the
- 2:05:02blobs can actually reach the castle. I
- 2:05:05did notice that some blobs were falling
- 2:05:06off the cliff, so I had to readjust the
- 2:05:09spline to make sure those blobs don't
- 2:05:10fall off. I also moved the blob spawn,
- 2:05:13the cave, closer to the castle because
- 2:05:15in the end this is a tutorial, and I
- 2:05:17don't want to have to wait a while for
- 2:05:19the blobs to walk all the way to the
- 2:05:21castle if they use the cave on the far
- 2:05:24end. Now, for the final game, I would
- 2:05:26probably use the cave that is farther
- 2:05:28from the castle. And that is pretty
- 2:05:30funny that whoever built the castle here
- 2:05:33didn't realize that there is a cave
- 2:05:35filled with evil blobs that are going to
- 2:05:37attack the castle. Because this is a
- 2:05:39variation of the original level, I
- 2:05:41really like the way the original level
- 2:05:43looked. I made sure to make a duplicate
- 2:05:46of that level before I edited this.
- 2:05:48That's how if I don't like my changes, I
- 2:05:50can always go back to the original
- 2:05:52level. Essentially, it is a backup so
- 2:05:54that I don't lose all the progress I've
- 2:05:56already made on my level from the UE5
- 2:05:58beginner tutorial when I was building
- 2:06:00it.
- 2:06:01I did notice that I do want to change a
- 2:06:03little bit about how the blobs work just
- 2:06:06to make my game more interesting, and
- 2:06:08then there is one glitch. So, I will
- 2:06:11right now tell the AI to fix this.
- 2:06:14When it comes to the alpha blob,
- 2:06:15currently the alpha blob just
- 2:06:17immediately bee lines to the player, and
- 2:06:19the alpha blob does not follow the path.
- 2:06:21So, the odds are that the blob will not
- 2:06:23be able to reach the player. So, have
- 2:06:26the alpha blob follow the path with the
- 2:06:28rest of the blobs until it gets into the
- 2:06:31radius of the player and then the alpha
- 2:06:34blob will diverge
- 2:06:36and attack the player. So, have the
- 2:06:38alpha blob be with the rest of the
- 2:06:39players. Sometimes there might be a blob
- 2:06:42stuck and I do not want a blob stuck in
- 2:06:45a mesh or stuck somewhere on the map to
- 2:06:48then hold up the entire game. So, give a
- 2:06:51time limit, let's say 1 minute after the
- 2:06:54start of the wave or actually do a math
- 2:06:57operation depending on how long this
- 2:06:58line is to determine when the wave
- 2:07:01should end. And then if the final blobs
- 2:07:03were not destroyed 30 seconds after when
- 2:07:07you predict the wave should end, then
- 2:07:09the blobs should be destroyed and the
- 2:07:11next wave continues. Also, make it
- 2:07:13that's how there is a one out of 10
- 2:07:15chance that when the blob is going to
- 2:07:18the castle, if the blob is near, so a
- 2:07:20small radius but near a turret, the blob
- 2:07:23may decide to then attack the turret,
- 2:07:25explode and destroy the turret.
- 2:07:28So, actually let's make that one out of
- 2:07:30two times. So, very small radius. Give
- 2:07:32me controls over all these properties
- 2:07:34I'm talking about within the wave
- 2:07:37settings that when the blob is in the
- 2:07:39radius near a turret
- 2:07:41the blob half the time may decide to
- 2:07:43attack the turret and destroy it. And
- 2:07:45that goes for all blobs, not just the
- 2:07:47alpha ones.
- 2:07:48You may have noticed that when it comes
- 2:07:50to that prompt, there was two times
- 2:07:52where I said something that I realized,
- 2:07:55wait, actually I want to do something
- 2:07:57else. That is completely fine and I just
- 2:07:59left that into the prompt. The AI is
- 2:08:00smart enough to then scratch out what I
- 2:08:02just said to ignore.
- 2:08:04So now, this is our final game. And what
- 2:08:08I did is that I went ahead and within
- 2:08:10the wave settings I did play test the
- 2:08:13game a little bit and adjust some of
- 2:08:14these settings to the settings I think
- 2:08:16make the most sense. Specifically, I
- 2:08:18made the blobs faster because it is
- 2:08:21really slow having the blobs go all the
- 2:08:23way over here to the castle. But now,
- 2:08:26pressing play,
- 2:08:28and then I'll press F11 to go into full
- 2:08:30screen mode. Here is my castle. We got
- 2:08:33to defend it. It looks big and
- 2:08:35intimidating from a first-person
- 2:08:36character. So, let's add in a basic
- 2:08:39turret and some of the blobs now.
- 2:08:42They will try to attack the turret and
- 2:08:44get rid of it. So, the positioning of
- 2:08:46your turret does matter.
- 2:08:48Now, the blobs are coming up here.
- 2:08:51They start to attack it.
- 2:09:00Prevent those blobs from coming up.
- 2:09:14And now for the next wave, we can spawn
- 2:09:16in a bunch of friendly blobs.
- 2:09:20Or specifically, I only had enough money
- 2:09:21for just one guy.
- 2:09:23So, now he will sacrifice his life
- 2:09:26for the castle. And honestly, this is so
- 2:09:28fun because in the previous UE6 beginner
- 2:09:30tutorial, all we did was create an
- 2:09:32environment. We did not create an actual
- 2:09:34game from it. And now
- 2:09:37there is a game we can play here.
- 2:09:39And it's a whole 'nother feeling after
- 2:09:42you create an environment in Unreal to
- 2:09:43make it a playable game.
- 2:09:49Just as a quick bonus at the end to
- 2:09:52really complete the game, now let's add
- 2:09:54in a start menu and an options menu. And
- 2:09:56within the options menu, we'll be
- 2:09:57settings that can control the graphical
- 2:09:59fidelity of our game.
- 2:10:02So, I will exit out.
- 2:10:04Let's create a
- 2:10:06pause menu. And on the pause menu,
- 2:10:07there's a setting button. And the
- 2:10:09settings contain all the necessary
- 2:10:11graphical settings for Unreal Engine.
- 2:10:14So, go through and expose as many
- 2:10:16properties as possible to give the
- 2:10:18player flexibilities so they can change
- 2:10:21the quality of the game according to
- 2:10:23their system. And the pause menu will be
- 2:10:26the will be escape. But for us the
- 2:10:29editors, I still want escape to leave
- 2:10:31the game. So, for the editors
- 2:10:34for the game developers, have the menu
- 2:10:37be the T key.
- 2:10:38The reason why I said T key is because
- 2:10:41if we map it to escape, now when I press
- 2:10:43escape, I'm not going to leave the game.
- 2:10:45And that's pretty annoying. I would then
- 2:10:46have to click another button. I still
- 2:10:48want escape to be the shortcut to leave
- 2:10:50the game. So, up until we then compile a
- 2:10:52game, I'll leave it at some other key to
- 2:10:55go to the pause menu.
- 2:10:57And just like that, with one prompt, we
- 2:11:00now have a pause menu. Going into
- 2:11:02settings, and all the settings that you
- 2:11:05would expect, we can go through, change
- 2:11:07it. It even shows us our frames per
- 2:11:09seconds. Now, do keep in mind that the
- 2:11:11frames for the editor will be lower than
- 2:11:15after you compile it when it's its own
- 2:11:17executable, its own program, because
- 2:11:19there is so much overhead in the editor.
- 2:11:21You will have a lower frame rate in
- 2:11:23Unreal Engine than when you have the
- 2:11:25final game. But, this is incredible how
- 2:11:27we already have a working pause menu
- 2:11:30with literally just one prompt. Let's
- 2:11:32take this further,
- 2:11:34and then also create a start menu. But,
- 2:11:37I want at the top of the start menu a
- 2:11:39logo for the game. So, with Claude,
- 2:11:42Claude can generate images cuz in the
- 2:11:44end images are just code. They are just
- 2:11:48they are pixels with values, or you can
- 2:11:51represent images through formulas. But,
- 2:11:54Claude does not have its own dedicated
- 2:11:56image generator AI. And ChatGPT has a
- 2:11:59special image generator built into it.
- 2:12:02So, you're not really communicating when
- 2:12:04you ask ChatGPT to make an image with
- 2:12:06ChatGPT itself. Instead,
- 2:12:09chat is routing you to the specific AI
- 2:12:12model that handles photo generation. So,
- 2:12:15in ChatGPT, I gave it a photo of my
- 2:12:18blobs, of the turrets, and then of the
- 2:12:21castle, because I wanted to use these
- 2:12:23two photos as inspiration to create a
- 2:12:26logo that fits with that style.
- 2:12:29And then it created these logos, Blob
- 2:12:32Siege, Blob Siege, Blob Siege, and these
- 2:12:36other ones.
- 2:12:37And I do I do like the logos, cuz the
- 2:12:39way I worded it, I wanted it to look
- 2:12:41like something you would find on the iOS
- 2:12:43store, and this is something you would
- 2:12:45find. Now, I really like how it shows
- 2:12:48the castles for all of these, and then
- 2:12:50it even gets the red banners. So, I like
- 2:12:53this one specifically, Blob Siege, so
- 2:12:56that I grabbed this logo, and then I
- 2:12:58also gave it a photo, because I want the
- 2:13:00start screen to essentially be over
- 2:13:03here, from this angle, cuz this is the
- 2:13:05main hero angle. This is the coolest
- 2:13:07look at my environment. So, I took a
- 2:13:09screenshot of this, because I knew this
- 2:13:11is where the start screen was going to
- 2:13:13be.
- 2:13:14And then I asked it to create different
- 2:13:17variations of the start menu coming from
- 2:13:19this logo, using this logo also as
- 2:13:21inspiration.
- 2:13:23So, it then generated
- 2:13:26this, and I liked the first generation
- 2:13:29it did. It also gave me this option. I
- 2:13:31like this option. I don't like this
- 2:13:33option. But, it's either this one or
- 2:13:37this one.
- 2:13:39If I do want to keep the red banner flag
- 2:13:42theme, then this one's pretty good, but
- 2:13:44it does construde, so I can't really see
- 2:13:47the rest of the environment. So, I think
- 2:13:49I will leave it at this.
- 2:13:50Within Claude, I will drag my logo in,
- 2:13:53let go, and then drag the reference of
- 2:13:56what I want, and let go,
- 2:13:58and tell it,
- 2:14:00"I want you to make a start screen
- 2:14:02from this angle.
- 2:14:05Specifically, you can look at the
- 2:14:07location
- 2:14:08of camera thumbnail two.
- 2:14:12When the player enters the game, when
- 2:14:14the player starts the game, they will be
- 2:14:17at this location with the start screen,
- 2:14:19and the player can either press play, go
- 2:14:22to the settings, or credits. For
- 2:14:24credits, say created by Unreal Sensei.
- 2:14:26That's it. The settings will be the same
- 2:14:27settings we just created.
- 2:14:29And I want you to use the exact logo,
- 2:14:33which is the first image, and for the
- 2:14:35start screen, create the formatting and
- 2:14:37the buttons to look exactly like the
- 2:14:42second image.
- 2:14:45So, go ahead and work on that.
- 2:14:50Also, do keep in mind that whenever
- 2:14:51you're AI generating something, since
- 2:14:53it's so easy to port features in between
- 2:14:56engines, in between projects, you could
- 2:14:59theoretically take everything we just
- 2:15:01did and port it to a brand new engine.
- 2:15:05Or,
- 2:15:06if you have a feature, for example, you
- 2:15:07like the turrets, or we spent 20 minutes
- 2:15:11generating the settings menu, instead of
- 2:15:13AI generating this from scratch, if I
- 2:15:15have a new Unreal project, I can point
- 2:15:18to this project's location, and then
- 2:15:21tell the AI, "Hey, I want you to grab
- 2:15:23the settings from this project." And
- 2:15:25then, instead of having to generate it
- 2:15:27from scratch, it can reuse what we
- 2:15:29already created. And that is I mean,
- 2:15:33beforehand, you would have to stick to a
- 2:15:35certain template because the way code
- 2:15:37was set up. And let me go ahead and
- 2:15:39let's exit out.
- 2:15:40That's how the AI can work in peace, and
- 2:15:43also open up Unreal Engine by itself to
- 2:15:45test it. Because beforehand, we would be
- 2:15:48limited to the specific ways we would
- 2:15:49create a feature or an actor or an
- 2:15:52object. We wouldn't be able to then take
- 2:15:55that and port it into a new project or a
- 2:15:57new engine without a lot of reworking.
- 2:16:00Now, AI handles all that tedious action.
- 2:16:03So,
- 2:16:04if you like your blob, if you like your
- 2:16:06turret,
- 2:16:07if you like the settings menu and the
- 2:16:09start menu, you can just take those, ask
- 2:16:12AI to migrate it, and it'll do it for
- 2:16:14you. So, Claude is like a super
- 2:16:18migration tool for getting assets in
- 2:16:20between projects. Cuz if you've ever
- 2:16:22tried to mix and match different asset
- 2:16:24packs, you know how hard it can be,
- 2:16:26especially with code.
- 2:16:28Now, I will play the game.
- 2:16:31Alt + P, and we have a full-on menu.
- 2:16:36So, this is a credible. Go to credits.
- 2:16:38Created by Unreal Sensei. Of course, for
- 2:16:40your game, put your name in it.
- 2:16:43Settings. Right here, we have our
- 2:16:45settings, but notice how the user
- 2:16:46interface now looks different from the
- 2:16:49user interface of the start menu. So, we
- 2:16:51could change that in just a moment.
- 2:16:52Also, when I hover over the different
- 2:16:54options, I want there to be a little bit
- 2:16:56of a visual feedback. And pressing play,
- 2:17:01okay, we did not ask for that, but that
- 2:17:03was cool. Maybe I do keep it. Also, the
- 2:17:06UI right here, it doesn't have the same
- 2:17:08design language as the start menu.
- 2:17:10So, we could go ahead and work on that.
- 2:17:13So, large features like this, where I'm
- 2:17:15just implementing the game settings, the
- 2:17:18play menu,
- 2:17:19all of these were just one prompt. You
- 2:17:21could do the same. Let's say if you want
- 2:17:22to add in Let's say you want to add in a
- 2:17:24feature as big as controller support, or
- 2:17:26even something insanely large like
- 2:17:29multiplayer support, you are just one
- 2:17:31prompt away.
- 2:17:33I want you to add animations to the
- 2:17:35start menu
- 2:17:37to make it feel more alive and more
- 2:17:39reactive to the user hovering over each
- 2:17:43button.
- 2:17:45Also, I want you to take the design
- 2:17:47language of the start menu and apply it
- 2:17:50to every other UI element
- 2:17:52in the game. So, including when we're
- 2:17:55buying defenses and the settings menu
- 2:17:59and pause menu.
- 2:18:02And now we are back. Let's go check out
- 2:18:04what we created
- 2:18:06with Alt and P, and that is exactly what
- 2:18:08I want to see.
- 2:18:09Even the buttons have a shine to it. So,
- 2:18:11everything has a slight animation,
- 2:18:13and there's a lot of responsiveness to
- 2:18:15this menu. Clicking the settings, now
- 2:18:18the design language of that menu has
- 2:18:20carried over to the settings,
- 2:18:22and it does look like that the font is
- 2:18:25off center, so I will have to prompt to
- 2:18:27bring that down. Go back, and then press
- 2:18:29play.
- 2:18:32Okay, now all the UI elements for our
- 2:18:34game also carry over the same font.
- 2:18:37Going into the menu,
- 2:18:40I do like that animation showing me all
- 2:18:42the different defense options.
- 2:18:45I'll place a turret there, and now look
- 2:18:47at the escape menu, and this is also
- 2:18:49good. So, now our game has a consistent
- 2:18:52theme to it and UI design. I will quit
- 2:18:55the game because now we are done. As you
- 2:18:58can see, I can just keep prompting
- 2:19:00prompting feature by feature. I can do
- 2:19:02this for days upon days, and if I was
- 2:19:05making my own game, then this would be
- 2:19:07months and months of work. But as you
- 2:19:09can see, with the power of AI, by me
- 2:19:12just prompting adding in new features, I
- 2:19:14can create that game so much faster,
- 2:19:16experiment, and overall make a better
- 2:19:18game. But this was a tutorial, and I'm
- 2:19:22pretty sure you don't want to see me
- 2:19:23prompt for another couple hours. So,
- 2:19:26with that, we are now done.
- 2:19:28To celebrate, let's play one round of
- 2:19:30our finished game.
- 2:19:32So, I'll press play, and do keep in mind
- 2:19:34that this is just going to be one round,
- 2:19:36so I increased the blob spawn amount to
- 2:19:38be in the hundreds, so there will be a
- 2:19:40lot of blobs,
- 2:19:42and I also give myself a lot of cash.
- 2:19:44So, this is kind of like if we had a
- 2:19:46wave
- 2:19:47that is
- 2:19:48very far away from this first round. So,
- 2:19:51obviously, you know, that's a lot of
- 2:19:53blobs.
- 2:19:54I've got to keep on
- 2:19:55bringing in my turrets
- 2:19:59to prepare myself and now I am almost
- 2:20:02out of cash.
- 2:20:06All right, let's see if we can defend
- 2:20:07us.
- 2:20:12See everything working.
- 2:20:26And they are destroying my turrets.
- 2:20:29This is a pretty hectic game.
- 2:20:39The tower has fallen. So obviously we
- 2:20:42just got overwhelmed. I mean look at how
- 2:20:45many blobs were there. So this is what
- 2:20:47the game will look like when we're at a
- 2:20:49later level.
- 2:20:51And this is pretty cool how the game
- 2:20:52just pauses.
- 2:20:54We basically get a freeze frame
- 2:20:56of our death.
- 2:20:58Congratulations, you just finished this
- 2:21:00video. We are now done. You now know how
- 2:21:02to take AI and connect it to Unreal
- 2:21:05Engine to start getting those benefits.
- 2:21:07So don't forget to like and subscribe.
- 2:21:09Also follow me on X because there will
- 2:21:12be a lot more AI game development news
- 2:21:14and tutorials in the future because
- 2:21:17we've never seen such a large change in
- 2:21:19the game development industry as of
- 2:21:22right now. If you were to tell me 4
- 2:21:24years ago that an AI would be able to
- 2:21:27think to itself an artificial
- 2:21:28intelligence and create a game in Unreal
- 2:21:31Engine from start to finish, I would
- 2:21:34have said you were lying. Well, now here
- 2:21:36we are. Artificial intelligence can
- 2:21:39actually do that and that is such a
- 2:21:41seismic shift in the industry. We will
- 2:21:44all navigate it together. So let me know
- 2:21:46what you think in the comments section
- 2:21:48below and I'll see you in the next
- 2:21:50video.
About this transcript
This page contains the full transcript of How to Make Games in Unreal Engine 5 with AI by Unreal Sensei, generated from the public captions YouTube serves with the video. The transcript has 24,518 words across 3,684 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.