YouTube2Text

How to Make Games in Unreal Engine 5 with AI — Transcript

by Unreal Sensei · 24,518 words · 3,684 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Hi everyone, and this tutorial I will
  2. 0:02teach you how to use AI to create games
  3. 0:04in Unreal Engine so you can start
  4. 0:06building video games today with no
  5. 0:09coding experience. You'll learn how to
  6. 0:11connect Unreal Engine with your AI of
  7. 0:13choice, whether that's Claude or
  8. 0:15ChatGPT, how to effectively prompt and
  9. 0:19guide the AI that's always closer to
  10. 0:21your vision, and what are AI's strengths
  11. 0:23and limitations so you know when and how
  12. 0:26to use it. As a test, I created three
  13. 0:29games with AI over the span of a week.
  14. 0:32So for the first game, it's your classic
  15. 0:34remake of Minecraft in UE5 with full
  16. 0:36world generation and chunk loading.
  17. 0:38While this is cool, this isn't that
  18. 0:41impressive because there are thousands
  19. 0:43of Minecraft clones. Now for the next
  20. 0:46demo, this is a ninja 2D platformer. I
  21. 0:49want to push the limits of what an AI
  22. 0:51could generate. So all of the 3D models,
  23. 0:54the textures, the animation characters,
  24. 0:57even the rendering to give the world a
  25. 0:59pixelated look was generated by AI. For
  26. 1:02another game, and this blew my mind, I
  27. 1:05had it procedurally generate a world
  28. 1:07with smooth terrain, so not voxels like
  29. 1:09Minecraft, and scatter assets that are
  30. 1:11from the marketplace. But why stop
  31. 1:14there? So I made this procedural world
  32. 1:16an entire planet. Now that I have a
  33. 1:19planet, why not generate other planets
  34. 1:22with their own orbits and moons to
  35. 1:24create a solar system. Since I have
  36. 1:27randomly generated a star system,
  37. 1:29nothing is stopping me from generating
  38. 1:31more stars and planets until I have an
  39. 1:34entire galaxy. Each of these stars, if I
  40. 1:37zoom in on them, they have their own
  41. 1:39planets. And a player can hop into their
  42. 1:42ship to travel to any of these planets.
  43. 1:44Essentially, I just made a mini No Man's
  44. 1:47Sky. For all of these games, I didn't
  45. 1:49write a single line of code or create a
  46. 1:52blueprint. These are all AI generated
  47. 1:55just from me prompting. Now these games
  48. 1:57were not created by one single prompt.
  49. 2:00These were hundreds upon hundreds of
  50. 2:01prompts and a lot of back-and-forth
  51. 2:03testing. Also, because I know the
  52. 2:05different systems that make up Unreal
  53. 2:07and 3D in general, I knew what to ask
  54. 2:09from the AI and guide it in the right
  55. 2:12direction using my prior experiences. I
  56. 2:15will show you the process of creating
  57. 2:17this game called Blob Siege, which is a
  58. 2:19tower defense game that sees you defend
  59. 2:21a castle against an army of evil blobs.
  60. 2:24The blobs come in waves and as you
  61. 2:25defeat each wave, you can upgrade your
  62. 2:27defenses. With AI, the potential is
  63. 2:30limitless. So I am creating this game as
  64. 2:32an example to show you how, but I
  65. 2:34encourage you to create your own game
  66. 2:35with the workflows I'm about to show. I
  67. 2:37will assume that you know the very
  68. 2:38basics of Unreal. If you're brand new,
  69. 2:41luckily for you, I just uploaded a new
  70. 2:43Unreal Engine beginner course. That
  71. 2:45video covers all the fundamentals of the
  72. 2:46engine. So I recommend watching that
  73. 2:48first before starting this tutorial.
  74. 2:51Before we jump into how to set up AI, we
  75. 2:53first have to talk about the general
  76. 2:55landscape of AI because a lot has
  77. 2:57changed this month and last month. So
  78. 3:00I've always been following the
  79. 3:01development of AI. Whenever a new model
  80. 3:04releases, I plug it into Unreal to see
  81. 3:06what its capabilities are with game
  82. 3:08coding. And while they have always been
  83. 3:10okay, it never felt like you had to use
  84. 3:12it. That was until last month with the
  85. 3:15release of GPT-6 Astra and Opus 5.5,
  86. 3:19its capabilities with game coding
  87. 3:21shocked me. The reason why we have seen
  88. 3:24an explosion of game merging, modding,
  89. 3:27decompilations, things we didn't think
  90. 3:29were possible beforehand is because
  91. 3:32these AI capabilities at games are
  92. 3:35leagues better than the previous models.
  93. 3:38In this tutorial, I will use and I
  94. 3:39recommend you use the state-of-the-art
  95. 3:41models, essentially the newest models
  96. 3:44that are released. So the ranking right
  97. 3:46now for the AIs that are best at game
  98. 3:49coding, and do keep Keep mind that this
  99. 3:51changes month to month. Whenever a new
  100. 3:53model releases, this ranking will
  101. 3:55change, but the best one right now for
  102. 3:57game coding and Unreal is Claude Opus
  103. 4:005.5. When Fable 5.5 releases, that will
  104. 4:03be above Opus. Now, if you do have a
  105. 4:06ChatGPT subscription, below these two is
  106. 4:09GPT-6 Astra and GPT-6.1
  107. 4:13Soul. So, those are also insanely good.
  108. 4:15In fact, for the majority of the game
  109. 4:17demos I just showed, I coded the
  110. 4:19majority of that with GPT-6 Astra. So,
  111. 4:22if you do have a ChatGPT subscription,
  112. 4:24you can also follow along. They work
  113. 4:26exactly the same as Claude. There really
  114. 4:28is no difference between the two. In
  115. 4:30this tutorial, I will mostly be using
  116. 4:32Opus 5.5, but I will show you how to set
  117. 4:35up ChatGPT. Unreal's right now in a
  118. 4:37transition. Next year, Unreal Engine 6
  119. 4:39is releasing and UE5 will get an update
  120. 4:42early next year that will make it more
  121. 4:44AI-friendly. So, make sure you follow me
  122. 4:46for updates because everything is
  123. 4:47rapidly changing week to week. Another
  124. 4:50thing is that AI is a sliding scale. You
  125. 4:52can use as much AI as you want or as
  126. 4:55little. It's really up to you. Now, for
  127. 4:57the majority of this video, I am mostly
  128. 4:59talking about AI-generated code. While I
  129. 5:01will talk a little bit about
  130. 5:02AI-generated art, those will be videos
  131. 5:04for another time. This level, for the
  132. 5:07majority of the assets, they're all from
  133. 5:09Fab, which is Unreal's marketplace, and
  134. 5:11I created the level. I made all the
  135. 5:13gameplay decisions. Because, while I
  136. 5:15could ask the AI to create a complete
  137. 5:18game and it will give me something that
  138. 5:20probably looks good and plays well,
  139. 5:22really I wasn't the one who made the
  140. 5:24game then. That was the AI. For me
  141. 5:26personally, I prefer to control the AI
  142. 5:28as much as possible. Instead of just
  143. 5:30one-shoting a game and letting the AI
  144. 5:32make all the decisions, I will build my
  145. 5:34game feature by feature, prompt by
  146. 5:36prompt, and test it at every stage of
  147. 5:38its development to make sure I'm guiding
  148. 5:41it towards my exact vision. And it's fun
  149. 5:43writing the narrative, creating the
  150. 5:45world, level building, and making the
  151. 5:47decisions that count. I don't want to
  152. 5:50give that all over to the AI. And the
  153. 5:52benefit of using Unreal Engine, rather
  154. 5:54than just generating a game from
  155. 5:55scratch, is that we get access to all of
  156. 5:58Unreal's tools and its editor. So, if
  157. 6:00the AI generates something and we don't
  158. 6:02like it, we can always manually change
  159. 6:04it. So, we still get full control over
  160. 6:06our game. Before we can start using AI
  161. 6:09in Unreal, we first have to set it up.
  162. 6:11And to do so, there are two main ways
  163. 6:13that the AI will communicate with
  164. 6:15Unreal. Number one is through the Unreal
  165. 6:17MCP, which stands for Model Context
  166. 6:19Protocol. Essentially, it controls the
  167. 6:22Unreal Engine editor, everything we can
  168. 6:24do from editing our level to creating a
  169. 6:27blueprint, the MCP can also do. And
  170. 6:30because it requires the editor to be
  171. 6:32open, it's pretty cool because we can
  172. 6:33watch the AI work. So, we will set that
  173. 6:36up in just a moment. The second way is
  174. 6:39through the AI generating C++ code,
  175. 6:42because modern AI is a large language
  176. 6:44model, which means it is insanely good
  177. 6:47at generating gameplay code for us. And
  178. 6:50that is how the majority of our games
  179. 6:51are going to be created now, and that is
  180. 6:54the AI generating C++ code for us. So,
  181. 6:57I'll show you how to set that up after
  182. 6:59this. And there is a third way, and this
  183. 7:01is how AI works by default, and that is
  184. 7:04the AI will create C++ and Python
  185. 7:06scripts to interact with Unreal's API.
  186. 7:09And there is no setup for that, and I'll
  187. 7:11show how the AI, I'll point that out in
  188. 7:14just a moment, because right now we need
  189. 7:16to show how to set up the Unreal MCP.
  190. 7:20In case you are curious, I will be
  191. 7:21building my game inside of the castle
  192. 7:23environment. So, if you want to learn
  193. 7:25how to create this exact environment,
  194. 7:27then you can watch the UE5 beginner
  195. 7:29tutorial, where at the end, to showcase
  196. 7:31how we build open worlds, we will create
  197. 7:33this cute little castle environment
  198. 7:36where we will place our game. Although,
  199. 7:38you can use any environment, you can
  200. 7:40create your own or use a blank template.
  201. 7:43It's really up to you because after all,
  202. 7:44this is your game. Just for my case,
  203. 7:47I'll use the environment I've already
  204. 7:48created. Because Unreal projects are
  205. 7:50just files on my computer, we need the
  206. 7:53AI desktop applications so they can
  207. 7:55interact with our computer. We can't
  208. 7:57just use their web versions.
  209. 7:58Specifically for the majority of this
  210. 8:00course, I'll be using Claude Code.
  211. 8:02Although if you do have an Open AI
  212. 8:04subscription, you can also use Codex
  213. 8:07because GPT-6 Astra is insanely good. So
  214. 8:10while I will be using Claude Code for
  215. 8:12the majority of the time, I will show
  216. 8:14you how to set up and get started with
  217. 8:16Codex also. Now to begin, we first have
  218. 8:18to point the AI towards our project to
  219. 8:21say, "Hey AI, I want you to work on this
  220. 8:23Unreal project." For Claude Code, it's
  221. 8:25pretty simple. Just grab your Unreal
  222. 8:27project, drag it in, and let go, and now
  223. 8:29it's pointing at it.
  224. 8:31Now for Codex,
  225. 8:33let me open it back up again.
  226. 8:34Under projects, click on the plus
  227. 8:36button, and now drag Electric Dreams
  228. 8:38here.
  229. 8:40I'll call this
  230. 8:43and select create project trust folder.
  231. 8:45And now they're both pointing at it. So
  232. 8:47we want to do an AI-first workflow, and
  233. 8:52because of that, we have to start stop
  234. 8:54underestimating how powerful the AI is.
  235. 8:57Now I will show you how we could
  236. 8:59manually set up the Unreal MCP, but you
  237. 9:02can also just ask the AI to set it up
  238. 9:04for you.
  239. 9:05So what I'll do is let me exit out.
  240. 9:08And now with my AI pointing to Electric
  241. 9:11Dreams environment castle, I will mostly
  242. 9:13be using Opus 5.5 on medium.
  243. 9:16I could type it out, but we are living
  244. 9:19in the future, so talk to it like it's a
  245. 9:21co-worker
  246. 9:22by selecting this mic icon.
  247. 9:25I want you to enable the Unreal MCP
  248. 9:27plugin. Also enable the all tool set
  249. 9:29plugin. Make sure auto start server is
  250. 9:32enabled. That's how the MCP server will
  251. 9:34start whenever I open up Unreal.
  252. 9:36And set up the config files for Cloud
  253. 9:39Code and for Code X through the Unreal
  254. 9:42MCP. I want you to verify that the
  255. 9:45Unreal MCP is working. You can open up
  256. 9:47the project.
  257. 9:49And now we're going to watch the AI work
  258. 9:51its magic. So, it's going to go through
  259. 9:54and enable it automatically for us. Now,
  260. 9:56you don't need to be very specific with
  261. 9:58your prompts. You could just say enable
  262. 9:59the MCP plugin, enable the tool set
  263. 10:02plugin, and auto start the server.
  264. 10:04Although, if you do want to use my
  265. 10:06prompts, here's the takeaway from this
  266. 10:08video and that is references screenshots
  267. 10:11are your friends. You could, instead of
  268. 10:13manually typing in each letter to get my
  269. 10:16exact prompt, just screenshot my prompt
  270. 10:20and then give it to the AI and say
  271. 10:21activate this prompt.
  272. 10:23And now the AI is automatically opening
  273. 10:25up our project
  274. 10:27to verify the MCP is working. It is done
  275. 10:30and connected. Now, to just look at this
  276. 10:33thread, I'll click on this button to
  277. 10:35hide the side menu.
  278. 10:37Let's go back into the original level.
  279. 10:40Within the project we created, let's
  280. 10:42verify that ChatGPT has access to the
  281. 10:44MCP.
  282. 10:45Do you have access to the MCP, aka you
  283. 10:47list out all the tools
  284. 10:49specifically for Unreal?
  285. 10:52That took a while because there are
  286. 10:53insane amount of tools. Tools are
  287. 10:55basically the actions that the MCP can
  288. 10:57take. So, now we know that our AIs are
  289. 11:00successfully connected to Unreal.
  290. 11:03Do you keep in mind that I recommend
  291. 11:04that you set in Cloud Code the mode to
  292. 11:07auto
  293. 11:08and then in Code X approve for me. The
  294. 11:12reason why is because with each new tool
  295. 11:14call
  296. 11:15the AI will stop and ask for our
  297. 11:16permission. We want to give it full
  298. 11:18permission to use every single tool from
  299. 11:20the MCP. So, just set that to auto. Now,
  300. 11:23the way we would manually set up the
  301. 11:26Unreal MCP is by going to edit
  302. 11:30plugins
  303. 11:32MCP
  304. 11:33make sure that's enabled.
  305. 11:35And then type in all tool sets. And make
  306. 11:37sure this is enabled also. Because the
  307. 11:39MCP by itself doesn't have the tools,
  308. 11:41this contains all the actions that it
  309. 11:43can take. And then you have to restart
  310. 11:46Unreal to get the MCP working. But
  311. 11:50then go to editor preferences, down to
  312. 11:52model context protocol. And make sure
  313. 11:54auto start server is enabled because if
  314. 11:56it's not, then we have to automatically
  315. 11:59or manually start the server each time.
  316. 12:01I want this server to start every time I
  317. 12:04open up Unreal.
  318. 12:06And specifically within the console
  319. 12:08commands, the way we would start the
  320. 12:10server is model context protocol. And
  321. 12:13then select start server.
  322. 12:15And one last thing we need to do is that
  323. 12:17there are some config files that we need
  324. 12:20to add to our project depending on what
  325. 12:22AI you are using.
  326. 12:24So
  327. 12:25up here we have generate client config.
  328. 12:28If you're using Claude code, type in
  329. 12:30Claude. If you're using Codex, you can
  330. 12:32type in Codex. Or you can just type in
  331. 12:34all to generate all of the config files
  332. 12:38for
  333. 12:39all the most popular AIs such as Gemini
  334. 12:42or Codex. So that is how we would
  335. 12:44manually set it up. And notice now
  336. 12:47going back into Claude code all the way
  337. 12:50up here.
  338. 12:51This is the exact process I just
  339. 12:53explained to the AI. So this is what I
  340. 12:55wanted to do. And it was as easy as just
  341. 12:57telling it, "Hey, this is the process I
  342. 12:59would do. How about you do that for me?"
  343. 13:02And then it just set it up automatically
  344. 13:04for us. Epic Games also has some very
  345. 13:07useful skills for the Unreal MCP to make
  346. 13:09it work better. And you can think of
  347. 13:11skills as just that. It's instructions
  348. 13:15that if the AI thinks, "Hey, this user
  349. 13:17is asking me for this specific thing,
  350. 13:19this skill might be able to help me out.
  351. 13:21Let me read it." So it adds additional
  352. 13:23context.
  353. 13:25You can get it from their GitHub Epic
  354. 13:27Games Unreal Engine Skills for Cloud
  355. 13:29Code.
  356. 13:30I could just
  357. 13:32copy this link and then paste it here.
  358. 13:34Or scrolling down, they give me an
  359. 13:36actual install
  360. 13:37for Cloud Code. Select that, copied.
  361. 13:40And then here,
  362. 13:42put that in.
  363. 13:44It will find
  364. 13:46and now install those skills. And they
  365. 13:49are now successfully installed.
  366. 13:52If you do want to follow along with me,
  367. 13:54you can download some assets
  368. 13:56that I've created for this tutorial.
  369. 13:58There's a link in the description,
  370. 14:00specifically game AI assets, which
  371. 14:03contains the main player character, the
  372. 14:05weapons, the turrets, everything we need
  373. 14:07for this blob destroyer game.
  374. 14:10So, I'll go ahead and open this up.
  375. 14:13And then migrate, specifically FPS game,
  376. 14:16into my main project. Or if I didn't
  377. 14:20want to manually migrate it, I can tell
  378. 14:22the AI to do it for me. So, I gave it
  379. 14:24the path. I just copied the path from
  380. 14:27the file explorer, and then said migrate
  381. 14:29all the assets within this Unreal
  382. 14:31project into my main project here, and
  383. 14:33it's able to do it. Although it did take
  384. 14:34a while. It took about a minute and 30
  385. 14:37seconds.
  386. 14:38And this is the thing. AI is still kind
  387. 14:42of slow at some things, specifically
  388. 14:43with the Unreal MCP, because there's
  389. 14:45just so much context, it doesn't really
  390. 14:47know what to do. So, what we will do,
  391. 14:50and the majority of our interactions
  392. 14:52with AI in Unreal, will be through the
  393. 14:54C++ coding. So, we will really only use
  394. 14:57the Unreal MCP at the beginning right
  395. 14:59now, just to show how to set it up and
  396. 15:01how it can edit your pre-existing
  397. 15:03assets, but we will start moving all of
  398. 15:05the gameplay code from blueprints over
  399. 15:08to C++, cuz that is where it is just
  400. 15:11insanely fast and the true unlock will
  401. 15:13happen there. The folder that contains
  402. 15:15my assets is FPS game,
  403. 15:18and then first person maps, first person
  404. 15:21map.
  405. 15:22This project essentially contains my own
  406. 15:25first-person template. So, pressing
  407. 15:26play, here we have the first-person
  408. 15:28character. I can walk around, look, and
  409. 15:30jump, and shoot. And remember, this is
  410. 15:33the character we used all the way back 2
  411. 15:35to 3 years ago for the UE5 first game
  412. 15:38tutorial.
  413. 15:40And we can see what assets are included
  414. 15:42within this pack by pressing control
  415. 15:44space and making sure my folder is
  416. 15:46selected. Then within filters, select
  417. 15:49the specific asset type you want to
  418. 15:50filter for. In my case, it's static mesh
  419. 15:52all the way over here. Then enable that
  420. 15:54filter.
  421. 15:55And now we have all the meshes that are
  422. 15:57included. Of course, we have our gun.
  423. 15:59And we also have the turret base
  424. 16:02and the turret top. So, we will use
  425. 16:05these to create a turret, which will be
  426. 16:07the main defenses against the enemy
  427. 16:09blobs.
  428. 16:11Now, if you press play, and when you
  429. 16:13press play and you don't see the exact
  430. 16:15character you want to use, that's
  431. 16:17because within the world settings, and
  432. 16:19if you don't have the world settings,
  433. 16:21then come up to window
  434. 16:23down here under world settings.
  435. 16:26Under the game mode override,
  436. 16:29make sure you have first-person game
  437. 16:30mode selected in case you do want to use
  438. 16:33a specific type of character. Now, for
  439. 16:36my case, you may have noticed that my
  440. 16:39viewport is pretty big. That's because I
  441. 16:41think it is a lot nicer to look at a
  442. 16:43very clean viewport where we're just
  443. 16:45looking at the level. I have all my
  444. 16:47windows docked to the side with the F10
  445. 16:49button. So, F10 will dock my windows to
  446. 16:52the side. I also got rid I'm right now
  447. 16:54hiding the viewport toolbar, and the
  448. 16:57shortcut for that is control shift and T
  449. 17:00at the same time. So, normally you would
  450. 17:02see this view bar, but I'll press
  451. 17:04control shift and T to hide it. If I
  452. 17:06need it, I can always bring it back.
  453. 17:08Now, let's jump back into
  454. 17:10my other main level.
  455. 17:13And to very quickly go into a level that
  456. 17:15I already had opened, I'll come to file,
  457. 17:18recent levels, and it is the main castle
  458. 17:21environment.
  459. 17:22I will not be the first-person
  460. 17:23character, instead I am the third-person
  461. 17:25character right now. So, going back into
  462. 17:27world settings,
  463. 17:29and let me check first-person game mode.
  464. 17:32Press play, and out here I am running
  465. 17:35around my world.
  466. 17:36I can shoot, and now I'm going to have
  467. 17:39to defend this castle from the enemy
  468. 17:41blobs. Before we move on to C++, I do
  469. 17:44want to mention some use cases for the
  470. 17:46Unreal MCP. Now, for the majority of our
  471. 17:49interactions with AI in Unreal, that
  472. 17:52will all be through C++.
  473. 17:54When MCP is useful is in very specific
  474. 17:58situations. You can think of the MCP as
  475. 18:01a live assistant for when we are
  476. 18:03literally editing the world. So, if we
  477. 18:05have a UAsset open, like a blueprint,
  478. 18:08or a material, and if we have a
  479. 18:10question, or we want the MCP to make a
  480. 18:12small edit, then we can ask the AI, but
  481. 18:16the MCP is limited, and it can be slow.
  482. 18:19Again,
  483. 18:20when we connect AI to C++, that is when
  484. 18:23we can actually start to do anything,
  485. 18:25and start to program very complicated
  486. 18:28games.
  487. 18:29So, when is the MCP useful? Well, let's
  488. 18:31say if I don't know how a blueprint
  489. 18:34works. For example, I will open up
  490. 18:37BP_FirstPerson
  491. 18:38under FPS Game, First Person Blueprints.
  492. 18:41Open this up, and out here we have a
  493. 18:43bunch of blueprint nodes. I'll go ahead
  494. 18:45and move these and I have no idea
  495. 18:48what these nodes are doing.
  496. 18:50Then,
  497. 18:52with Claude,
  498. 18:54can you please explain to me
  499. 18:55BP_FirstPerson?
  500. 18:56You can grab the nodes by using the MCP.
  501. 18:59And out here I get a detailed
  502. 19:01explanation
  503. 19:03of this node graph. And now
  504. 19:06that this node graph is in context, I
  505. 19:07can ask it specific questions. For
  506. 19:10example,
  507. 19:13I'm a little bit confused of what the
  508. 19:14route right mouse button event is doing.
  509. 19:17Can you explain that?
  510. 19:19And now it's answering a lot faster
  511. 19:21because it has already read the entire
  512. 19:24blueprint and put that into its memory.
  513. 19:26Or we can now make a direct change to
  514. 19:28the graph.
  515. 19:29So now here,
  516. 19:32can you add the ability for the
  517. 19:33character to sprint by holding down
  518. 19:35shift? So when a player holds down
  519. 19:38shift, then the first-person character
  520. 19:40will run faster. When they let go, it'll
  521. 19:42go back to its normal run speed.
  522. 19:45And send that off.
  523. 19:47So, this is the same example from the
  524. 19:50UE5 beginner tutorial.
  525. 19:52This is why the MCP is cool because we
  526. 19:54can watch it make changes to my graph in
  527. 19:57real time. So it just made these two
  528. 20:00variables.
  529. 20:01And now here, you can see that they're
  530. 20:03spawning in.
  531. 20:05And they should connect any second now.
  532. 20:08And now that is done. It's even asking
  533. 20:10me if I want to save it. Yes, go ahead
  534. 20:12and save.
  535. 20:14So, that is the main use case for the
  536. 20:15Unreal MCP is when you're editing the UE
  537. 20:18assets directly on a graph like this
  538. 20:21with your editor open up. Now, this was
  539. 20:23relatively slow. It would have been a
  540. 20:25lot faster if that was all done in C++.
  541. 20:28So that's why we're setting C++ up so
  542. 20:31the MCP or so that the AI doesn't have
  543. 20:33to worry about creating specific
  544. 20:35variables or hooking them up. That's
  545. 20:37just a lot more context, which makes it
  546. 20:39slower. Now, in the future, the MCP will
  547. 20:41get a lot faster and a lot better. So
  548. 20:43maybe we start to move more of our
  549. 20:46operate of our operations over to the
  550. 20:48MCP. But as of now,
  551. 20:50we will mostly be focusing on C++. And
  552. 20:53another use case for the MCP is that it
  553. 20:56can help us essentially be a tool while
  554. 20:59we're creating our environments to maybe
  555. 21:01scatter assets around or create
  556. 21:03buildings.
  557. 21:04And of course, we can now have that that
  558. 21:06is working by pressing play.
  559. 21:08Then let me turn around.
  560. 21:11Start walking and then hold down shift.
  561. 21:14And now I am running. So a little bit
  562. 21:16faster.
  563. 21:18Using C++ is relatively simple. It's
  564. 21:20just we have to download Visual Studio
  565. 21:22Community first and then enable some
  566. 21:24settings and frameworks within Visual
  567. 21:26Studio Community. The reason why is
  568. 21:28because while the AI can write the C++,
  569. 21:31it still needs a way to compile it. And
  570. 21:34it compiles Unreal C++ code through
  571. 21:37Visual Studio Community. So you want to
  572. 21:39go ahead and download the latest
  573. 21:40version. Specifically, it's not Visual
  574. 21:42Studio Code which people get mixed up
  575. 21:45on. It is the actual Visual Studio with
  576. 21:48the purple icon, not the blue one. If
  577. 21:51you are installing Visual Studio for the
  578. 21:52first time, then it will ask you what
  579. 21:55frameworks or code bases you want to
  580. 21:56install with it. If you already have
  581. 21:58Visual Studio installed, then click on
  582. 22:00modify through the installer so you can
  583. 22:02pick those frameworks. Now specifically,
  584. 22:05you want .NET Multi-platform App UI
  585. 22:07Development enabled, .NET Desktop
  586. 22:10Development,
  587. 22:11Desktop Development with C++,
  588. 22:14and Game Development with C++. It even
  589. 22:17tells you in the description that this
  590. 22:18is meant for Unreal. Make sure those are
  591. 22:20enabled. And there are some additional
  592. 22:23code bases we need under Game
  593. 22:25Development with C++.
  594. 22:27So under here, make sure C++ Profiling
  595. 22:30Tools is enabled, C++ Build Insights,
  596. 22:34Windows 11 SDK 10.0.26
  597. 22:38or newer. This is 261, so this is newer
  598. 22:41and will work. Visual Studio Tools for
  599. 22:43Unreal Engine, Visual Studio Debugger
  600. 22:45Tools for Unreal Engine,
  601. 22:47and just in case the Unreal Engine
  602. 22:49Installer, although we already have the
  603. 22:51installer. This would just download that
  604. 22:53application for us automatically. So
  605. 22:55that is a lot of things we have to
  606. 22:56enable, but enabling all of these will
  607. 22:58make sure that Unreal Engine can compile
  608. 23:00C++ code. And then select install or
  609. 23:03modify. To see if this is working, let's
  610. 23:05have it create a C++ class and then
  611. 23:08compile. But in order for it to compile,
  612. 23:10Unreal Engine has to be closed. So, I'll
  613. 23:12go ahead and close it.
  614. 23:14And now within Claude, I'll tell it,
  615. 23:17"Create a C++ class of just a sphere
  616. 23:21and compile Unreal. Let me know if
  617. 23:23everything is working or if I have to
  618. 23:26make any changes."
  619. 23:28So, if we did forget something when we
  620. 23:30were enabling all those frameworks, then
  621. 23:32Claude will tell us what to enable.
  622. 23:35And this is the most unfortunate part
  623. 23:37about developing C++ for Unreal is that
  624. 23:40we constantly have to close the project
  625. 23:43for it to compile and then reopen it.
  626. 23:45Whenever we make a change, for the most
  627. 23:46part, we do have to close Unreal. And
  628. 23:49while it is technically possible where
  629. 23:52when the AI is thinking about what C++
  630. 23:55code to write and is writing the code,
  631. 23:57we can still be in the project and make
  632. 23:59edits. When it's making those changes, I
  633. 24:01don't recommend you do that. The reason
  634. 24:04why is because the AI is really smart.
  635. 24:07It is able to open up Unreal Engine by
  636. 24:09itself and then test different things,
  637. 24:11make sure everything compiles, and
  638. 24:13catches bugs before you even know they
  639. 24:15exist. And then if we have our own
  640. 24:17instance of the editor open up and we're
  641. 24:19making our own changes, then the AI will
  642. 24:22not double-check its own work and will
  643. 24:24not open up Unreal by itself. So, it's
  644. 24:27recommended that you do close Unreal
  645. 24:30whenever you make a change. And that is
  646. 24:33a huge hassle and it really does disrupt
  647. 24:35the flow when you're creating a project.
  648. 24:37So, Epic Games is working on this.
  649. 24:40I do expect in a future version of the
  650. 24:43engine, you'll be able to prompt it to
  651. 24:45create code for you. And then we can
  652. 24:47still work in the engine. And if the AI
  653. 24:50needs to check something, then it will
  654. 24:52open up its own version of the editor
  655. 24:55that will not interfere with what we're
  656. 24:56doing. But, that is
  657. 24:59a hassle for now. Just know that
  658. 25:01whenever you do make a change, close
  659. 25:02Unreal and reopen it when you're done.
  660. 25:04You can also tell
  661. 25:07the AI to remind it
  662. 25:10that it can open up the editor once it's
  663. 25:12done for us. That's how we don't have to
  664. 25:14open it up ourselves each time it is
  665. 25:17done compiling. And I'll show you how to
  666. 25:18do that in just a moment because now
  667. 25:20let's see if it did create that C++
  668. 25:22class. Scrolling down here, if you do
  669. 25:24not see the C++ folder with the cog icon
  670. 25:29at the top right-hand corner come down
  671. 25:31here and make sure C++ is enabled, it's
  672. 25:33checked under C++ classes. We now have
  673. 25:37that class I told to make.
  674. 25:39Everything compiled correctly.
  675. 25:41And now here is our first C++ object.
  676. 25:45Often times I will tell the AI that it
  677. 25:47has full permission to open up the
  678. 25:48project and to test to make sure that
  679. 25:51there are no errors and that everything
  680. 25:53is compiling correctly and that it got
  681. 25:55the basics of my task down. But, even if
  682. 25:58you do not explicitly tell to test, the
  683. 26:00AI will, by itself, just open up Unreal.
  684. 26:04And you won't even see it open up Unreal
  685. 26:06because it likes to run programs in
  686. 26:09headless mode. Which means that it can
  687. 26:11see the instance of the program it's
  688. 26:14running, but us, the editors, the
  689. 26:16humans, we're unable to see it. And then
  690. 26:18that's called running a program in
  691. 26:19headless mode. So, even though Unreal
  692. 26:22Engine isn't open on your end if you
  693. 26:25check the task manager, you might see
  694. 26:27that Unreal Engine, or if you're using
  695. 26:29Blender, is running right here. And that
  696. 26:31means that the AI is testing. Also, when
  697. 26:34the AI is running, when it is thinking,
  698. 26:36you can look at the drop-downs and then
  699. 26:39see if it's taking any screenshots of
  700. 26:41Unreal Engine. And that's another way
  701. 26:42that you know that it's currently in the
  702. 26:44editor.
  703. 26:46Now, let's create our first gameplay
  704. 26:47class and specifically a turret. Now,
  705. 26:50right now this turret will not be
  706. 26:52friendly. It'll be shooting at the
  707. 26:53player just to make sure that these
  708. 26:55shooting mechanics of the turret are
  709. 26:57working. And then when I do think that
  710. 27:00they're working and they look nice, we
  711. 27:02will convert that into a friendly
  712. 27:03turret. Because the end goal of this
  713. 27:06object is to allow me to place the
  714. 27:08turret anywhere in my world, for
  715. 27:10example, right here, and then the turret
  716. 27:12will be scanning, looking for the enemy,
  717. 27:14and when it sees the enemy, it starts
  718. 27:16shooting at it. But for now, this turret
  719. 27:18will be an enemy, so I want to make it
  720. 27:20that so it's shooting at the player
  721. 27:22to make sure it's shooting is working.
  722. 27:25So, included within FPS game meshes, we
  723. 27:28have turret_base
  724. 27:30and turret_top.
  725. 27:33Dragging out base,
  726. 27:35this is the base of the turret, so this
  727. 27:37will not move, but turret_top will move.
  728. 27:40So, it is this that will then be placed,
  729. 27:43so I have to tell the AI, "Hey,
  730. 27:45turret_top will be placed attached to
  731. 27:49the bottom,
  732. 27:51and its pivot will be right here.
  733. 27:53So, now if I rotate this, we can see
  734. 27:55that as I rotate this, it'll be able to
  735. 27:57look at the player or look at the
  736. 27:59different enemies.
  737. 28:01So, this is the class we are going to
  738. 28:03create right now.
  739. 28:05And because I know the exact names, base
  740. 28:08and top, I can explicitly
  741. 28:11say any asset's name within my content
  742. 28:14drawer, and the AI will know to use it.
  743. 28:19Now, let's bring back Claude
  744. 28:22and then give it a prompt. I want you to
  745. 28:26create a C++ class called turret that is
  746. 28:29composed of two static meshes,
  747. 28:31turret_base
  748. 28:33and turret_top.
  749. 28:35Now, turret_top should be attached to
  750. 28:38the base,
  751. 28:39and the base has a hole inside of it.
  752. 28:42The top has a sphere pivot. The sphere
  753. 28:44pivot should be slightly elevated. It
  754. 28:48should be inside of the hole of the
  755. 28:50base.
  756. 28:51So, make sure you check on that.
  757. 28:54Do not use the Unreal MCP. This is all
  758. 28:56done in C++.
  759. 29:00And now,
  760. 29:02I will exit out
  761. 29:03of Unreal and then
  762. 29:06send this off. So, I could have worded
  763. 29:09this several different ways. My best
  764. 29:11suggestion is that when you're
  765. 29:12communicating with AI, you just act like
  766. 29:15it's another co-worker. Except it is a
  767. 29:19co-worker that is available to you 24/7
  768. 29:22and is an expert at coding C++ in
  769. 29:25Unreal. And now it is done. And what is
  770. 29:27nice about AI is that it will give you a
  771. 29:29little summary as the output, basically
  772. 29:32explaining what it did to achieve your
  773. 29:34task. For example, right here it's
  774. 29:35telling me that it ran a headless editor
  775. 29:38command
  776. 29:40to then measure the exact sphere area of
  777. 29:43turret_top and the base. That's how to
  778. 29:46line it up better. So, let's see if it
  779. 29:47actually worked by
  780. 29:50jumping into
  781. 29:52my project. On the subject of Claude's
  782. 29:54output, some people have complained in
  783. 29:56the past that Claude way over explains
  784. 29:59things. It might mention something or
  785. 30:01give a detail that is not necessary to
  786. 30:04the output. And if you do think Claude
  787. 30:06is being too wordy, over explaining,
  788. 30:08then you could change its output style
  789. 30:10to be more concise, to get to the point
  790. 30:13quicker, and to still give you enough
  791. 30:15information where you know what it did.
  792. 30:17To do so, go into Claude code settings.
  793. 30:20Under Claude code, scroll down where you
  794. 30:22get to output style, and then you can
  795. 30:24set it from default to concise.
  796. 30:27So, now Claude will not over-explain, it
  797. 30:30will not be as wordy, in case you don't
  798. 30:32like the output. In my case, I'll just
  799. 30:33leave it at default, but it's good to
  800. 30:35know that it is there. Now, this issue
  801. 30:37isn't that big of an issue on the newer
  802. 30:39models, but it was in older. So, now
  803. 30:41let's jump
  804. 30:43into the environments.
  805. 30:45Okay, going into C++ classes, electric
  806. 30:48dream sample, we now have a turrets.
  807. 30:50Dragging this in, and this looks pretty
  808. 30:53cool. It was able to almost correctly
  809. 30:56line up the top with the bottom,
  810. 30:58although
  811. 31:00I do think that's a little bit too high
  812. 31:02compared to where I want it to be with
  813. 31:05these static meshes. So, what I could do
  814. 31:07is ask it to lower it or
  815. 31:10and here's the big takeaway from the
  816. 31:11video, reference is key.
  817. 31:14If you want the AI to do something
  818. 31:16specific, make sure you have a photo or
  819. 31:19a video and give it to the AI. The AI
  820. 31:21will then have a lot more context to be
  821. 31:23able to achieve what you want. So, I am
  822. 31:26going to screenshot this
  823. 31:29and then exit out again.
  824. 31:31Right here, give it the screenshot and
  825. 31:33say,
  826. 31:35"Can you lower the turret {underscore}
  827. 31:37top to be more like this image?"
  828. 31:41And then send it, and it'll be smart
  829. 31:43enough to know what to do. It is done
  830. 31:45running. This took about 15 seconds. So,
  831. 31:48open it back up.
  832. 31:50Now, in case you're ever curious and you
  833. 31:51want to know more information about how
  834. 31:54the AI achieved something specific, then
  835. 31:57we can ask it right here. For example,
  836. 31:59"I'm curious, what commands did you use
  837. 32:01to measure the turret base and the
  838. 32:05turret top to determine the positioning?
  839. 32:08Can you tell me the exact process that
  840. 32:11you did?"
  841. 32:12And right off the bat, it's going to be
  842. 32:14really fast because it's already loaded
  843. 32:16in its context, so it doesn't have to
  844. 32:17search anything up. It already remembers
  845. 32:21within the context because this wasn't
  846. 32:22that long ago how it achieved that. And
  847. 32:25it's telling us right now that
  848. 32:28and this is what I meant with Python
  849. 32:29scripts, it wrote a Python script to
  850. 32:32then grab those assets and analyze it
  851. 32:34itself. And this is
  852. 32:37significantly faster than going through
  853. 32:40the Unreal MCP. Because if it had to use
  854. 32:43the MCP, then it would have to load up
  855. 32:45the Unreal Engine, wait for the MCP
  856. 32:47server to start,
  857. 32:49and then go through all the different
  858. 32:51MCP tools, pick out what it needs, and
  859. 32:53that is just such a slow process.
  860. 32:55Remember, modern LLMs are insanely good
  861. 32:59at programming. It's a lot faster for
  862. 33:02the AI to write a Python script, to then
  863. 33:05it grab that data directly, analyze it,
  864. 33:08and then throw away the Python script.
  865. 33:10I'm really glad that I asked it how did
  866. 33:12it achieve it, because this is such a
  867. 33:14good example of why we should, for the
  868. 33:16most part, not really use the MCP and
  869. 33:19just interact with the engine through
  870. 33:21C++ and Python scripts. So, I want to
  871. 33:24explicitly tell Claude to remember,
  872. 33:28"Hey, do not use the MCP." Because in my
  873. 33:31original prompt, if I didn't explicitly
  874. 33:33tell it, "Do not use Unreal MCP," then
  875. 33:36there was a good chance that it might
  876. 33:37have opened up Unreal by itself, and
  877. 33:39then start to use the MCP. But
  878. 33:41unfortunately for us,
  879. 33:43now,
  880. 33:44and this is something that does trip up
  881. 33:46a lot of new users, when we have
  882. 33:48different chats. So, we have one chat
  883. 33:50right here, another chat right here.
  884. 33:52They're also called threads and
  885. 33:53sessions. These threads and sessions
  886. 33:55don't necessarily communicate with each
  887. 33:57other. So, I can do something within
  888. 33:59this thread, and then the next thread
  889. 34:01will not know what I just did. For
  890. 34:03example, I will Now, as a goofy example,
  891. 34:07I'll say,
  892. 34:08"I am a dog that barks."
  893. 34:13"Woof. Nice to meet you."
  894. 34:16"All right, cool." So, now I'll create a
  895. 34:18new chat.
  896. 34:20"What animal am I?"
  897. 34:24It can't tell. So, there isn't memory
  898. 34:26between the threads. If you want to save
  899. 34:29information, that's how each thread has
  900. 34:30access to it. For example, the
  901. 34:32information not to use the Unreal MCP
  902. 34:34unless I specifically tell you to, then
  903. 34:37you would save that. You have to tell
  904. 34:39the AI to save it in a claw.md file or
  905. 34:43for every other AI agent like Codex and
  906. 34:47agents.md file. So the memory for AI is
  907. 34:50either in a claw.md or an agents.md. Now
  908. 34:54right now I'm using Claude, so I would
  909. 34:56have to tell it to save it to the
  910. 34:57agents.md.
  911. 35:00I need you to remember, so save this in
  912. 35:02the agents.
  913. 35:03My bad. To the claw.md because this is
  914. 35:07Claude code that
  915. 35:10you should only use the Unreal MCP when
  916. 35:13I tell you to. By default, just run
  917. 35:16Unreal headless through scripts not the
  918. 35:19Unreal MCP unless I tell you to use it.
  919. 35:22I get it mixed up because I do use Codex
  920. 35:25a lot, so then that will be saved to the
  921. 35:27agents.md. Hopefully Claude will move
  922. 35:30over to agents.md with everyone else.
  923. 35:32And now I'll just create a claw.md
  924. 35:34which is located in our project file
  925. 35:36down here. Here's a claw.md. I can open
  926. 35:39this up with any text editor because a
  927. 35:41.md file is just a fancy.txt
  928. 35:44file except now we have headers and
  929. 35:47formatting.
  930. 35:48So edit in notepad.
  931. 35:51And this is the memory of Claude for our
  932. 35:53project. So you can see that it's
  933. 35:56explicitly now telling, "Hey, do not use
  934. 35:59the Unreal MCP unless I tell it to."
  935. 36:02So this file will be loaded up whenever
  936. 36:05we create a new session.
  937. 36:08I actually don't like how it's
  938. 36:10specifically saying a Python script
  939. 36:12because what if a C++ script might be
  940. 36:14better? So I'll tell it to
  941. 36:17in the claw.md get rid of the default
  942. 36:20because I want you to be able to use any
  943. 36:22language, for example C++, with the
  944. 36:25scripts that would be fastest. So we
  945. 36:27don't need default. I just don't want
  946. 36:29you using Unreal MCP.
  947. 36:32Before we move on to adding in more
  948. 36:34features, let's talk about effort level.
  949. 36:36Because right now, throughout this
  950. 36:38entire tutorial, I've been using Opus
  951. 36:405.5 on medium. And effort level is how
  952. 36:45long the model will think to itself
  953. 36:47before it takes an action. If I were to
  954. 36:49give the AI a task and then set it to
  955. 36:52ultra code, then the AI might overthink
  956. 36:55to itself and it would take longer and
  957. 36:58use up more usage credits. So, by using
  958. 37:01some of the lower effort levels, for
  959. 37:03example, medium or low, the model can be
  960. 37:06significantly faster. Generally, for our
  961. 37:09use cases for Unreal Engine 5, it is
  962. 37:11pretty straightforward. So, I would
  963. 37:13leave it at medium or high. If there is
  964. 37:16some bug that the lower effort levels
  965. 37:19cannot find, then I would move up to max
  966. 37:22or ultra code.
  967. 37:24Or if I know that I'm about to give the
  968. 37:26AI a long-running task that it might
  969. 37:29take a while and it is a difficult task
  970. 37:32I can tell, then I would leave it at
  971. 37:34high.
  972. 37:36For everyone using Claude, as of October
  973. 37:382026, I recommend everyone to just leave
  974. 37:41it at medium or high and to use Opus
  975. 37:435.5. In my case, I will leave it at high
  976. 37:46for the rest of this video and use Opus
  977. 37:495.5. When Fable 5.5 releases, probably
  978. 37:53by the time you're seeing this video,
  979. 37:54then this would be the new top model.
  980. 37:57But, Fable does eat up a lot of usage
  981. 37:59credits and probably for what we're
  982. 38:02doing, it would not be necessary. It
  983. 38:04would just be overkill. So, use Opus 5.5
  984. 38:07on medium or high. And even if you have
  985. 38:09one of the lower-tier Claude
  986. 38:10subscriptions, it is pretty hard to use
  987. 38:13up all your credits when you have Opus
  988. 38:155.5 on medium.
  989. 38:17Now, for Codex, Codex also has some
  990. 38:21really good AI models specifically for
  991. 38:24the majority of the code for the three
  992. 38:26games I showed at the beginning of this
  993. 38:27video. That was mostly done using GPT-6
  994. 38:31Astra. So, Astra is also good. Opus 5.5
  995. 38:34is a little bit better. You can leave
  996. 38:36Astra on medium or high and the lowest
  997. 38:39here model I would recommend using
  998. 38:41Unreal with is GPT-6.1
  999. 38:44Soul. So, if you already have a ChatGPT
  1000. 38:47subscription, you can use Soul or Astra.
  1001. 38:50Those are also great and you can achieve
  1002. 38:52everything I'm doing within this
  1003. 38:54tutorial.
  1004. 38:55Because we know that data isn't shared
  1005. 38:57between threads, what I like to do is
  1006. 38:59when I'm adding a feature, I like to
  1007. 39:01keep that feature within its own thread.
  1008. 39:03So, if I'm going to add in a new
  1009. 39:05feature, then I'll create a new thread
  1010. 39:07or if I'm going to work on a
  1011. 39:09pre-existing feature, then I'll go to
  1012. 39:11that thread's feature. Specifically, we
  1013. 39:13were already working on the turret
  1014. 39:15class, so I'll select this thread
  1015. 39:17because this already has the context
  1016. 39:18that we were working on up above.
  1017. 39:21So, now let's add the ability for the
  1018. 39:23top turret to follow me.
  1019. 39:26So, it says right here,
  1020. 39:28make it so that the turret is always
  1021. 39:31looking at the player character,
  1022. 39:33specifically just the top turret. So,
  1023. 39:35move the turret_top around on its pivot
  1024. 39:39to look at the player character.
  1025. 39:41And then exit out.
  1026. 39:44So, now
  1027. 39:45it is done. I don't need these cuz that
  1028. 39:48was just an example. We have my turret
  1029. 39:50class over here.
  1030. 39:51I'll move it and that's how it's
  1031. 39:52actually on the ground.
  1032. 39:55And then press play.
  1033. 39:58There it is. It is now looking at my
  1034. 39:59player character.
  1035. 40:01On the topic of memories and how the
  1036. 40:03different threads interact with each
  1037. 40:05other, let's say for example, there is
  1038. 40:07some information
  1039. 40:09for some reason I want to give the
  1040. 40:10information of what the turret just did
  1041. 40:13to another thread. What I can do is
  1042. 40:15literally highlight it,
  1043. 40:17control C copy it, and then paste it
  1044. 40:19into another thread. Or, you can ask the
  1045. 40:21AI to write a handoff. So, when we move
  1046. 40:25context from one thread to another,
  1047. 40:27that's called a handoff. So, you can
  1048. 40:29create one by explicitly telling the AI,
  1049. 40:33"Create a handoff
  1050. 40:35of the task you just did, making the
  1051. 40:37turrets move around.
  1052. 40:39Give as much detail as possible within
  1053. 40:41that handoff, because I will give this
  1054. 40:43context to another thread."
  1055. 40:46It is done creating that handoff file.
  1056. 40:48If I select this, there's actually a
  1057. 40:50text editor, so we can read it within
  1058. 40:53Claude code. And this has just an insane
  1059. 40:55amount of detail. Look at all that
  1060. 40:57context.
  1061. 40:59And then I can highlight this, so the
  1062. 41:01name of the .md file,
  1063. 41:03create a
  1064. 41:04new thread,
  1065. 41:06and then say,
  1066. 41:07"Here is the proper context for the
  1067. 41:09turrets. I want to start working on
  1068. 41:10this." So, here it is.
  1069. 41:13And now this thread has the proper
  1070. 41:14context. Now, this was just an example.
  1071. 41:17Honestly, the turret class is so small,
  1072. 41:20and we've barely done any work, that it
  1073. 41:22would have made way more sense if I just
  1074. 41:25started working on the turret right off
  1075. 41:26the bat within this thread, and not even
  1076. 41:28give it a handoff. But, if I did have a
  1077. 41:30thread that's hundreds and hundreds of
  1078. 41:33turns long, and there's essential
  1079. 41:35information in that thread, then I would
  1080. 41:37ask for a handoff to hand it off. But,
  1081. 41:40in this case, it would make way more
  1082. 41:41sense if the AI just read the code,
  1083. 41:44because this is a very small class right
  1084. 41:46now. So, now let's make the turret class
  1085. 41:48actually shoot bullets at me. Because
  1086. 41:50right now, it is looking at me, but it's
  1087. 41:52not shooting at me. So, let's make it
  1088. 41:54shoot the same bullets that we have
  1089. 41:57coming from my gun. And specifically,
  1090. 41:59that is in FPS game,
  1091. 42:01first-person, blueprints, and it is
  1092. 42:04bullet projectile.
  1093. 42:06So, I will tell it to shoot the
  1094. 42:08blueprint class called bullet
  1095. 42:10projectile. Now, let's say if I didn't
  1096. 42:12know what the class was that was being
  1097. 42:14shot out of my gun, then I could go into
  1098. 42:17the gun blueprints
  1099. 42:20and then see what's being spawned
  1100. 42:22right here, or I could have asked the
  1101. 42:24AI.
  1102. 42:26I want the turret to now fire at the
  1103. 42:28player, specifically the blueprint class
  1104. 42:30called bullet projectile, every 0.5
  1105. 42:33seconds. So, when the turret is looking
  1106. 42:36at the player character, have it fire
  1107. 42:38the bullets. Also, use the same sound
  1108. 42:42from the player character's gun that
  1109. 42:44plays.
  1110. 42:46Exit out.
  1111. 42:48I like how it does tell you the
  1112. 42:49different tasks that the AI is going to
  1113. 42:51go through, but right now it says
  1114. 42:52compile and update handoff. We do not
  1115. 42:54need to update the handoff, so I'll say
  1116. 42:56In fact, I'll just
  1117. 42:58say delete handoff, we don't need it.
  1118. 43:03You can see that the AI is now telling
  1119. 43:05me that it will delete the handoff file
  1120. 43:07now. So, that's always a good feature.
  1121. 43:09If you do see the AI is going in the
  1122. 43:11wrong direction, then you can always
  1123. 43:12steer it with additional prompts to
  1124. 43:14change the way it's working.
  1125. 43:16Unfortunately for me,
  1126. 43:19this isn't working. Uh-oh. So, if it's
  1127. 43:21not working, that's because
  1128. 43:24Claude probably didn't test it.
  1129. 43:26So, I'll tell it right now,
  1130. 43:28it is not working. The turret isn't
  1131. 43:29firing. You have permission to open up
  1132. 43:31Unreal in headless mode, figure out
  1133. 43:33what's wrong.
  1134. 43:35Now it is fixed. Claude found a bug,
  1135. 43:37fixed it. It also found two bugs and
  1136. 43:39fixed it. So, a lot of bugs right there.
  1137. 43:42And now pressing play,
  1138. 43:44it is firing at the player. Ouch. Let me
  1139. 43:47go behind this tree, this log. Now it's
  1140. 43:49hitting the log. If I press shift and F1
  1141. 43:51at the same time, that brings back my
  1142. 43:53mouse. Now that I have my mouse on the
  1143. 43:56toolbar, I can select the eject button.
  1144. 43:59Now I can move my camera around, and you
  1145. 44:01can see right here is the player
  1146. 44:03character.
  1147. 44:04And that's the turret
  1148. 44:07is currently shooting at that character.
  1149. 44:11Now, what the AI generated was good, but
  1150. 44:14we always want control over what it
  1151. 44:16generated. Because let's say what if I
  1152. 44:18don't like the firing speed or something
  1153. 44:20else. We want to expose as many
  1154. 44:23properties of the generated object, in
  1155. 44:26our case the C++ class, as possible.
  1156. 44:29That's how we get back control and so
  1157. 44:31that if we do want a change to the C++
  1158. 44:34class, we don't have to prompt it. We're
  1159. 44:37able to just change it within its
  1160. 44:38details panel. And in older models, I
  1161. 44:41had to literally explicitly say, "Hey,
  1162. 44:44expose this variable. Make sure I can
  1163. 44:45edit it in the details panel." in order
  1164. 44:48for it to do it. But now with the latest
  1165. 44:49models, the AI are so smart that it's
  1166. 44:53automatically exposing these variables
  1167. 44:55for us. So, whenever it thinks that
  1168. 44:56there's a setting that it's creating
  1169. 44:59that the user, the level editor, wants
  1170. 45:01to edit, it will automatically expose it
  1171. 45:03for us by having it selected in the
  1172. 45:06details panel. I have to scroll all the
  1173. 45:07way down. This is annoying.
  1174. 45:09Scrolling down.
  1175. 45:11And it automatically created these
  1176. 45:12settings for us. So, we can change
  1177. 45:15what's being fired. Right now it's the
  1178. 45:17bullet projectile, which is what we
  1179. 45:19want, the firing sound, and the fire
  1180. 45:21interval. I can bring this down because
  1181. 45:24odds are we would want to change this
  1182. 45:26for gameplay reasons
  1183. 45:28to 0.1 seconds and now it's going to
  1184. 45:30rapid fire.
  1185. 45:33That's crazy.
  1186. 45:35Obviously, that is way too fast. So, now
  1187. 45:37I can change it back. And if it ever
  1188. 45:40exposes or creates a setting and you
  1189. 45:42don't know what that setting does, then
  1190. 45:44you can hover over the name of that
  1191. 45:47setting and there'll be a brief
  1192. 45:49description. Now, if it's not giving you
  1193. 45:51descriptions, then you should tell the
  1194. 45:54AI that whenever it creates a setting
  1195. 45:56for it to also give you a description
  1196. 45:58for it.
  1197. 45:59Now, if the AI did not expose these
  1198. 46:00properties because you might be using an
  1199. 46:03older model or a different model that's
  1200. 46:05not created by Open AI or Anthropic,
  1201. 46:08then you just want to explicitly say
  1202. 46:12expose the fire interval to the details
  1203. 46:14panel, that's how I can change it in the
  1204. 46:17level.
  1205. 46:18So, in case you do not get these
  1206. 46:20settings, ask the AI to just expose it.
  1207. 46:22Pretty simple.
  1208. 46:24Now,
  1209. 46:25I did not like for these settings
  1210. 46:27how I have to come all the way down here
  1211. 46:31to then see it. So, let's tell the AI
  1212. 46:34to move it up.
  1213. 46:35So,
  1214. 46:38for the generated settings within the
  1215. 46:39details panel, I want you to move that
  1216. 46:42entire group, so for every setting you
  1217. 46:44generate, up to the very top of the
  1218. 46:47details panel, so I have easy access to
  1219. 46:49them.
  1220. 46:51I go ahead and send that off. Close the
  1221. 46:53editor.
  1222. 46:54So, to get back control, expose, expose,
  1223. 46:57expose, expose as many variables and
  1224. 46:59settings as possible. So, you will see
  1225. 47:01that whenever I am prompting, I might
  1226. 47:04just explicitly tell it, "Hey, make sure
  1227. 47:05you expose it to the details panel."
  1228. 47:07Even though Claude might automatically
  1229. 47:09do it for me, I just want to make sure
  1230. 47:11that I do get those settings. And now in
  1231. 47:13the details panel, it's at the very top,
  1232. 47:15so it's easy access for me. I actually
  1233. 47:18want to put this
  1234. 47:20below the transform for no reason other
  1235. 47:22than I'm used to seeing the transform
  1236. 47:24options at the very top before anything
  1237. 47:26else. And I do think the positioning of
  1238. 47:29an object is more important than these
  1239. 47:31settings.
  1240. 47:32Another thing that I will do is that I
  1241. 47:34will explicitly tell Claude to save to
  1242. 47:37the Claude.md that whenever it exposes a
  1243. 47:40variable, it should be at the top of the
  1244. 47:42details panel below the transform.
  1245. 47:45Because we will create other classes, I
  1246. 47:47don't want to have to explicitly tell
  1247. 47:48Claude each time, "Hey, make sure these
  1248. 47:51settings are at the top." Instead, I can
  1249. 47:54set it as a rule in the Claude.md, so it
  1250. 47:57will always do that for me.
  1251. 47:59You can move the third settings
  1252. 48:01below the transform group. So, have it
  1253. 48:04be the second group. And I want you to
  1254. 48:06write a rule within the claw.md that
  1255. 48:09whenever you expose a setting in the
  1256. 48:12details panel, those settings should be
  1257. 48:14the second group below the transform.
  1258. 48:17And that goes for all new C++ classes.
  1259. 48:20So, whenever we're working on a C++
  1260. 48:22class and you expose a variable, make
  1261. 48:25sure that is in a group near the top,
  1262. 48:27second, right below the transform.
  1263. 48:30Now, these settings are below the
  1264. 48:32transform and we've set up a rule in the
  1265. 48:34claw.md. That's how future settings for
  1266. 48:37future classes will always be up here.
  1267. 48:39Don't have to scroll all the way down
  1268. 48:41because that would be pretty annoying.
  1269. 48:44Now that we are already setting rules
  1270. 48:45right now, we can add in another rule
  1271. 48:47specifically because we are going to
  1272. 48:50expose a lot of variables. Maybe there
  1273. 48:51might be a setting we don't understand.
  1274. 48:54So, we want the description to be more
  1275. 48:56detailed. So, I'll tell it that it could
  1276. 48:58create very detailed descriptions. Also,
  1277. 49:01I will make it that's how whenever it is
  1278. 49:04done and compiled, when the task is
  1279. 49:06finished, to automatically open up
  1280. 49:08Unreal. That's how I don't have to
  1281. 49:10manually open it up each time. Just as a
  1282. 49:12little time saver.
  1283. 49:15Also, add to the claw.md some other
  1284. 49:18rules, specifically that the details
  1285. 49:21that are generated by the exposed
  1286. 49:22settings can be
  1287. 49:24very detailed and explanatory. So, it
  1288. 49:28could be several sentences to a
  1289. 49:29paragraph long.
  1290. 49:31Also, when a task is complete and when
  1291. 49:34the engine has compiled, you can
  1292. 49:36automatically open up Unreal for me.
  1293. 49:41Now, I do not need to close down Unreal
  1294. 49:43because we're not making any changes to
  1295. 49:45the project. This is just changing the
  1296. 49:47claw.md.
  1297. 49:49Claw is smart enough to ask us whether
  1298. 49:50or not we want to rewrite these details
  1299. 49:54according to the new standards. No,
  1300. 49:57everything's pretty self-explanatory.
  1301. 49:58This is for future settings.
  1302. 50:00So, not now.
  1303. 50:02There is also
  1304. 50:04some specific situations where we do not
  1305. 50:07have to close the project if the AI does
  1306. 50:09make a C++ change, and that's when we're
  1307. 50:12not creating any new variables or we're
  1308. 50:15not creating a new components or a
  1309. 50:18function. For very technical terms, and
  1310. 50:20this is only for the programmers out
  1311. 50:22there, if we do not make a change to the
  1312. 50:24header file, so if the AI just changes
  1313. 50:27the C++, then we do not have to close
  1314. 50:30down Unreal Engine, and we can click on
  1315. 50:32the live compile button down there. But,
  1316. 50:34for the vast majority of the changes we
  1317. 50:36will make with AI to our C++ code, we do
  1318. 50:40have to close down Unreal and compile.
  1319. 50:42So, for example, if I wanted to change,
  1320. 50:46let's say,
  1321. 50:47the fire interval default, so instead of
  1322. 50:500.5 seconds to 1, then since I know this
  1323. 50:53will be a very simple number change, I
  1324. 50:56can ask the AI to change this default,
  1325. 50:59and then instead of having to close down
  1326. 51:01Unreal, once the AI is done with this
  1327. 51:04task, I can click on the live compile
  1328. 51:05button. But, for the vast majority use
  1329. 51:08cases, and just in case, I almost always
  1330. 51:12just exit out of Unreal
  1331. 51:14and do a full compile. That's how I know
  1332. 51:16nothing will go wrong.
  1333. 51:17Now, we're about to enter the fun part
  1334. 51:19of the tutorial where we just keep
  1335. 51:21prompting and prompting to build out our
  1336. 51:23game feature by feature. Because you
  1337. 51:26haven't really seen how AI can increase
  1338. 51:29our speed, our productivity yet. Because
  1339. 51:31throughout this tutorial, I've been
  1340. 51:33covering the basics of AI and how to
  1341. 51:35connect it to Unreal. Now, we're at the
  1342. 51:37point where we can just start prompting
  1343. 51:39a lot of features at once and watch our
  1344. 51:42game start to be built in front of our
  1345. 51:44eyes. So, this will be really fun, and I
  1346. 51:46do want to note that you may have
  1347. 51:48noticed that as I am prompting that
  1348. 51:51there is no engineering behind it.
  1349. 51:54Again, the best way you can treat the AI
  1350. 51:56is that it's like a coworker. You just
  1351. 51:58want to talk to it like it's an actual
  1352. 52:00software developer, and the best thing
  1353. 52:02you can give that software developer is
  1354. 52:05as much context, as much details as
  1355. 52:07possible. When you're talking to the AI,
  1356. 52:10you can make it very long, a basically a
  1357. 52:13stream of consciousness, and as long as
  1358. 52:15you give it as much information as
  1359. 52:17possible, you can get it aligned with
  1360. 52:19your vision. So the way I will prompt,
  1361. 52:21and what you're about to see, is that it
  1362. 52:23is literally a stream of consciousness.
  1363. 52:25I just keep on talking and talking, but
  1364. 52:27that is great because it gives as much
  1365. 52:29detail, as much context to the AI, so it
  1366. 52:33is as close as possible to what I
  1367. 52:36envision this feature will be.
  1368. 52:38So that's what we're about to do right
  1369. 52:39now, because
  1370. 52:42I don't like how this was just a test to
  1371. 52:45see how the turret locks onto the player
  1372. 52:47right away. Instead, I want to make it
  1373. 52:49where by default the turret is scanning,
  1374. 52:52going back and forth until it finds the
  1375. 52:54player, and then it locks on, and then
  1376. 52:56when the player leaves its radius or
  1377. 52:59goes behind something, then the turret
  1378. 53:02then locks off and continues scanning.
  1379. 53:06Also, when the turret locks on to add a
  1380. 53:08little bit of game feel, to let the
  1381. 53:10player know, "Uh-oh, I'm in trouble." We
  1382. 53:12also have under FPS game audio,
  1383. 53:15blueprint switch scanner 01Q.
  1384. 53:18Playing that
  1385. 53:19will be the lock on and lock off sound.
  1386. 53:23So let us start prompting.
  1387. 53:29I want to change the turret that's how
  1388. 53:31it doesn't lock onto the player
  1389. 53:32automatically. Instead, by default, the
  1390. 53:35turret is scanning. So the top of the
  1391. 53:37turret is rotating a certain degrees
  1392. 53:40back and forth, scanning until the
  1393. 53:43player enters its field of view
  1394. 53:46and then the turret then locks onto the
  1395. 53:48player.
  1396. 53:49When the player
  1397. 53:51goes out of range of the turret or goes
  1398. 53:53behind something then the turret then
  1399. 53:56locks off and the player is safe. The
  1400. 53:59turret goes back to scanning at that
  1401. 54:00point. When the turret locks on and
  1402. 54:03locks off, I want a sound to be played.
  1403. 54:07Specifically blueprint switch scanner
  1404. 54:0901_Q.
  1405. 54:12So make sure you play that sound
  1406. 54:14when the turret locks on and locks off.
  1407. 54:17Also make sure to expose the degree that
  1408. 54:21the turret is scanning, the angle.
  1409. 54:23Also the field of view angle.
  1410. 54:26How far the player has to be in order
  1411. 54:29for the turret to see the player because
  1412. 54:31of course if the player is across the
  1413. 54:33map, I do not want I do not want the
  1414. 54:35turret to see the player or to lock on.
  1415. 54:38And
  1416. 54:39also volume controls for the previous
  1417. 54:43sound so I can control how loud they
  1418. 54:44are.
  1419. 54:45So go ahead and start to work.
  1420. 54:48Just like that. And that is how I
  1421. 54:50prompt.
  1422. 54:52Stream of consciousness. Give it as much
  1423. 54:54details as possible. Let it know what
  1424. 54:55you want and it will start working. We
  1425. 54:58are back. If I select the turret, go to
  1426. 55:00details, it is exposing all the
  1427. 55:02properties that I want. I can change its
  1428. 55:04scanning angle, its field of view, and
  1429. 55:07its sound.
  1430. 55:08Pressing alt and S we'll see that it is
  1431. 55:10scanning going back and forth within
  1432. 55:13that angle.
  1433. 55:15And now pressing play.
  1434. 55:18I'll jump into its angle and then the
  1435. 55:20turret will start to shoot at me.
  1436. 55:22Now let's see what happens with the
  1437. 55:23player goes behind an object.
  1438. 55:25So I have
  1439. 55:27this cube right here. I'll go ahead and
  1440. 55:29raise this up.
  1441. 55:31The player will now go behind.
  1442. 55:33And then when the player then pops out
  1443. 55:36we can see that it then logs on, it logs
  1444. 55:38off.
  1445. 55:40But currently there is no smooth
  1446. 55:41animation.
  1447. 55:43When the turret locks onto the player, I
  1448. 55:45want a smooth animation cuz right now
  1449. 55:47it's just snapping to immediately look
  1450. 55:49at the player. That is not very
  1451. 55:50realistic.
  1452. 55:52So, let's add in a smooth animation and
  1453. 55:54dampening
  1454. 55:55to just tell the AI
  1455. 55:58add a dampening and smoothing effect.
  1456. 56:00Also give me properties to control the
  1457. 56:02dampening and smoothing. That's how the
  1458. 56:05turret doesn't just automatically lock
  1459. 56:08onto the player. Instead, there should
  1460. 56:10be some animation of the turret when
  1461. 56:12it's locking on, starting to look,
  1462. 56:15turning to look at the player.
  1463. 56:17This is pretty crazy, but even the AI
  1464. 56:20realized, "Hey, this looks wrong.
  1465. 56:22Something might be up." Because for its
  1466. 56:24previous output, it said two behaviors
  1467. 56:26to know about, the lock on snap, and
  1468. 56:28then it gave an explanation of what was
  1469. 56:30happening. So, even the AI was like,
  1470. 56:32"Maybe you should fix this."
  1471. 56:35So, now this is a lot better. If I press
  1472. 56:36play,
  1473. 56:38and then walk up to the turret,
  1474. 56:40we can see that it then locks on
  1475. 56:42smoothly.
  1476. 56:43And it also exposed all the necessary
  1477. 56:46properties here. It even added a lock on
  1478. 56:48delay, so notice how there was half a
  1479. 56:50second where the turret didn't move. I
  1480. 56:51do want to decrease that to 0.1 seconds,
  1481. 56:54but there's also an issue now and then
  1482. 56:56now you can see that when I'm moving
  1483. 56:58normally, it's fine, but then as soon as
  1484. 57:00I go behind the tree,
  1485. 57:03it locks on and it locks off again. So,
  1486. 57:04we need to fix that. Let's open up
  1487. 57:06Claude.
  1488. 57:07When the player goes behind an object,
  1489. 57:08there should be a little bit of a lock
  1490. 57:11off delay. That's how the player doesn't
  1491. 57:13go behind a small object and then
  1492. 57:15immediately enters the turret's field of
  1493. 57:17view again, activating the lock on and
  1494. 57:19lock off sound. So, there should be a
  1495. 57:21little bit of a little bit of a delay,
  1496. 57:23but
  1497. 57:24if the turret cannot see the player, the
  1498. 57:26turret should not fire. But the turret
  1499. 57:28can still be locked on for just a little
  1500. 57:30little more. Also, even if the player
  1501. 57:32leaves the turret's field of view when
  1502. 57:34the turret is locked on, the turret
  1503. 57:36should still be locked on. It isn't
  1504. 57:38until the turret leaves the distance
  1505. 57:41radius
  1506. 57:42or goes behind an object for a little
  1507. 57:44bit, should the turret then lock off.
  1508. 57:48So, now that issue is fixed. Pressing
  1509. 57:50play,
  1510. 57:51lock on to me,
  1511. 57:53and then it will fire.
  1512. 57:55If I go behind a small object, then it
  1513. 57:57will not just lock off.
  1514. 57:59And then if I go behind here, I have to
  1515. 58:00wait.
  1516. 58:01And then there's a little bit of a
  1517. 58:03delay. Checking right here, we can see
  1518. 58:05that the delay was
  1519. 58:071 seconds.
  1520. 58:09So, that's fine, but right now it is
  1521. 58:11kind of hard to visualize the field of
  1522. 58:14view, visualize how close the player has
  1523. 58:16to be to the turret in order for the
  1524. 58:17turret to lock on. So, that's why we can
  1525. 58:19now add in essentially debug lines or
  1526. 58:23visualizers just for ourselves as the
  1527. 58:25level editor to make it easier for us
  1528. 58:27when we are editing these properties.
  1529. 58:29Because right now we do not have a good
  1530. 58:30sense for the scan angle
  1531. 58:33and the field of view and the detection
  1532. 58:34range. So, we can expose these as debug
  1533. 58:38visualization lines and also give
  1534. 58:41ourselves 3D controls because it would
  1535. 58:43be easier to control these properties
  1536. 58:46with essentially a 3D widget in space
  1537. 58:48than having to go into the details and
  1538. 58:51then change it here.
  1539. 58:53Create visualization lines for me that
  1540. 58:55represents the scan angle and also the
  1541. 58:58field of view and detection range to
  1542. 59:00make it easier for me to edit those
  1543. 59:02properties. Also, at the same time, give
  1544. 59:04me 3D widgets in space that will control
  1545. 59:07those properties. Make the lock on delay
  1546. 59:09default 0.1 seconds.
  1547. 59:13Oh, also, make sure that these debug
  1548. 59:16visualizations, these lines will only
  1549. 59:18show when the turret is selected and
  1550. 59:22when we are not inside of game view
  1551. 59:23mode. This is just for the level editor
  1552. 59:25and it and I do not want every turret to
  1553. 59:27show these lines, only when a turret is
  1554. 59:29selected.
  1555. 59:32I added the last part right here because
  1556. 59:34obviously, if we have a lot of turrets,
  1557. 59:36and then if we're debugging them, then
  1558. 59:38all those lines will be everywhere, and
  1559. 59:39they will get in the way of our level
  1560. 59:41design.
  1561. 59:42You do not have to add in 3D controls.
  1562. 59:44This is just what I am doing personally
  1563. 59:46because I think it is a lot nicer, and
  1564. 59:48it is also a lot cooler controlling your
  1565. 59:51gameplay elements this way. So, now if I
  1566. 59:53select this,
  1567. 59:54and I'll have to go out of game view
  1568. 59:55mode, we now have visualizers. So, I can
  1569. 59:58visualize its scan angle and its field
  1570. 1:00:01of view.
  1571. 1:00:02Also, let me dock.
  1572. 1:00:04So, undock from sidebar the details
  1573. 1:00:05panel, so we can actually look at it.
  1574. 1:00:07And now if I grab one of my controls,
  1575. 1:00:10when I control it, we'll see that's also
  1576. 1:00:12controlling for the details. And I love
  1577. 1:00:14doing this. I love giving my controls in
  1578. 1:00:16the 3D world because after all, you're
  1579. 1:00:19making a 3D game, so why don't your
  1580. 1:00:21controls also be in the actual world?
  1581. 1:00:23So, we control all of these
  1582. 1:00:25easily, and also the detection range.
  1583. 1:00:28I'll bring that in,
  1584. 1:00:31too. So, everything we're able to
  1585. 1:00:34control now a lot easier. And coding
  1586. 1:00:37something like this probably wouldn't
  1587. 1:00:39make sense if you're just solo devving.
  1588. 1:00:41You would just have to push through, and
  1589. 1:00:43then expose everything in in the details
  1590. 1:00:45panel. But because the cost of adding in
  1591. 1:00:48more features, more tool sets for
  1592. 1:00:50yourself as a level designer is
  1593. 1:00:52significantly less now than having to
  1594. 1:00:54code it from scratch, it makes sense to
  1595. 1:00:57basically create your own tools, expose
  1596. 1:00:59as much as possible, create your own
  1597. 1:01:01workflows that previously just didn't
  1598. 1:01:03make sense beforehand. And I love this
  1599. 1:01:07new workflow. Now, really quickly for
  1600. 1:01:09all of my traditional developers who
  1601. 1:01:11like blueprints, I will show the
  1602. 1:01:12relationship between AI generated code
  1603. 1:01:15and blueprints. If you are just purely
  1604. 1:01:17vibe coding right now, in fact, if
  1605. 1:01:19you've never even opened up a blueprint,
  1606. 1:01:21then you can skip this part because I'm
  1607. 1:01:23only talking to the pre-existing
  1608. 1:01:25developers. Because right now we are in
  1609. 1:01:28a transition period where UE6 next year
  1610. 1:01:31will get rid of blueprints. Now, that
  1611. 1:01:32doesn't mean you can't use blueprints.
  1612. 1:01:35Of course, you can still use Unreal
  1613. 1:01:36Engine 5, but blueprints is going away.
  1614. 1:01:39In case you still want to use blueprints
  1615. 1:01:41and use it with your C++ generated code,
  1616. 1:01:43that is totally a viable option and
  1617. 1:01:46workflow for you in the meantime.
  1618. 1:01:48Specifically, we have always had a
  1619. 1:01:50debate, well, should I use blueprints or
  1620. 1:01:52should I use C++? And that's largely
  1621. 1:01:54come down to personal preference. For me
  1622. 1:01:56personally, I would always use
  1623. 1:01:58blueprints. I love blueprints. Although
  1624. 1:02:00you can do the majority of your game
  1625. 1:02:02coding to C++, but in the end, just
  1626. 1:02:04because it's easier for the engine to
  1627. 1:02:06manage and for you to make quick
  1628. 1:02:08changes, eventually your C++ class will
  1629. 1:02:11become a blueprint class.
  1630. 1:02:13Now, with AI, that has of course changed
  1631. 1:02:15because the AI is better at managing C++
  1632. 1:02:18code than blueprint nodes. But in case
  1633. 1:02:21you still want to use blueprints,
  1634. 1:02:23you can always, because this is just a
  1635. 1:02:25normal C++ class, create a blueprint
  1636. 1:02:28from this class,
  1637. 1:02:29and I'll just save it in FPS game.
  1638. 1:02:32I will delete this, so you do not have
  1639. 1:02:34to follow along right now. And then this
  1640. 1:02:36will create a blueprint like normal,
  1641. 1:02:38even though its parent class was
  1642. 1:02:39generated by C++. It is a normal
  1643. 1:02:42blueprint. We can do all of the previous
  1644. 1:02:45actions on it. For example, we can
  1645. 1:02:47manually hand program some nodes right
  1646. 1:02:49here or go into the class defaults,
  1647. 1:02:52and then change, let's say if I want
  1648. 1:02:55this variation, this child of the
  1649. 1:02:57turret,
  1650. 1:02:58to basically be a rapid fire turret,
  1651. 1:03:01then under fire interval,
  1652. 1:03:03I'll change this to 0.1 seconds.
  1653. 1:03:05And to indicate that this is a new class
  1654. 1:03:08from the original, located within my
  1655. 1:03:10turret,
  1656. 1:03:11I have a green color that I can use.
  1657. 1:03:13I'll drag out to here.
  1658. 1:03:15So, now my turret is green.
  1659. 1:03:17Also, don't forget to compile.
  1660. 1:03:20And now I will drag out
  1661. 1:03:24my new green turrets,
  1662. 1:03:27which is a blueprint. Press play,
  1663. 1:03:30and now it is rapid firing at me.
  1664. 1:03:33If I want to extend the logic of this
  1665. 1:03:35blueprint, remember it is just a C++
  1666. 1:03:38class. So just like in traditional C++
  1667. 1:03:41coding with no AI, we will just expose
  1668. 1:03:44properties and events to the blueprint
  1669. 1:03:46graph.
  1670. 1:03:47And to do so, just like everything in
  1671. 1:03:49this tutorial, literally ask the AI.
  1672. 1:03:52Now, I will reverse this. So this is
  1673. 1:03:54just a temporary edit to show how
  1674. 1:03:58I want a new event that will be called
  1675. 1:04:02whenever the player shoots and hits the
  1676. 1:04:04turrets. Call this turret death event.
  1677. 1:04:08Also, I want you to expose this event so
  1678. 1:04:10I can program it in blueprints. So
  1679. 1:04:13whenever the player shoots a bullet and
  1680. 1:04:16then that bullet hits the turrets, then
  1681. 1:04:18we will call this event that's exposed
  1682. 1:04:20to blueprints.
  1683. 1:04:24So now within my event graph, we have
  1684. 1:04:26exposed the turret event turret death
  1685. 1:04:29that will be called when the player
  1686. 1:04:31shoots a bullet at it. Now, I've already
  1687. 1:04:33gone ahead and created the blueprint
  1688. 1:04:35nodes that will handle this logic. So
  1689. 1:04:39when the player hits it, we will of
  1690. 1:04:41course start to simulate physics. Then
  1691. 1:04:43we'll add an impulse so that the top
  1692. 1:04:45static mesh pops out of the base and
  1693. 1:04:48then play a nice little explosion
  1694. 1:04:51Niagara effect and then we will play a
  1695. 1:04:54sound to go along with that explosion.
  1696. 1:04:56Pressing play, shoot,
  1697. 1:04:58boom, pops right out.
  1698. 1:05:01So now what this is essentially a hybrid
  1699. 1:05:03workflow. Even though the majority of
  1700. 1:05:05our turrets logic is being handled by AI
  1701. 1:05:07generated C++ code, we still get control
  1702. 1:05:10in case we really want to, to create
  1703. 1:05:12normal blueprints nodes.
  1704. 1:05:14Like how we used to. Now, we also could
  1705. 1:05:17have used the Unreal MCP to create these
  1706. 1:05:19nodes, but again, that wouldn't make
  1707. 1:05:21sense. That'd be pretty slow having to
  1708. 1:05:23go through the node graph. If we're
  1709. 1:05:25already using AI, we're pretty much
  1710. 1:05:26better off with just using the C++
  1711. 1:05:29generated code. Now, for my case, I am
  1712. 1:05:31not going to use blueprints. Instead,
  1713. 1:05:33I'll just ask the AI to remake this
  1714. 1:05:35functionality within the main turret C++
  1715. 1:05:39class. Because the entire gaming
  1716. 1:05:41industry is right now moving to AI
  1717. 1:05:43generated code. For UE6, the primary way
  1718. 1:05:47we program will be AI generated code.
  1719. 1:05:49But in the meantime, in case you do want
  1720. 1:05:51to slowly transition to this new future,
  1721. 1:05:54you can of course still use blueprint
  1722. 1:05:56programming in case you really want to.
  1723. 1:05:59Now,
  1724. 1:06:00let me go ahead and I'll delete that
  1725. 1:06:01because I don't need it. In fact, I will
  1726. 1:06:03delete my entire blueprint class because
  1727. 1:06:05I will create variations of this turret,
  1728. 1:06:07but those will all just still be C++.
  1729. 1:06:10Now, I might still create a blueprint
  1730. 1:06:13child class like the My Turret because
  1731. 1:06:17one thing I like to do when I'm creating
  1732. 1:06:18my levels is I like to select an object,
  1733. 1:06:20press Ctrl B, which is the shortcut to
  1734. 1:06:22jump to that location in the content
  1735. 1:06:24drawer. That's how I can quickly grab it
  1736. 1:06:27like this. Now, for C++ classes, if I
  1737. 1:06:30select this, I'm unable to press Ctrl B,
  1738. 1:06:32so I cannot jump to that C++ class. I
  1739. 1:06:35have to manually go to it, which is a
  1740. 1:06:37huge hassle. Also, what if I want to
  1741. 1:06:39change its defaults?
  1742. 1:06:41So, right now with the details, remember
  1743. 1:06:43I changed its
  1744. 1:06:45lock-on delay to 0.1 seconds. I would
  1745. 1:06:47have to either jump manually into the
  1746. 1:06:49C++ code to change its default or ask
  1747. 1:06:53the AI to change its default. If I did
  1748. 1:06:55make a child of the class, then editing
  1749. 1:06:59the defaults is as easy as going to
  1750. 1:07:01class defaults and then editing it here.
  1751. 1:07:03So, then that's another benefit I would
  1752. 1:07:05use for the blueprints. Essentially, the
  1753. 1:07:08blueprints child classes are just
  1754. 1:07:10wrappers now for the C++ class where the
  1755. 1:07:13majority of the programming is now
  1756. 1:07:16stored.
  1757. 1:07:17I do not touch the event graph
  1758. 1:07:19and maybe for the viewports, I would
  1759. 1:07:21make some edits visually if I do think
  1760. 1:07:24it makes more sense to edit visually
  1761. 1:07:25within the editor. But for all the
  1762. 1:07:28programming that is now done with C++.
  1763. 1:07:32So, that is the example.
  1764. 1:07:34Let me jump to this and delete it
  1765. 1:07:37because we will move all that logic now
  1766. 1:07:38to C++.
  1767. 1:07:40Now, for me personally, I still do think
  1768. 1:07:44we need a node graph to essentially
  1769. 1:07:46function as
  1770. 1:07:48a more advanced details panel because
  1771. 1:07:50when we're interacting with the details
  1772. 1:07:52panel, we can only change each variable
  1773. 1:07:55once. We're unable to control, let's
  1774. 1:07:58say, a workflow. So, what I would want
  1775. 1:08:00to see from UE6 is the ability,
  1776. 1:08:03essentially, a framework of a node graph
  1777. 1:08:05where when we are prompting, the prompts
  1778. 1:08:09will automatically expose different
  1779. 1:08:10variables to a node graph, which will
  1780. 1:08:12give us more manual control in the
  1781. 1:08:14engine that just manually editing a
  1782. 1:08:16variable here. Essentially, a
  1783. 1:08:18higher-level orchestration level where
  1784. 1:08:21the node framework is already built into
  1785. 1:08:23the engine for us. For example, what if
  1786. 1:08:25I'm creating a quest and then I want to
  1787. 1:08:28create a new quest. Well, instead of
  1788. 1:08:30having to each time create a new quest,
  1789. 1:08:32have it do that and prompt that quest by
  1790. 1:08:34default, the engine might automatically
  1791. 1:08:36expose a lot of the essential quest
  1792. 1:08:39events to this other graph orchestration
  1793. 1:08:42level where I can then edit it like a
  1794. 1:08:45details panel manually instead of having
  1795. 1:08:47to use the AI. And I know that might
  1796. 1:08:50have sounded like a mouthful and I might
  1797. 1:08:52have gone into the theoreticals of what
  1798. 1:08:55an engine should be. I'll probably make
  1799. 1:08:57another video on this. So, I still do
  1800. 1:09:00want a node graph, but the use cases
  1801. 1:09:02would not be the hard programming.
  1802. 1:09:04Instead, it would just be higher level
  1803. 1:09:06settings than just your normal details
  1804. 1:09:09panel.
  1805. 1:09:10When the turret dies, stop its rotation,
  1806. 1:09:12stop its shooting, it is now dead, and
  1807. 1:09:15add physics enabled for the top turret,
  1808. 1:09:18added an impulse that's how the top
  1809. 1:09:20turret will pop out the base,
  1810. 1:09:22and within the FPS game folder, there is
  1811. 1:09:24an explosion particle, play the
  1812. 1:09:27explosion particle, and play the
  1813. 1:09:29explosion sound. Still give me the
  1814. 1:09:31options to change the sound and the
  1815. 1:09:33particle effect, also the volume of the
  1816. 1:09:35sound within the details panel.
  1817. 1:09:38And also, expose the impulse cuz maybe I
  1818. 1:09:40want a lot of impulse or not that much.
  1819. 1:09:43So, that is the logic for the turret's
  1820. 1:09:44death.
  1821. 1:09:46Now, that death function is inside of
  1822. 1:09:48the C++ firing on it,
  1823. 1:09:51it will explode and get a little bit of
  1824. 1:09:53physics. So, now it's time to finish our
  1825. 1:09:55turret build. Specifically, we will
  1826. 1:09:57create two more turrets. And as a
  1827. 1:09:58reminder, these turrets will not be for
  1828. 1:10:00us, so we will eventually switch it
  1829. 1:10:02over. That's how the turrets are only
  1830. 1:10:04going after the enemies cuz these
  1831. 1:10:05turrets will be friendly. We are the
  1832. 1:10:07ones that are placing the turrets around
  1833. 1:10:09our world.
  1834. 1:10:10Specifically, I'll create two turrets.
  1835. 1:10:12So, one turret will be green and will be
  1836. 1:10:14a rapid fire turret. The other one will
  1837. 1:10:17be blue and then essentially shoot out a
  1838. 1:10:20grenade. We have a grenade located
  1839. 1:10:23within the FPS game folder, SM_Grenade.
  1840. 1:10:27This will shoot out a grenade
  1841. 1:10:29and then it will bounce a little, and
  1842. 1:10:32then have the same exact explosion,
  1843. 1:10:34and damage me or the enemies within the
  1844. 1:10:37specific radius around the explosion of
  1845. 1:10:40the grenade.
  1846. 1:10:42And
  1847. 1:10:43for especially for the rapid fire, we've
  1848. 1:10:45already remade a rapid fire turret
  1849. 1:10:47specifically within the blueprint, but
  1850. 1:10:49for our cases,
  1851. 1:10:51we are going to purely vibe code this
  1852. 1:10:53game just as a showcase of what is
  1853. 1:10:55possible. So, I will remake that.
  1854. 1:10:58This will be a pretty long prompt. In
  1855. 1:11:00fact, the longer the prompt, the better
  1856. 1:11:02because then you're giving it more
  1857. 1:11:03details and you're aligning the AI a lot
  1858. 1:11:06closer to your vision. So, the longer
  1859. 1:11:08the prompts,
  1860. 1:11:09the better. And I would say that
  1861. 1:11:12even for this turret, we could have
  1862. 1:11:13created everything we just did in one
  1863. 1:11:16long prompt. Instead, I did a
  1864. 1:11:17step-by-step to show what the workflow
  1865. 1:11:19is by implementing a gameplay element
  1866. 1:11:22feature by feature slowly. But, we could
  1867. 1:11:24have also done this all with just one
  1868. 1:11:26shot. And that's what we would do for
  1869. 1:11:28the two variations.
  1870. 1:11:31Create two variations of the turret. One
  1871. 1:11:34turret will be a rapid-fire turret and
  1872. 1:11:36the other turret will shoot out a
  1873. 1:11:37grenade. For the rapid-fire turret, give
  1874. 1:11:40it the green material color in FPS Game
  1875. 1:11:44and then set its fire interval to 0.1
  1876. 1:11:47seconds.
  1877. 1:11:48I also want a
  1878. 1:11:50new exposed properties for all my
  1879. 1:11:51turrets, specifically to control the
  1880. 1:11:54projectile speed because maybe I will
  1881. 1:11:56want to decrease the initial projectile
  1882. 1:11:58speed in the future.
  1883. 1:12:00And for the grenade turret,
  1884. 1:12:03I want that to use the blue color
  1885. 1:12:05located in FPS Game. And within FPS
  1886. 1:12:09Game, you'll see that there is a grenade
  1887. 1:12:10mesh.
  1888. 1:12:11I instead of the turret shooting out the
  1889. 1:12:14bullet projectile, that blue turret will
  1890. 1:12:16now shoot out the grenade mesh.
  1891. 1:12:19So, the grenade will be fired and it
  1892. 1:12:21will bounce twice. Although, give me
  1893. 1:12:23control over how many bounces it takes
  1894. 1:12:25for the grenade to explode. When it
  1895. 1:12:27explodes, use the same particle effect
  1896. 1:12:30and the sound that the death turret is
  1897. 1:12:34currently using.
  1898. 1:12:35Also, when a grenade explodes, there
  1899. 1:12:38will be a radius. Give me control over
  1900. 1:12:39the radius of effect where that turret
  1901. 1:12:42will then damage.
  1902. 1:12:44Now, I just realized that our player
  1903. 1:12:46doesn't have health. So, also add in a
  1904. 1:12:48health bar for my player. Give it 100
  1905. 1:12:51points of health and
  1906. 1:12:54the bullet projectile when it hits the
  1907. 1:12:56player will do
  1908. 1:12:57five damage to the player's health and
  1909. 1:13:01then their grenade will do 10 damage.
  1910. 1:13:03So, make sure I'm able to control the
  1911. 1:13:05radius of the grenade.
  1912. 1:13:09Okay, so that wasn't an insanely long
  1913. 1:13:11prompt. You could even see that I did
  1914. 1:13:13repeat myself at times, but that is
  1915. 1:13:15fine. The AI will parse it. Again, there
  1916. 1:13:17really is no prompt engineering. You
  1917. 1:13:20just want to make sure that you give as
  1918. 1:13:22much detail, as much information as
  1919. 1:13:23possible
  1920. 1:13:25to let the AI work.
  1921. 1:13:28Now, we have two new turret classes. So,
  1922. 1:13:31we have our grenade turret, our
  1923. 1:13:33rapid-fire turret, and a grenade
  1924. 1:13:35projectile, which will be the grenade
  1925. 1:13:37that is shot at the player. If I press
  1926. 1:13:39play, you'll see how on the bottom
  1927. 1:13:41left-hand corner, we also have a health
  1928. 1:13:43bar that will go down when I get shot.
  1929. 1:13:46So, let me activate the grenade
  1930. 1:13:48getting near this person.
  1931. 1:13:50Now, it is
  1932. 1:13:52going to fire a grenade at me and then
  1933. 1:13:55it is decreasing my health.
  1934. 1:13:57So,
  1935. 1:13:58we no longer need that
  1936. 1:14:00and let's check on the rapid-fire
  1937. 1:14:02shooting at me just a bunch.
  1938. 1:14:05Also going to fire at that. If you would
  1939. 1:14:06like to support the channel, then you
  1940. 1:14:08can check out the Unreal Master Class
  1941. 1:14:10and continue learning Unreal after this
  1942. 1:14:13video. The Unreal Master Class is an
  1943. 1:14:15expanding collection of exclusive
  1944. 1:14:17courses covering everything from
  1945. 1:14:19creating a complete game from scratch to
  1946. 1:14:21animating your own short film or in-game
  1947. 1:14:24cutscenes. Whether you are interested in
  1948. 1:14:26virtual reality, environment design,
  1949. 1:14:28architectural visualization, or
  1950. 1:14:30cinematic filmmaking, you'll learn how
  1951. 1:14:32to use the engine's most powerful
  1952. 1:14:34features and gain a deeper understanding
  1953. 1:14:37of what's possible with Unreal. It's the
  1954. 1:14:39largest and most comprehensive Unreal
  1955. 1:14:41Engine training program available,
  1956. 1:14:43designed to take you from the
  1957. 1:14:44fundamentals all the way to advanced
  1958. 1:14:47topics.
  1959. 1:14:48The masterclass will continue to grow
  1960. 1:14:49and evolve alongside Unreal. As new
  1961. 1:14:52versions like Unreal Engine 6 are
  1962. 1:14:53released, members will get access to new
  1963. 1:14:56and updated courses. There's a link to
  1964. 1:14:58check out the masterclass in the
  1965. 1:14:59description below.
  1966. 1:15:01If you want to take your AI skills to
  1967. 1:15:03the next level and create more complex
  1968. 1:15:05Unreal projects, then you're in luck
  1969. 1:15:08because I just launched the AI Centrals
  1970. 1:15:10for Unreal, which is a brand new course
  1971. 1:15:12that is inside of the Unreal
  1972. 1:15:13masterclass. The course goes beyond what
  1973. 1:15:16we covered in this tutorial, taking a
  1974. 1:15:18deeper dive into the fundamentals of AI
  1975. 1:15:20assisted programming, how to effectively
  1976. 1:15:22communicate with AI, and how to use it
  1977. 1:15:24to build more complex systems and even
  1978. 1:15:27entire games. And best of all, these
  1979. 1:15:29skills aren't limited to Unreal Engine.
  1980. 1:15:32The AI fundamentals you learn can be
  1981. 1:15:33applied to other game engines and
  1982. 1:15:35software development in general. To
  1983. 1:15:38learn more, check out the Unreal
  1984. 1:15:39masterclass. If you are a member of the
  1985. 1:15:41masterclass, then that turret example
  1986. 1:15:44might have been familiar to you because
  1987. 1:15:46in the masterclass, one of the courses
  1988. 1:15:48covers C++ coding and specifically to
  1989. 1:15:52teach how to code. As long as you do
  1990. 1:15:54know the essentials of programming
  1991. 1:15:55through blueprints, we created these
  1992. 1:15:57turrets. And these turrets function
  1993. 1:16:00exactly the same as the turrets that we
  1994. 1:16:03just made through AI. So, these are
  1995. 1:16:05turrets
  1996. 1:16:06that were programmed in C++. To then
  1997. 1:16:09create
  1998. 1:16:11a simple game
  1999. 1:16:12where the player has to navigate this
  2000. 1:16:14obstacle course, destroy the turrets,
  2001. 1:16:16and then get to the very end. And this
  2002. 1:16:18was all done about 1.5 years ago when
  2003. 1:16:22C++ coding AI generated code wasn't
  2004. 1:16:25really good. So, we went through and
  2005. 1:16:28then everything was hand coded. And now
  2006. 1:16:30we were able to recreate this
  2007. 1:16:32functionality just with a couple of
  2008. 1:16:34prompts. And we were doing small
  2009. 1:16:37prompts, creating the turrets feature by
  2010. 1:16:39feature to show how to AI code. But for
  2011. 1:16:43our cases we totally could have just
  2012. 1:16:44created all three of the turrets through
  2013. 1:16:47one massive prompt by one shotting it.
  2014. 1:16:50So, what we used to code by hand can now
  2015. 1:16:53be done just with one single prompt. And
  2016. 1:16:55that is insane how much has changed in
  2017. 1:16:58just 1.5 years from when this course
  2018. 1:17:00released.
  2019. 1:17:02So, now the question is should we still
  2020. 1:17:03learn how to program? And I would say,
  2021. 1:17:06yes, you should still learn how to
  2022. 1:17:07program because it gives you a
  2023. 1:17:09fundamental understanding of what the AI
  2024. 1:17:11is doing. It helps you think like a
  2025. 1:17:13developer and the higher level
  2026. 1:17:15decisions, such as architecture, how
  2027. 1:17:18your game works, how you the level
  2028. 1:17:20designer will interact with the code is
  2029. 1:17:22still up to you. So, by knowing how the
  2030. 1:17:25code works or by having a very broad
  2031. 1:17:27understanding of the fundamentals of
  2032. 1:17:29programming, it can help you prompt
  2033. 1:17:31better.
  2034. 1:17:32But when you are learning how to program
  2035. 1:17:34by hand, know that you're doing it for
  2036. 1:17:35yourself. You're doing it to build your
  2037. 1:17:37own confidence. If you actually want to
  2038. 1:17:39build something, for all practical
  2039. 1:17:42intentions, do not hand write code. Do
  2040. 1:17:44not create complicated blueprints.
  2041. 1:17:47Because AI, and only it wasn't like this
  2042. 1:17:50until recently, AI can code better and
  2043. 1:17:54faster than humans. If you actually want
  2044. 1:17:56to build, do something, AI generate it.
  2045. 1:18:00And the best game programmers in the
  2046. 1:18:02world, such as John Carmack and Notch,
  2047. 1:18:05now they are using AI coding. So, if
  2048. 1:18:08they know that the AI can help build
  2049. 1:18:11better and faster, then we should all be
  2050. 1:18:14using AI coding tool. And it's actually
  2051. 1:18:16equalizer because now we all have access
  2052. 1:18:19to the same tools, which means we can
  2053. 1:18:21all build similar things. We're no
  2054. 1:18:23longer limited to our knowledge. Now
  2055. 1:18:25literally the sky is a limit. I would
  2056. 1:18:27say that
  2057. 1:18:29when I was getting my computer science
  2058. 1:18:30degree, they had me learn assembly and
  2059. 1:18:33write a mini compiler. Now, throughout
  2060. 1:18:36my software engineering career, did they
  2061. 1:18:38actually think I would need to write
  2062. 1:18:40assembly or create a compiler? Probably
  2063. 1:18:42not. But, doing that helped give me the
  2064. 1:18:45fundamental understanding of the history
  2065. 1:18:48of software, what is happening behind
  2066. 1:18:50the hood, and it gave me more confidence
  2067. 1:18:52when I was writing the higher-level
  2068. 1:18:54languages such as C++, such as Python.
  2069. 1:18:57Now, everything has just moved where if
  2070. 1:19:00you learn C++ and how to program, then
  2071. 1:19:02you build more confidence for yourself
  2072. 1:19:05when you are AI generating. But, all
  2073. 1:19:07code moving forward is now going to be
  2074. 1:19:10AI generated. Before we move on to now
  2075. 1:19:12creating our enemies and actually
  2076. 1:19:14building out our entire game, let's talk
  2077. 1:19:16a little bit about AI generated art. So,
  2078. 1:19:20so far throughout this entire tutorial,
  2079. 1:19:22we have been using AI generated code,
  2080. 1:19:25not art. The reason why I make that
  2081. 1:19:28distinction is because as of October,
  2082. 1:19:30Steam makes that distinction. If you use
  2083. 1:19:33AI generated code, like everything we
  2084. 1:19:36just did, but all the art assets are
  2085. 1:19:38human-made, you do not need the Steam AI
  2086. 1:19:41disclosure because every game at this
  2087. 1:19:44point now uses AI generated code one way
  2088. 1:19:47or another. You cannot interact with a
  2089. 1:19:49piece of software, whether that be
  2090. 1:19:51YouTube, your OS, an engine, without
  2091. 1:19:53interacting with AI generated code. It
  2092. 1:19:56is now industry standard. It is
  2093. 1:19:58everywhere. What is it is AI generated
  2094. 1:20:01art as of now. So, Steam, you only have
  2095. 1:20:04to show that you're using AI if you are
  2096. 1:20:07using AI generated art, which includes
  2097. 1:20:10your materials, sounds, narrative, the
  2098. 1:20:133D models. These 3D models I made
  2099. 1:20:16myself. They were handmade. Also, there
  2100. 1:20:19are a bunch of a really great 3D models
  2101. 1:20:21on Fab currently that you can use in
  2102. 1:20:24your project. And just like what I
  2103. 1:20:26showed earlier, the way that you would
  2104. 1:20:28have the AI use the 3D models that
  2105. 1:20:30already exist within your project is to
  2106. 1:20:33just tell the AI, "Hey, when you're
  2107. 1:20:35building this class, I want you to use
  2108. 1:20:37turret_base or turret_top."
  2109. 1:20:41So, you can download any of these models
  2110. 1:20:43or asset packs for Fab and simply tell
  2111. 1:20:45the AI to use them. And there are
  2112. 1:20:48thousands upon thousands of free amazing
  2113. 1:20:51assets. You can come over to price and
  2114. 1:20:53make sure only free product is turned on
  2115. 1:20:56to look at them. The reason why I bring
  2116. 1:20:57this up is because this is a huge
  2117. 1:20:59benefit of using Unreal is that you
  2118. 1:21:01already have all of the products that
  2119. 1:21:04are currently on Fab, whether that be
  2120. 1:21:06paid for or free, that you can use. You
  2121. 1:21:08don't have to just generate them all
  2122. 1:21:10from scratch. Because AI can generate 3D
  2123. 1:21:13models, it does take, as of October, a
  2124. 1:21:16lot of time. Now, the AI model
  2125. 1:21:18generation is getting really good. So,
  2126. 1:21:21as a high-level summary of what is
  2127. 1:21:23happening, and I will have videos about
  2128. 1:21:25this a lot in the future, there are
  2129. 1:21:28currently two ways we can generate 3D
  2130. 1:21:30models. is through using a specialized
  2131. 1:21:33AI that only generates 3D models.
  2132. 1:21:36Because you can train an AI model to
  2133. 1:21:38only be good or just do one thing. For
  2134. 1:21:41example, with Midjourney, the only thing
  2135. 1:21:43it does is that it produces images.
  2136. 1:21:45There are specific models, and the only
  2137. 1:21:48thing they do and they've been trained
  2138. 1:21:49on is create 3D models. Specifically,
  2139. 1:21:52the biggest ones are Hunyan from China,
  2140. 1:21:55Tripo, and Meshy.
  2141. 1:21:58And when Epic Games showed off their new
  2142. 1:22:00AI node graph that is releasing next
  2143. 1:22:02year, they showed off a using Tripo to
  2144. 1:22:04generate a 3D model inside of Unreal
  2145. 1:22:07Engine. So, those are the three big
  2146. 1:22:09ones, although there are now tens and
  2147. 1:22:12dozens of 3D model generators. We will
  2148. 1:22:14talk about those in the future. And the
  2149. 1:22:16second way is through large language
  2150. 1:22:18models. And this wasn't possible until
  2151. 1:22:21recently, specifically July, because the
  2152. 1:22:24AI models, the LLMs, so your big AIs,
  2153. 1:22:27such as ChatGPT and Claude, which we
  2154. 1:22:29have been using throughout this entire
  2155. 1:22:31video, have gotten insanely good at 3D
  2156. 1:22:34model generation. Because in the end, 3D
  2157. 1:22:37model generation is just text. It's just
  2158. 1:22:40points in space and the relationships
  2159. 1:22:42between these points. So a large
  2160. 1:22:44language model like Opus 5.5 can create
  2161. 1:22:48scripts and can create the text to then
  2162. 1:22:50generate these 3D models. Or they can go
  2163. 1:22:53through a program like Blender, because
  2164. 1:22:55whenever we're taking an action within a
  2165. 1:22:57piece of software like Unreal Engine,
  2166. 1:22:59like Blender, all these actions can be
  2167. 1:23:02represented by text, too. So Blender has
  2168. 1:23:04their own MCP, and the modern AIs, such
  2169. 1:23:08as Astra and Opus and Fable, are
  2170. 1:23:10insanely good at using the Blender MCP
  2171. 1:23:14to create 3D models from scratch. So you
  2172. 1:23:17can watch it use Blender and create a
  2173. 1:23:19model from nothing. So that is the
  2174. 1:23:21second way 3D models are now created. So
  2175. 1:23:24this is a rapidly evolving field. It
  2176. 1:23:27wasn't until July did the LLM's become
  2177. 1:23:30capable at creating 3D models. And we
  2178. 1:23:33are near approaching the point where you
  2179. 1:23:35cannot tell if your 3D model was created
  2180. 1:23:37by a human or was created by the AI. So,
  2181. 1:23:42as of now though, we already have a
  2182. 1:23:44bunch of 3D models. We don't have to
  2183. 1:23:46generate them from scratch, so we can
  2184. 1:23:48use FAB. Another part of game design
  2185. 1:23:51that the AI struggles with right now is
  2186. 1:23:53with character animation, locomotion,
  2187. 1:23:56and game feel. And by locomotion, I mean
  2188. 1:23:59the animations of the character when you
  2189. 1:24:01control them in third person. So
  2190. 1:24:03specifically for this demo, the entire
  2191. 1:24:06game is pretty much all AI generation
  2192. 1:24:09through procedural algorithms the AI
  2193. 1:24:11created, except the character. This
  2194. 1:24:13locomotion, this animation system, feels
  2195. 1:24:16really good because it's from FAB. It
  2196. 1:24:18was already pre-created. So it has that
  2197. 1:24:20game feel built into it. And this is a
  2198. 1:24:23big issue with a lot of AI-generated
  2199. 1:24:25games now, specifically the third-person
  2200. 1:24:27ones, and that is you look at the game
  2201. 1:24:30and it's mechanically sound. The code is
  2202. 1:24:32there, but the actual character
  2203. 1:24:34animations are terrible.
  2204. 1:24:36So, that is one of the benefits of using
  2205. 1:24:38Unreal Engine. If you generate a game
  2206. 1:24:40for the web through Claude or ChatGPT,
  2207. 1:24:43essentially what you're doing is that
  2208. 1:24:45you're you are rewriting the engine,
  2209. 1:24:47creating brand new tools each time you
  2210. 1:24:49generate a new game. And that doesn't
  2211. 1:24:51really make sense if we already have a
  2212. 1:24:53good foundation within the engine and
  2213. 1:24:55pre-existing assets on Fab. Specifically
  2214. 1:24:58for the planet generation demo, I am
  2215. 1:25:01using the Advanced Locomotion System V4
  2216. 1:25:04by Caleb Longbuyer. Now, this is a
  2217. 1:25:06really famous asset. It was so famous
  2218. 1:25:09that Epic Games went ahead and then
  2219. 1:25:10hired this person to then work on
  2220. 1:25:13essentially the spiritual successor,
  2221. 1:25:15which is the game animation sample that
  2222. 1:25:18we have all used in the community. And
  2223. 1:25:21this is an amazing pack. It comes with
  2224. 1:25:23hundreds of different animations. And if
  2225. 1:25:25we were to have the AI generate all of
  2226. 1:25:28these, now it could, and it is getting
  2227. 1:25:30better. Epic Games themselves are
  2228. 1:25:32experimenting with AI-generated
  2229. 1:25:34animations. So, you could use a
  2230. 1:25:37dedicated AI just for character
  2231. 1:25:39animation and then through hundreds and
  2232. 1:25:42hundreds of prompts get to a locomotion
  2233. 1:25:44system that feels good. But why would we
  2234. 1:25:47go through that hassle? And most people
  2235. 1:25:49don't when they're generating a game
  2236. 1:25:51when you already have a great sample
  2237. 1:25:53content here for you ready to be used.
  2238. 1:25:56So, that's what I suggest you do,
  2239. 1:25:58especially if you're doing a
  2240. 1:25:59third-person game, is don't generate
  2241. 1:26:02everything. Go on Fab, use the existing
  2242. 1:26:05assets, use the tools inside of Unreal
  2243. 1:26:07Engine, and you will get a lot out of
  2244. 1:26:09your game. For the rest of the tutorial,
  2245. 1:26:11I will just be prompting, testing,
  2246. 1:26:14prompting, iterating on the game,
  2247. 1:26:16testing new features. Maybe I don't like
  2248. 1:26:18a feature, then I get rid of it, and
  2249. 1:26:20just experimenting and seeing how this
  2250. 1:26:22game pans out. Because the true power
  2251. 1:26:26with AI is iteration. Because games are
  2252. 1:26:29just made up of features. And sometimes
  2253. 1:26:31when you're creating a game, you think
  2254. 1:26:33that a feature might be good, so you
  2255. 1:26:35spend 2 weeks coding that feature, it's
  2256. 1:26:38in your game, and then you realize,
  2257. 1:26:39uh-oh, this doesn't make sense. It
  2258. 1:26:42doesn't feel good in the game, it
  2259. 1:26:43doesn't fit in it. So then you have to
  2260. 1:26:45scrap that feature, and there goes 2
  2261. 1:26:47weeks. Now, and this is the true power
  2262. 1:26:50with AI is that your feedback loop for
  2263. 1:26:53creating your game is now what was 2
  2264. 1:26:56weeks is now just 1 hour. So, I can test
  2265. 1:26:59a feature by just a single prompt. And
  2266. 1:27:02then if I don't like that feature, roll
  2267. 1:27:04back, get rid of it, and continue with a
  2268. 1:27:07new feature. So, by continually
  2269. 1:27:09iterating over and over again, you can
  2270. 1:27:11create an even better game than you
  2271. 1:27:13would have than coding everything
  2272. 1:27:15manually because of the time save. And
  2273. 1:27:18you can hand the AI as much creative
  2274. 1:27:21control as you want. In my case, I like
  2275. 1:27:24to get back creative control, so my
  2276. 1:27:27features, each time I prompt, will be
  2277. 1:27:29pretty small. That's why I can test that
  2278. 1:27:31feature before moving on, but you could
  2279. 1:27:34and I mentioned this with the turrets,
  2280. 1:27:36that with all the turrets right now, we
  2281. 1:27:38did a prompt by prompt, I could have
  2282. 1:27:40just told it to create the turret, gave
  2283. 1:27:43it all the different instructions, say
  2284. 1:27:44to create three different turrets, and
  2285. 1:27:46the AI also would have done it. And that
  2286. 1:27:48is sort of what we are about to do with
  2287. 1:27:50the enemy because now let's make the
  2288. 1:27:52blob enemy. So, we'll make an enemy, and
  2289. 1:27:56then I will switch the turrets over, so
  2290. 1:27:58they're no longer firing at me, and
  2291. 1:28:00they're now firing at the blob.
  2292. 1:28:03Specifically, I want a blob enemy that
  2293. 1:28:05is similar to the enemy that was
  2294. 1:28:07generated for the Unreal Engine 5
  2295. 1:28:09beginner tutorial 2026. Close out of my
  2296. 1:28:12prompt.
  2297. 1:28:12>> So, this blob was already generated. I
  2298. 1:28:14have it on my computer. I could migrate
  2299. 1:28:16this enemy asset over to my new project,
  2300. 1:28:21but then that would kind of defeat the
  2301. 1:28:23purpose of this tutorial, and that is I
  2302. 1:28:25want to show you the entire process of
  2303. 1:28:28generating everything. So, instead I
  2304. 1:28:30will regenerate this blob.
  2305. 1:28:32But, I will take the specific prompt
  2306. 1:28:35that I used right here.
  2307. 1:28:36And instead of typing out this prompt,
  2308. 1:28:39I will steal it. So, I'm stealing my
  2309. 1:28:41prompt.
  2310. 1:28:42Going back into Claude, because this is
  2311. 1:28:45a brand new feature, we really don't
  2312. 1:28:47need the context of me creating the
  2313. 1:28:49turrets. I'll create a new chat, making
  2314. 1:28:52sure it's in my current project.
  2315. 1:28:54The plus,
  2316. 1:28:55and then I will add that image in there.
  2317. 1:28:58And I do want it to be as close to my
  2318. 1:29:00original blob that I generated as
  2319. 1:29:02possible.
  2320. 1:29:03So,
  2321. 1:29:04I'll take a photo of my blob. This looks
  2322. 1:29:07like a good one, so I will also
  2323. 1:29:09screenshot this guy.
  2324. 1:29:12And then add it right here.
  2325. 1:29:14If there's ever something you find on
  2326. 1:29:16the internet and you like it, you want
  2327. 1:29:18to use it as inspiration for the AI,
  2328. 1:29:21literally just take a screenshot, upload
  2329. 1:29:23it, and now I'll say,
  2330. 1:29:26"Run this prompt from the first photo
  2331. 1:29:28and make it look like the blob from the
  2332. 1:29:30second photo." And then send it off.
  2333. 1:29:33Because this is a pretty big task,
  2334. 1:29:36I will set it to high for the effort
  2335. 1:29:39level.
  2336. 1:29:40Currently, the AI is a little bit
  2337. 1:29:41confused because in this prompt, I'm
  2338. 1:29:42referencing a death function and an
  2339. 1:29:44obstacle course that we were creating in
  2340. 1:29:46the previous video. So, I'll go ahead
  2341. 1:29:48and tell it, "Ignore the obstacle course
  2342. 1:29:50and the death function. Just focus on
  2343. 1:29:52creating the enemy blob, and make sure
  2344. 1:29:54the enemy blob is going towards the
  2345. 1:29:55player. You can ignore those other
  2346. 1:29:57phrases."
  2347. 1:29:59If we analyze the prompt, and you can
  2348. 1:30:00watch me generate the original blob
  2349. 1:30:03within the UE6 beginner tutorial, but as
  2350. 1:30:05you'll see multiple times, I talk about
  2351. 1:30:08a squishy sphere, I talk about squash
  2352. 1:30:10and stretch, and making it feel alive.
  2353. 1:30:13That is me telling the AI to add in cool
  2354. 1:30:16animations to make it feel lively, like
  2355. 1:30:19it's an actual character. Also notice
  2356. 1:30:21how I say this is a long-running task.
  2357. 1:30:24That's also to tell the AI, "Hey, you
  2358. 1:30:26can take your time. Make sure this looks
  2359. 1:30:29really cool."
  2360. 1:30:31Do keep in mind that teaching AI game
  2361. 1:30:33development, this entire process, and AI
  2362. 1:30:36in general is non-deterministic. That
  2363. 1:30:38means it is random. You can give the
  2364. 1:30:40same exact prompt as me, and the results
  2365. 1:30:43can be completely different. This is an
  2366. 1:30:45interesting switch for me because in the
  2367. 1:30:47past, if I'm teaching blueprints, if I'm
  2368. 1:30:49teaching C++, you, the audience, you
  2369. 1:30:52could just follow along, and then you'll
  2370. 1:30:54get exactly what you see on my screen.
  2371. 1:30:57Now, that is no longer the case because
  2372. 1:30:59AI is so random. Because of that, even
  2373. 1:31:02though you're watching me right now
  2374. 1:31:03create prompts, go back and forth,
  2375. 1:31:05you're just watching the workflow and
  2376. 1:31:07you see how I'm going about creating
  2377. 1:31:08this game. This is, after all, your
  2378. 1:31:10game. You should be prompting stuff
  2379. 1:31:12completely different because even if you
  2380. 1:31:14do try to get a game pretty similar to
  2381. 1:31:17mine, you're going to you're going to
  2382. 1:31:18end up with something entirely
  2383. 1:31:20different.
  2384. 1:31:21And now, this is the blob. Pressing
  2385. 1:31:24play.
  2386. 1:31:26This is what I was expecting. This looks
  2387. 1:31:28good. You can see when he bounces
  2388. 1:31:29around, there's a lot of squash and
  2389. 1:31:30stretch.
  2390. 1:31:31He's just trying to jump at the
  2391. 1:31:32character. So, number one, I want to
  2392. 1:31:34make it where when I shoot at the blob,
  2393. 1:31:37maybe it makes like a little noise, and
  2394. 1:31:39there's some impact. The blob might
  2395. 1:31:41flash red a little bit to tell us that
  2396. 1:31:43we are making impact at the blob. And
  2397. 1:31:46number two, his eyes are way too small.
  2398. 1:31:48I did not like that.
  2399. 1:31:50So, let's bring back Claude.
  2400. 1:31:53Make the blob's eyes bigger and more
  2401. 1:31:56elongated like an oval. Also make sure
  2402. 1:31:58that the blob can also blink. And
  2403. 1:32:01currently, when the blob is jumping up
  2404. 1:32:04and down, its eyes go into its body. So,
  2405. 1:32:07its eyes clip into its bodies, its eyes
  2406. 1:32:09disappear. I do not want that to happen.
  2407. 1:32:11The eyes should always be out front, not
  2408. 1:32:14clipping into the blob's body. Now, I
  2409. 1:32:17want to give the blob health, and its
  2410. 1:32:19health will go down when the player
  2411. 1:32:21shoots at it. So, when a bullet hits the
  2412. 1:32:23blob, then the blob will be injured. Add
  2413. 1:32:25a little bit of pushback. So, the blob
  2414. 1:32:28will go back when it's shot. And have
  2415. 1:32:32the blob let out a little bit of a
  2416. 1:32:34screech when it's shot, and also flash
  2417. 1:32:38red
  2418. 1:32:39to indicate that the player is shooting
  2419. 1:32:41the blob.
  2420. 1:32:43And then eventually, let's give it a
  2421. 1:32:45health of
  2422. 1:32:4710, and the bullets will do damage of
  2423. 1:32:50five. So, two hits by the player, the
  2424. 1:32:52blob is dead.
  2425. 1:32:55And we are back. We have a brand new
  2426. 1:32:57blob. Pressing play, let's see what it
  2427. 1:32:59looks like when I shoot at it.
  2428. 1:33:02That is exactly what we want to see.
  2429. 1:33:03Notice how there's a little bit of a
  2430. 1:33:05kickback. Also, it flashes red. This
  2431. 1:33:07makes it really satisfying to hit a
  2432. 1:33:10blob. Also, within the details,
  2433. 1:33:13our first group is the transform group,
  2434. 1:33:15and then below that is the blob group
  2435. 1:33:17that contains all of the exposed
  2436. 1:33:18properties that we need. And it is a
  2437. 1:33:20second group because remember, we set
  2438. 1:33:23that up as a rule for the claw.md.
  2439. 1:33:26Now, at this point, we have crossed the
  2440. 1:33:29Rubicon in that this is AI-generated
  2441. 1:33:32art. Everything we did beforehand was
  2442. 1:33:34AI-generated code according to Steam.
  2443. 1:33:36Now, this is art because we AI-generated
  2444. 1:33:40the sound. We can see down here. I'm
  2445. 1:33:42able to flip the sound.
  2446. 1:33:44So, we have all these nice sounds.
  2447. 1:33:47And also the animations of the blob
  2448. 1:33:49moving by itself is also AI-generated.
  2449. 1:33:52And that is art because it is
  2450. 1:33:54player-facing.
  2451. 1:33:56Now, what I could have done is also use
  2452. 1:33:58an asset from Fab. Specifically, I could
  2453. 1:34:01have gone here, typed in skeleton, and
  2454. 1:34:03find some skeleton enemies. Maybe
  2455. 1:34:07these pirate skeletons are invading the
  2456. 1:34:09castle. Download this, and then use that
  2457. 1:34:13by telling the AI to use the skeleton as
  2458. 1:34:15the main enemy. In my case, I just want
  2459. 1:34:17to make a blob because I think I don't
  2460. 1:34:19know. The blobs just look really cute.
  2461. 1:34:21Also, strategically, I'm picking a blob
  2462. 1:34:24enemy because I know that within the
  2463. 1:34:27engine, a sphere is already
  2464. 1:34:29pre-existing. This is the most common
  2465. 1:34:32type of object in 3D.
  2466. 1:34:34So, if I did say to generate, for
  2467. 1:34:37example, a skeleton, then the AI would
  2468. 1:34:39have taken a very long time, and the
  2469. 1:34:41odds of that 3D model looking nice would
  2470. 1:34:44probably have been low. So, I picked a
  2471. 1:34:47sphere because spheres already exist. It
  2472. 1:34:49would be easy for the AI to generate it.
  2473. 1:34:52Now, it's time for the great switch-up,
  2474. 1:34:55and that is for my turrets. The turrets
  2475. 1:34:57are currently evil. Now, my turrets will
  2476. 1:35:00be my friends.
  2477. 1:35:01So, I will tell the AI to now target.
  2478. 1:35:05That's how the turrets will attack and
  2479. 1:35:07try to destroy the little blob guys.
  2480. 1:35:10The turrets are my friends. They will no
  2481. 1:35:12longer attack me.
  2482. 1:35:14So, let's tell Claude.
  2483. 1:35:16Make all the turrets now friendly. They
  2484. 1:35:18behave exactly the same as they did
  2485. 1:35:20beforehand, but now instead of targeting
  2486. 1:35:22the player, they will only target and
  2487. 1:35:24attack the blob enemies.
  2488. 1:35:29All right, the moment of truth. I'm
  2489. 1:35:31going to move my turret over here.
  2490. 1:35:34Then assimilate.
  2491. 1:35:38All right, what if there's multiple
  2492. 1:35:39blobs?
  2493. 1:35:49Brutal execution.
  2494. 1:35:52So, this is now working and if I'm the
  2495. 1:35:54player character
  2496. 1:35:57going into, we'll see that the turret is
  2497. 1:35:59not targeting me.
  2498. 1:36:01It is just targeting these blobs.
  2499. 1:36:06I do want to edit its death, maybe make
  2500. 1:36:09it where the blob then disintegrates.
  2501. 1:36:12Also, give me the option. Let's see if I
  2502. 1:36:14already do have the option to increase
  2503. 1:36:15its health.
  2504. 1:36:19Okay, I do. So, I can increase the
  2505. 1:36:21health here.
  2506. 1:36:24I like the way that the blob currently
  2507. 1:36:26works
  2508. 1:36:27for its death, but I want to add in a
  2509. 1:36:28new death that is an emissive
  2510. 1:36:31disintegration.
  2511. 1:36:32So, instead of the blob flattening,
  2512. 1:36:36then the blob will still be a red
  2513. 1:36:38emissive, but then the entire blob will
  2514. 1:36:41then slowly
  2515. 1:36:43not slowly, but transition randomly into
  2516. 1:36:46a particle effect where the particles
  2517. 1:36:48are glowing red at first, but then they
  2518. 1:36:50turn into dust. So, the entire blob mesh
  2519. 1:36:53will become a Niagara particle with a
  2520. 1:36:56lot of particles to indicate essentially
  2521. 1:36:58the blob becoming embers and dust. I do
  2522. 1:37:02want to save the original death feature
  2523. 1:37:04in case I want to roll back to it. So,
  2524. 1:37:06make this a toggle, but enable it by
  2525. 1:37:09default for the death disintegration.
  2526. 1:37:13This is what I often like to do is that
  2527. 1:37:15when I'm adding in a new feature and I'm
  2528. 1:37:17not sure if I like that feature, maybe I
  2529. 1:37:18want to AB test, see what it feels like
  2530. 1:37:21with the feature turned on or off, then
  2531. 1:37:23I will explicitly tell the AI, "Hey,
  2532. 1:37:26keep the way that this originally works
  2533. 1:37:29because I want to test both of them."
  2534. 1:37:30And then if I do like the new feature, I
  2535. 1:37:32can always tell the AI to get rid of the
  2536. 1:37:34old one or just keep the old feature
  2537. 1:37:36because it's not enabled.
  2538. 1:37:38It is now done and something that was
  2539. 1:37:40pretty cool was that I did forget to
  2540. 1:37:42close Unreal and whenever you do, don't
  2541. 1:37:44worry, the AI will then remind you,
  2542. 1:37:46"Hey, you forgot to close Unreal. Let me
  2543. 1:37:48know when you close it." So, I closed
  2544. 1:37:50it. I told it that I closed it, and then
  2545. 1:37:52it continued working. Within Unreal
  2546. 1:37:55headless mode, it even took photos
  2547. 1:37:58of the particle effect to make sure
  2548. 1:37:59everything was working. So, now let's
  2549. 1:38:02take a look at it.
  2550. 1:38:04Okay, I do like
  2551. 1:38:06I do like the look of that. Now, the
  2552. 1:38:09turret stopped firing because it went
  2553. 1:38:12out of its range. So, remember, I can
  2554. 1:38:14just grab the detection range and then
  2555. 1:38:16increase the size.
  2556. 1:38:18So, that will ensure
  2557. 1:38:20that those blobs never escape
  2558. 1:38:22the range of the turret. So, now it is
  2559. 1:38:24time to work on actually the majority of
  2560. 1:38:27our game, and that is the wave system.
  2561. 1:38:29So, I want it where the blobs will spawn
  2562. 1:38:31somewhere. They'll go towards the
  2563. 1:38:33direction of which will eventually be
  2564. 1:38:36the castle, but for now, just as
  2565. 1:38:39an example, let's create just a mini
  2566. 1:38:41castle. So, just grab this thing
  2567. 1:38:45and bring it all the way over here.
  2568. 1:38:48So, the blobs will attack
  2569. 1:38:51this mini castle.
  2570. 1:38:53So, I need to define the area that the
  2571. 1:38:55blobs will spawn in, the area that the
  2572. 1:38:57blobs will then go towards, and attack.
  2573. 1:39:00And then we can test the wave system
  2574. 1:39:03from there.
  2575. 1:39:04Now, specifically, when we are working
  2576. 1:39:06in 3D and we need to define an area for
  2577. 1:39:09gameplay, that is called a volume. If I
  2578. 1:39:11come up to the plus, go down to volumes,
  2579. 1:39:14you'll see that we have a bunch of
  2580. 1:39:15different options. For example, a
  2581. 1:39:18location volume, and I'll press G key to
  2582. 1:39:21make sure I do see it. And a volume is
  2583. 1:39:23just a box in space. And what we are
  2584. 1:39:26going to do is that I want to tell the
  2585. 1:39:27Unreal to create a volume, which will be
  2586. 1:39:29the spawn location for the blobs, and
  2587. 1:39:32then a volume which will represent where
  2588. 1:39:34the blobs are going to attack. And right
  2589. 1:39:36now, the blobs will just walk in a
  2590. 1:39:38straight line going from their spawn to
  2591. 1:39:40the attack location, but we will path
  2592. 1:39:43that later with a spline.
  2593. 1:39:45So, I'll create a new feature.
  2594. 1:39:49Let's create the core logic for a
  2595. 1:39:50wave-based tower defender. Specifically,
  2596. 1:39:53the player with the turrets will be
  2597. 1:39:55defending the tower against a wave of
  2598. 1:39:57enemy blobs. So, have two volumes. One
  2599. 1:40:00volume is the blob spawner, where the
  2600. 1:40:02blobs will spawn, and the other volume
  2601. 1:40:03is the attack volume, where the blobs,
  2602. 1:40:05after they spawn, will immediately start
  2603. 1:40:07to rush towards the attack volume. As
  2604. 1:40:10soon as a blob enters the attack volume,
  2605. 1:40:12they will blow up using the same
  2606. 1:40:14explosion mechanics from the turrets,
  2607. 1:40:17and then the tower will lose health. Of
  2608. 1:40:19course, when the tower's health is at
  2609. 1:40:22zero, then the player will lose. So, the
  2610. 1:40:24entire point of the game is for the
  2611. 1:40:26player to defend the tower, and as the
  2612. 1:40:28player or turret defeats a blob, then
  2613. 1:40:32the player will earn some cash. And with
  2614. 1:40:34that cash, the player can then press the
  2615. 1:40:36R key to open up a menu where they can
  2616. 1:40:39then buy the other turrets.
  2617. 1:40:41Specifically, we just have three turrets
  2618. 1:40:42right now. The least expensive turret,
  2619. 1:40:45the basic one, is the orange turret. And
  2620. 1:40:47then the rapid-fire turret is the tier
  2621. 1:40:49above that, and the most powerful turret
  2622. 1:40:52is the grenade turret.
  2623. 1:40:53After each wave, the player has 10
  2624. 1:40:57seconds to set up more turrets to defend
  2625. 1:41:00the tower. With each new wave, then the
  2626. 1:41:02blobs will
  2627. 1:41:04be increased, so there'll be more blobs,
  2628. 1:41:06and then also the blobs' health will
  2629. 1:41:08also increase. I do get the size of the
  2630. 1:41:10blobs, that's how they look more
  2631. 1:41:12interesting.
  2632. 1:41:14Now, for the settings for this tower
  2633. 1:41:16defense game, I want you to expose all
  2634. 1:41:19the necessary settings, as much as you
  2635. 1:41:21can think of,
  2636. 1:41:22to an actor called wave settings. So,
  2637. 1:41:25this actor, I can drag it to my world, I
  2638. 1:41:27can just select it, and then the details
  2639. 1:41:29will contain all the necessary settings
  2640. 1:41:31where I get full control over this game.
  2641. 1:41:34So, go ahead and create the core game
  2642. 1:41:35logic, specifically the spawn volume,
  2643. 1:41:38the attack volume, and the wave settings
  2644. 1:41:41actor.
  2645. 1:41:44So, you can see that this was
  2646. 1:41:46an insanely long prompt. You just
  2647. 1:41:48watched me for 1 minute say all of this,
  2648. 1:41:51but that's because this is the majority
  2649. 1:41:53of our game.
  2650. 1:41:55So, I'll go ahead and exit out.
  2651. 1:41:57Notice how I did mention that I wanted
  2652. 1:41:59object that contains all the necessary
  2653. 1:42:01settings for my game. Often times, if
  2654. 1:42:03there is a game mechanic that spans
  2655. 1:42:05multiple different game elements as a
  2656. 1:42:07way to control all of them easily, I
  2657. 1:42:10will ask the AI to basically create a
  2658. 1:42:12settings actor, which in our case is
  2659. 1:42:15just an object I could drag into the
  2660. 1:42:16world that I can select and from there
  2661. 1:42:19just control all those different
  2662. 1:42:20settings easily for me.
  2663. 1:42:23And we are now back.
  2664. 1:42:25So, we have a lot of new classes,
  2665. 1:42:28specifically the blob spawn volume. It
  2666. 1:42:30even has text right there to remind me
  2667. 1:42:32that this is the blob spawn. I'll go
  2668. 1:42:34ahead and move this over here. Again,
  2669. 1:42:36this is all just a test right now. This
  2670. 1:42:37is, of course, not the final tower
  2671. 1:42:39defense. And then the tower attack
  2672. 1:42:42volume.
  2673. 1:42:43I'll move that over here. So, when the
  2674. 1:42:44blobs are trying to get to this location
  2675. 1:42:47to attack,
  2676. 1:42:48and the wave settings,
  2677. 1:42:51which even has a nice little widget
  2678. 1:42:54to make it easy for me to select in the
  2679. 1:42:56details panel.
  2680. 1:42:58Let's see. Where is it? Right here. So,
  2681. 1:43:00we have all the different
  2682. 1:43:02wave options. I could go in here and
  2683. 1:43:04then edit any of these
  2684. 1:43:07to slowly start to tweak. So, what I
  2685. 1:43:09would do is continually play taste play
  2686. 1:43:12test my game over and over again, tweak
  2687. 1:43:15each of these different variables to see
  2688. 1:43:18which one makes the most sense. Because,
  2689. 1:43:20for example, maybe for balancing, you
  2690. 1:43:23would want to lower the amount of money
  2691. 1:43:25that the player gets. Maybe they get way
  2692. 1:43:26too much, so now the game is no longer
  2693. 1:43:28fun anymore. Or maybe it's too hard.
  2694. 1:43:30Maybe it's impossible to play the game.
  2695. 1:43:32So, you have to tweak these settings to
  2696. 1:43:34make it easier to defeat the blobs.
  2697. 1:43:37But, of course, let's see if the blobs
  2698. 1:43:39and press play to see if the HUD is
  2699. 1:43:41working.
  2700. 1:43:42Okay, here it is.
  2701. 1:43:44And then, I'll press enter to start the
  2702. 1:43:46wave.
  2703. 1:43:47Or by default, up here at the top left
  2704. 1:43:49hand corner, there's a countdown. It is
  2705. 1:43:51starting by default.
  2706. 1:43:54And we can see here are
  2707. 1:43:56the little guys. So, they're running
  2708. 1:43:59towards the tower.
  2709. 1:44:10All right. Well, I let them hit it that
  2710. 1:44:11time to make sure everything was
  2711. 1:44:12working. And
  2712. 1:44:14yeah, these blobs are exploding.
  2713. 1:44:17Now, I'll press R
  2714. 1:44:19and I can bring in a basic turret.
  2715. 1:44:22I'll set it right here.
  2716. 1:44:24And then, start to help turrets
  2717. 1:44:29attack these blobs.
  2718. 1:44:34And then, I can now add in a rapid-fire
  2719. 1:44:37turret. And you can see that this is a
  2720. 1:44:39full game at this point.
  2721. 1:44:43A 3D tower defense game.
  2722. 1:44:51THAT'S
  2723. 1:44:54MAYBE THAT'S A SYMBOLISM FOR life
  2724. 1:44:55because they didn't even get a chance.
  2725. 1:44:57They were
  2726. 1:44:59immediately destroyed upon birth.
  2727. 1:45:02Now, let's say I want to add in a
  2728. 1:45:03feature, but I don't really know how to
  2729. 1:45:05word the feature. It is fuzzy in my
  2730. 1:45:08mind.
  2731. 1:45:09I have a sense for what I want that
  2732. 1:45:11feature to be, but I don't know how to
  2733. 1:45:13give the AI the proper details to
  2734. 1:45:15implement that feature. Specifically, I
  2735. 1:45:18do want a friendly blob that I can spawn
  2736. 1:45:21in and it will help defend the castle
  2737. 1:45:22with me. But, I don't know what that
  2738. 1:45:24specifically looks like.
  2739. 1:45:27Or maybe I don't feel like talking to
  2740. 1:45:29the AI that much. How do I now align the
  2741. 1:45:32AI with me without having to then just
  2742. 1:45:35spill another long paragraph?
  2743. 1:45:38Well, personally, I would just spill
  2744. 1:45:40another long paragraph, but what you
  2745. 1:45:42could do, and this is a common feature
  2746. 1:45:44for a lot of AI software developers, is
  2747. 1:45:46essentially use a grill me skill, which
  2748. 1:45:49will essentially force the AI to have a
  2749. 1:45:51conversation with me. I will give the AI
  2750. 1:45:54a task and before the AI even starts
  2751. 1:45:57working on the task, it will then come
  2752. 1:45:59up with a bunch of smart questions to
  2753. 1:46:01then ask me where I can then answer each
  2754. 1:46:03of these questions, which will force me
  2755. 1:46:05to align and give more detail
  2756. 1:46:08specifically for the AI. So, we could
  2757. 1:46:10almost have a conversation going back
  2758. 1:46:11and forth because it's like we're
  2759. 1:46:13talking to a co-worker. You know, I
  2760. 1:46:14could just hand a co-worker a task and
  2761. 1:46:17say do it, but odds are the co-worker
  2762. 1:46:19will come back to me and be like, wait,
  2763. 1:46:20did you mean this or did you mean that?
  2764. 1:46:22The same thing we can do with the AI.
  2765. 1:46:25Specifically with the grill me skill.
  2766. 1:46:27Now, the most popular version of this is
  2767. 1:46:30the grill me by a developer called Matt
  2768. 1:46:32Botack, who's another YouTuber. So,
  2769. 1:46:34before doing anything, I'll say
  2770. 1:46:37install the grill me skill by Matt
  2771. 1:46:39Botack.
  2772. 1:46:40Now that it is installed, before you do
  2773. 1:46:43a prompt, I could do {slash} grill me
  2774. 1:46:46or I could just tell the AI to grill me
  2775. 1:46:48and it will know to use the skill. So,
  2776. 1:46:51grill me
  2777. 1:46:52and just select it right there.
  2778. 1:46:53And now
  2779. 1:46:55I want the player to be able to spawn in
  2780. 1:46:57a friendly blob.
  2781. 1:47:00This will force the AI to get back to me
  2782. 1:47:02with a list of questions that I will now
  2783. 1:47:04have to answer. So, it will force me to
  2784. 1:47:07give detail.
  2785. 1:47:09In case and it's also good in case the
  2786. 1:47:10AI is confused about something. Cuz so
  2787. 1:47:13far, this hasn't happened to me yet
  2788. 1:47:14throughout all my prompts, but if you
  2789. 1:47:16are very vague, the AI will get back to
  2790. 1:47:19you if it's an essential thing that it's
  2791. 1:47:21worried about. For example, maybe you're
  2792. 1:47:23changing an element of the game that you
  2793. 1:47:25haven't changed yet, then the AI will
  2794. 1:47:27get back and be like, "Are you sure you
  2795. 1:47:29want to do this?"
  2796. 1:47:30But that hasn't happened to me yet. And
  2797. 1:47:32now, here are
  2798. 1:47:33all the questions that it has produced.
  2799. 1:47:35So, let's go through each one.
  2800. 1:47:39Starting with the first one.
  2801. 1:47:41Question one, what the friendly blob
  2802. 1:47:44does.
  2803. 1:47:45What is the friendly blob for?
  2804. 1:47:47Specifically,
  2805. 1:47:48for question one, make it a kamikaze
  2806. 1:47:51hunter. I do want the blob to run up and
  2807. 1:47:54explode
  2808. 1:47:55on the other blobs.
  2809. 1:47:58Question two, how the player gets one.
  2810. 1:48:01Should a friendly blob be a fourth entry
  2811. 1:48:03in the existing R shop that costs cash,
  2812. 1:48:07rather than a separate hot key, on a
  2813. 1:48:09cool down, or a free limited stock?
  2814. 1:48:11Um it should be a fourth entry.
  2815. 1:48:14Also, put it
  2816. 1:48:17as the second option.
  2817. 1:48:20So, a little bit less expensive than the
  2818. 1:48:23rapid fire turret, but more expensive
  2819. 1:48:25than the basic. Question three, where it
  2820. 1:48:27spawns. Should it spawn where you're
  2821. 1:48:29aiming?
  2822. 1:48:30It should spawn immediately as a player
  2823. 1:48:32places them down, and not as a hologram.
  2824. 1:48:35The blob will not be a hologra-
  2825. 1:48:36hologram. The blob should just be placed
  2826. 1:48:38down immediately, wait there until it
  2827. 1:48:39sees the enemy blobs.
  2828. 1:48:42How to tell it apart. Should the
  2829. 1:48:43friendly blob have one fixed distinctive
  2830. 1:48:46look, for example, glowing cyan or
  2831. 1:48:48white, never one that enemies, random
  2832. 1:48:50candy colors, so you could read it at a
  2833. 1:48:52glance in a crowd?
  2834. 1:48:54Yes, I want the friendly blobs to be
  2835. 1:48:57green.
  2836. 1:48:58And a saturated green.
  2837. 1:49:01So, reserve that color for the friendly
  2838. 1:49:02blobs.
  2839. 1:49:04Friendly fire. Right now, every turret
  2840. 1:49:05targets every blob, and grenades and
  2841. 1:49:08your rifle hurt any blob. Should
  2842. 1:49:10friendly blobs be fully protected? No.
  2843. 1:49:14No, friendly blobs can get in the way.
  2844. 1:49:17They could get shot and killed.
  2845. 1:49:19Waves and cash. Should friendly blobs be
  2846. 1:49:22left out of the wave entirely? That
  2847. 1:49:24means they don't count towards the blobs
  2848. 1:49:26remaining. Yes, yes, they should be left
  2849. 1:49:28out immediately.
  2850. 1:49:30Where the settings live?
  2851. 1:49:31Yes, that keeps your one actor full
  2852. 1:49:33control setup. It should be within the
  2853. 1:49:35wave settings. Notice how for
  2854. 1:49:38I'm setting that off.
  2855. 1:49:40Notice how for all the questions, it
  2856. 1:49:42also gives you a recommended answer,
  2857. 1:49:45too.
  2858. 1:49:47Now, um the way I was answering these
  2859. 1:49:49questions, I was just talking like
  2860. 1:49:52normal. Although, you could go through
  2861. 1:49:54each one and be very direct. Just do Q1.
  2862. 1:49:57Yes.
  2863. 1:49:59Q2.
  2864. 1:50:00No, and and so on, if you want to be
  2865. 1:50:03shorter.
  2866. 1:50:04The way this skill works is that it
  2867. 1:50:06forces a conversation between you and
  2868. 1:50:08the AI. And the questions go in rounds.
  2869. 1:50:10So, the first questions right here that
  2870. 1:50:13we just answered are the main most
  2871. 1:50:14important questions. And then it will
  2872. 1:50:16ask for a second round, these smaller
  2873. 1:50:19questions, or it might have some
  2874. 1:50:22follow-up questions where you have to
  2875. 1:50:24explain your decision more
  2876. 1:50:26within the next round. And it will keep
  2877. 1:50:29on asking more and more questions until
  2878. 1:50:31the AI feels like it has enough
  2879. 1:50:33information about the feature, and then
  2880. 1:50:35it will implement it. This is also good
  2881. 1:50:38because it helps you as the game
  2882. 1:50:41developer think through the
  2883. 1:50:42ramifications of a specific feature.
  2884. 1:50:45Because maybe you didn't think to
  2885. 1:50:46yourself what the controls of the HUD
  2886. 1:50:49would be,
  2887. 1:50:51or whether or not the blobs should be
  2888. 1:50:53faster. So, the blobs that are chasing
  2889. 1:50:56the enemy blobs should be faster or
  2890. 1:50:58should be the same speed. So, these are
  2891. 1:51:00all questions now the AI is getting
  2892. 1:51:02back, and it's like you're having an
  2893. 1:51:03actual conversation to really align your
  2894. 1:51:06goals. That's how what the AI produces
  2895. 1:51:08is as close as possible to what you were
  2896. 1:51:11thinking. Now, in my case, I will end
  2897. 1:51:14the grill me cuz I don't want to go
  2898. 1:51:15through a couple different rounds. I
  2899. 1:51:17think this is good for now.
  2900. 1:51:20Yes to everything and the grill me, just
  2901. 1:51:22work on this.
  2902. 1:51:24And we are back. So, we have a new
  2903. 1:51:27class, friendly blob. I can manually
  2904. 1:51:30drag this in to see its interaction with
  2905. 1:51:32an enemy.
  2906. 1:51:34So, I'll have two enemies. Let's see if
  2907. 1:51:35the blob
  2908. 1:51:37sees them, runs at them, and explodes.
  2909. 1:51:42Okay, it is working. Now, let's see what
  2910. 1:51:44it's like during gameplay. Delete these
  2911. 1:51:46blobs.
  2912. 1:51:48And then, I'll press play.
  2913. 1:51:51I can buy a friendly blob. I'll place it
  2914. 1:51:54down right here.
  2915. 1:51:56And okay, that's a glitch cuz when I
  2916. 1:51:57place it down, I do shoot at the same
  2917. 1:51:59time. We don't want that to happen
  2918. 1:52:01because we could damage the friendly
  2919. 1:52:02blob. There it goes.
  2920. 1:52:05All right, let's see if he actually
  2921. 1:52:07catches it.
  2922. 1:52:09I don't think he's going to catch that
  2923. 1:52:10blob in time. He'll have to turn around.
  2924. 1:52:16Okay, so definitely, let's also make our
  2925. 1:52:18friendly blob faster.
  2926. 1:52:21Maybe that was exposed in the details
  2927. 1:52:23panel of wave settings.
  2928. 1:52:25Luckily for us, we do have all those
  2929. 1:52:27friendly blob settings ready to go, so I
  2930. 1:52:29didn't have to do another prompt to fix
  2931. 1:52:31that. Now, let's see where the speed is.
  2932. 1:52:35Speed. I'll make this eight, so the
  2933. 1:52:37friendly blob is pretty fast. Actually,
  2934. 1:52:39let's give it the speed of 10.
  2935. 1:52:43Now, press play.
  2936. 1:52:45I'll buy a friendly blob.
  2937. 1:52:48And he looks like he is ready to
  2938. 1:52:51sacrifice his life
  2939. 1:52:53for the tower.
  2940. 1:52:56There he goes. He sees jumping after
  2941. 1:52:57him, boom. [laughter]
  2942. 1:53:01I do want to make two changes, and
  2943. 1:53:03instead of prompting each one
  2944. 1:53:04individually, I could just list out to
  2945. 1:53:07the AI a bunch of different changes that
  2946. 1:53:09I want to do, and then it could do it
  2947. 1:53:10all at once. That's how I don't have to
  2948. 1:53:12wait for each prompt for each individual
  2949. 1:53:14one, so that can speed up my workflow.
  2950. 1:53:17So, specifically,
  2951. 1:53:20make it so that when the player buys
  2952. 1:53:22something and then they place down the
  2953. 1:53:23object or the blob, they don't
  2954. 1:53:25automatically fire. So, they should not
  2955. 1:53:27fire when they're placing down an
  2956. 1:53:28object. Also, add a hologram for when
  2957. 1:53:32the player is placing the friendly blob.
  2958. 1:53:35Instead of shooting that off, we could
  2959. 1:53:37see if there's any other improvements I
  2960. 1:53:39want to my game. For example, maybe I
  2961. 1:53:41want to make a change to the HUD right
  2962. 1:53:43now.
  2963. 1:53:44For example, and this is just for the
  2964. 1:53:46video, this entire time I've had a
  2965. 1:53:48health bar on the bottom left-hand
  2966. 1:53:49corner.
  2967. 1:53:50I can also move that to the right-hand
  2968. 1:53:52corner.
  2969. 1:53:55And move the health bar to the
  2970. 1:53:57right-hand corner
  2971. 1:53:59for the player,
  2972. 1:54:00not the left-hand corner.
  2973. 1:54:04What should we call this blob? So, the
  2974. 1:54:06blob is going to be chasing the player.
  2975. 1:54:09So, instead of the blob kamikaze into
  2976. 1:54:12the tower, it will kamikaze into the
  2977. 1:54:15player. What should we call this?
  2978. 1:54:17Uh let's call it an alpha blob.
  2979. 1:54:21I also want you to create a new enemy
  2980. 1:54:23called alpha blob that spawns with the
  2981. 1:54:26rest of the blobs, but instead of going
  2982. 1:54:28after the tower, that blob will go after
  2983. 1:54:31the player character and explode next to
  2984. 1:54:34the character,
  2985. 1:54:35which will cause damage. So, the
  2986. 1:54:37character has to worry about their own
  2987. 1:54:39health and the tower's health.
  2988. 1:54:42We're back. Let's see if those features
  2989. 1:54:43were implemented correctly.
  2990. 1:54:45Pressing play. Okay, now the health bar
  2991. 1:54:47is on the bottom right-hand corner.
  2992. 1:54:49And then if I place down a blob, we have
  2993. 1:54:52a hologram.
  2994. 1:54:53But I am still firing the gun when I
  2995. 1:54:55place it down, so that's wrong. And now
  2996. 1:54:57we have this new blob that is chasing
  2997. 1:54:59after me.
  2998. 1:55:00So, that is pretty scary looking. Let's
  2999. 1:55:02see if our friendly blob can catch him.
  3000. 1:55:05That kind of looks like a Sith Lord with
  3001. 1:55:07the dark red eyes.
  3002. 1:55:09Okay, I I did now caught it. So, we now
  3003. 1:55:12have an alpha blob that's just chasing
  3004. 1:55:14me, the player, and trying to destroy
  3005. 1:55:17me.
  3006. 1:55:18At this point, I'm just doing a very
  3007. 1:55:19small polish pass. And this is the
  3008. 1:55:22misconception with AI is that people
  3009. 1:55:24think that oh, you just generate the
  3010. 1:55:26game once with AI and that's it. Well,
  3011. 1:55:29you could do that or like what I showed
  3012. 1:55:31in this video, you can build up your
  3013. 1:55:33game feature by feature, prompt by
  3014. 1:55:35prompt, slowly, and then refine each
  3015. 1:55:38element of your game. So, just because
  3016. 1:55:40the AI generated it, doesn't mean you
  3017. 1:55:42can't change it. It's all code. You can
  3018. 1:55:44change everything. So, if you don't like
  3019. 1:55:46something, you could go in, polish it,
  3020. 1:55:49and then just keep on adding feature and
  3021. 1:55:51feature. So, I need to tell the AI that
  3022. 1:55:54it did not correctly fix that issue
  3023. 1:55:57where the gun is automatically firing.
  3024. 1:55:59Also, I noticed the turrets, they do not
  3025. 1:56:01have a muzzle flash.
  3026. 1:56:02So, I need to tell the AI to do that.
  3027. 1:56:06For the turrets, add the muzzle and make
  3028. 1:56:08sure you do check that this is correct.
  3029. 1:56:10I want you to use the muzzle flash
  3030. 1:56:12particles that are currently being
  3031. 1:56:14spawned on the player's gun. So, take
  3032. 1:56:16those particles and put that on the
  3033. 1:56:18muzzle of the turrets. Also, when I
  3034. 1:56:20place down an object, the player is
  3035. 1:56:23still firing a bullet. When a player
  3036. 1:56:26places an object, there should be no
  3037. 1:56:27bullet being fired.
  3038. 1:56:29And
  3039. 1:56:30I also want a little animation in the
  3040. 1:56:33top right-hand corner whenever the
  3041. 1:56:34player gets some cash, have there be a
  3042. 1:56:37little animation play in the top
  3043. 1:56:39right-hand corner that tells the player
  3044. 1:56:41that they are getting cash.
  3045. 1:56:43Now, let's test our game. I'll press
  3046. 1:56:45play
  3047. 1:56:46and then grab a basic turret, place it
  3048. 1:56:49down, and let's see.
  3049. 1:56:51Okay, good.
  3050. 1:56:52My weapon didn't automatically fire with
  3051. 1:56:53that. Now, we will Let's if we do have
  3052. 1:56:55muzzle flashes for the turrets.
  3053. 1:56:58And we do. So, there is a slight muzzle
  3054. 1:57:00flash going on.
  3055. 1:57:02That does add a lot.
  3056. 1:57:04And we can watch that turret work.
  3057. 1:57:06And in the top right-hand corner, you
  3058. 1:57:08can see whenever we destroy a blob or
  3059. 1:57:11when we defeat the wave, there is a
  3060. 1:57:12slight animation adding to the amount of
  3061. 1:57:15money that we have.
  3062. 1:57:17There is one more major feature I will
  3063. 1:57:18implement, and that is the ability to
  3064. 1:57:21control the path of the blobs, cuz right
  3065. 1:57:23now it's not very interesting. They just
  3066. 1:57:25spawn right here and go within a
  3067. 1:57:26straight line. Instead, what I will do
  3068. 1:57:28is create a spline actor. That's how I
  3069. 1:57:31can create a road, and it can curve or
  3070. 1:57:34go around, and there's an actual path
  3071. 1:57:37that the blobs will follow. And then I
  3072. 1:57:38will take that spline,
  3073. 1:57:40rearrange my entire world, and then move
  3074. 1:57:43the tower. That's how the blobs are
  3075. 1:57:45actually going to now be attacking this
  3076. 1:57:47castle. So, we have to defend it to
  3077. 1:57:50create an actual game level. So, this is
  3078. 1:57:53the last major feature that I will
  3079. 1:57:55implement. Because this is a tutorial,
  3080. 1:57:57you now know everything you need to in
  3081. 1:58:00order start
  3082. 1:58:01programming with AI in Unreal. And
  3083. 1:58:04honestly, I haven't had this much fun
  3084. 1:58:06with game development in a while.
  3085. 1:58:08I It is an amazing feeling where you can
  3086. 1:58:11literally be working on your game. You
  3087. 1:58:13can just think of a feature,
  3088. 1:58:15and then you can just explain it with
  3089. 1:58:18words, and the code generates for you.
  3090. 1:58:21That feature's then in your game. And
  3091. 1:58:23then after that, you can keep on
  3092. 1:58:24refining it, keep on adding. It is a
  3093. 1:58:27very dynamic and artistic process. It is
  3094. 1:58:30so fun. And now a lot of the busy work,
  3095. 1:58:34so having to type out code, having to
  3096. 1:58:36program everything, that has pretty much
  3097. 1:58:38now at this point been completely
  3098. 1:58:40abstracted away. And while the process
  3099. 1:58:43to get there was fun, in the end what
  3100. 1:58:46matters is the outcome.
  3101. 1:58:48And now the outcome, especially since
  3102. 1:58:50now we can to so many more features on
  3103. 1:58:51top of each other, you could create an
  3104. 1:58:53insanely polished game.
  3105. 1:58:56So, let's go ahead and add in the last
  3106. 1:58:58feature. Also,
  3107. 1:59:00sometimes I could just fall down a
  3108. 1:59:02feature rabbit hole. I could just keep
  3109. 1:59:04on adding and adding and adding. For
  3110. 1:59:06example, if I was going to finish this
  3111. 1:59:09game, then maybe I would add in a blob
  3112. 1:59:11house that would continually spawn in
  3113. 1:59:13friendly blobs. So, we don't have to
  3114. 1:59:15manually place in a friendly blob each
  3115. 1:59:17time. You can think of like that as a
  3116. 1:59:20blob barracks that will continually be
  3117. 1:59:23spawning out your friendly blobs. Maybe
  3118. 1:59:25I even added a feature that allows me to
  3119. 1:59:28control groups of friendly blobs, kind
  3120. 1:59:30of like Total War. So, now we have Total
  3121. 1:59:33War blob warfare. I can add in a turret
  3122. 1:59:36that's firing laser beams. Pretty much,
  3123. 1:59:39honestly, the possibilities are
  3124. 1:59:41limitless. But, let's wrap up our game
  3125. 1:59:45and create that spline feature. So,
  3126. 1:59:48create a new actor called blob enemy
  3127. 1:59:50path that will be a spline actor that me
  3128. 1:59:54as a level editor should be able to
  3129. 1:59:56control. Also, make sure that I can
  3130. 1:59:58control the Y axis. That's how I'm able
  3131. 2:00:01to control the width of the spline to
  3132. 2:00:04indicate how large the path is, the
  3133. 2:00:06width of the path.
  3134. 2:00:08And by default, if there is no spline
  3135. 2:00:12path, then the blobs will, like normal,
  3136. 2:00:14start from the spawn and immediately go
  3137. 2:00:17straight to the tower. But, if there is
  3138. 2:00:20a path, then when the blobs spawn in,
  3139. 2:00:22they should follow that path
  3140. 2:00:24towards the tower. So, make sure this is
  3141. 2:00:27a customizable spline that I can add to
  3142. 2:00:30my world and expose all the necessary
  3143. 2:00:32properties to the wave settings.
  3144. 2:00:36We now have the blob spline. It is blob
  3145. 2:00:40enemy path. Drag that in.
  3146. 2:00:42And then you might be like, uh-oh, where
  3147. 2:00:44is a spline? Where is the path? Well,
  3148. 2:00:46generally when it comes to splines, in
  3149. 2:00:48order to see the spline and edit it, we
  3150. 2:00:51have to select the actor or class that
  3151. 2:00:54has a spline inside of it, go to
  3152. 2:00:55details, and then manually select the
  3153. 2:00:58spline component in order to get access
  3154. 2:01:00to it. Now, this is pretty bright day.
  3155. 2:01:04The ground is kind of yellow, so it's
  3156. 2:01:05hard to see the spline.
  3157. 2:01:07So, I'll go into alt and three unlit
  3158. 2:01:09view mode, so we could better see that
  3159. 2:01:11spline. And in case you never use a
  3160. 2:01:13spline, splines are just 3D points in
  3161. 2:01:16space
  3162. 2:01:17that that interpolates near each other
  3163. 2:01:19to create a smooth line. So, I could
  3164. 2:01:22grab one point, for example, over here,
  3165. 2:01:24move it, and then grab another point. I
  3166. 2:01:27can move this or rotate it. That's how
  3167. 2:01:29the handles are rotating to then change
  3168. 2:01:32that path.
  3169. 2:01:33If I want to create a new point, hold
  3170. 2:01:35down alt to then drag out a new point.
  3171. 2:01:38So, I can
  3172. 2:01:40make this.
  3173. 2:01:41That's how we're starting from the
  3174. 2:01:43spawn.
  3175. 2:01:44The blobs will go around like a little
  3176. 2:01:46zigzag, and then end up at the tower
  3177. 2:01:49right here.
  3178. 2:01:51And within my prompt, I explicitly was
  3179. 2:01:54telling it that I want to be able to
  3180. 2:01:55control the width. So, you can see that
  3181. 2:01:58the spline it does have a width. If I
  3182. 2:01:59want to control it, select it, then I
  3183. 2:02:02can go to scale, and scale it on the Y
  3184. 2:02:05axis will decrease the width.
  3185. 2:02:07And then scaling it out will make the
  3186. 2:02:09path larger.
  3187. 2:02:11Now, if your spline does not have this
  3188. 2:02:12ability, because by default it doesn't
  3189. 2:02:14have a width, you need to explicitly
  3190. 2:02:16tell the AI to make sure that you have
  3191. 2:02:19width that you can scale it on the Y
  3192. 2:02:21axis.
  3193. 2:02:22Because sometimes
  3194. 2:02:24maybe there's an area on my map, and the
  3195. 2:02:27blobs have to really crunch through an
  3196. 2:02:29area, then I could make it small like
  3197. 2:02:32this, or if there's a or if there's a
  3198. 2:02:34really large field,
  3199. 2:02:36and I want to give the blobs a room to
  3200. 2:02:38maneuver, then I could increase it and
  3201. 2:02:40make it pretty large like that. So,
  3202. 2:02:42let's see if this is now working
  3203. 2:02:45with Alt and S
  3204. 2:02:47to simulate. And now those blobs have
  3205. 2:02:49spawned in.
  3206. 2:02:51And it looks like
  3207. 2:02:53that yes, they are following exactly the
  3208. 2:02:56spline path. And this is exactly what we
  3209. 2:02:58needed because now we have all the tools
  3210. 2:03:02that we need to create our own level
  3211. 2:03:05and to actually start to defend the
  3212. 2:03:07castle. So, now I will
  3213. 2:03:10manipulate my level
  3214. 2:03:12and then add in my spline path
  3215. 2:03:15to create a neat little road for the
  3216. 2:03:18blobs to maneuver up and then hit my
  3217. 2:03:20castle.
  3218. 2:03:21For this part, I'm time-lapsing it
  3219. 2:03:23because I am doing nothing new. I'm just
  3220. 2:03:25rearranging my environment to make it
  3221. 2:03:27more friendly to the game style we just
  3222. 2:03:29created. Specifically, right now the
  3223. 2:03:31blobs cannot get to the castle. So, I
  3224. 2:03:34will have to sculpt the landscape and
  3225. 2:03:36then create like a little landscape
  3226. 2:03:39area, a ramp going up to the castle. So,
  3227. 2:03:41the player will actually have to defend
  3228. 2:03:43it because right now the castle is
  3229. 2:03:44pretty well defended being up on that
  3230. 2:03:46cliff area.
  3231. 2:03:47And I am doing nothing new here. If you
  3232. 2:03:50watch the UE6 beginner tutorial, then
  3233. 2:03:52you know exactly how to create this
  3234. 2:03:54environment. You know all the basics. I
  3235. 2:03:56am just moving the objects around,
  3236. 2:03:58sculpting, and also foliage painting. Do
  3237. 2:04:00keep in mind that each mesh has their
  3238. 2:04:03own collision. So, you'll see that if I
  3239. 2:04:05go into the lit view mode and then
  3240. 2:04:07select player collision, I can see the
  3241. 2:04:09world's collision. And for some of the
  3242. 2:04:10meshes, the collisions are not lined up
  3243. 2:04:12with the actual look of the static mesh.
  3244. 2:04:15So, the way I fix that is that I just
  3245. 2:04:17open up the static mesh in the mesh
  3246. 2:04:18editor and then regenerate its
  3247. 2:04:20collision. Something else you could do
  3248. 2:04:22is just tell the AI the name of the mesh
  3249. 2:04:25and tell the AI to fix the collision. If
  3250. 2:04:27you do notice that in player collision
  3251. 2:04:30that one of your meshes is blocking
  3252. 2:04:31something when it shouldn't be. Now,
  3253. 2:04:33unfortunately, there is a weird glitch
  3254. 2:04:35with foliage mode in UE 5.8 where if I
  3255. 2:04:38do move the landscape, the trees are
  3256. 2:04:40supposed to follow along with it. So, if
  3257. 2:04:42I make a change to landscape, the trees
  3258. 2:04:44will also move up and down, but right
  3259. 2:04:46now they aren't. So, I do have to erase
  3260. 2:04:48the foliage, make my sculpt change, and
  3261. 2:04:50then paint the foliage back onto the
  3262. 2:04:52landscape after the sculpt change is
  3263. 2:04:53done. Now, what you're noticing right
  3264. 2:04:55here is that I am testing the path. So,
  3265. 2:04:57in the wave settings, I increase the
  3266. 2:04:59blob count to 100, so I get a bunch of
  3267. 2:05:01blobs, and I want to make sure that the
  3268. 2:05:02blobs can actually reach the castle. I
  3269. 2:05:05did notice that some blobs were falling
  3270. 2:05:06off the cliff, so I had to readjust the
  3271. 2:05:09spline to make sure those blobs don't
  3272. 2:05:10fall off. I also moved the blob spawn,
  3273. 2:05:13the cave, closer to the castle because
  3274. 2:05:15in the end this is a tutorial, and I
  3275. 2:05:17don't want to have to wait a while for
  3276. 2:05:19the blobs to walk all the way to the
  3277. 2:05:21castle if they use the cave on the far
  3278. 2:05:24end. Now, for the final game, I would
  3279. 2:05:26probably use the cave that is farther
  3280. 2:05:28from the castle. And that is pretty
  3281. 2:05:30funny that whoever built the castle here
  3282. 2:05:33didn't realize that there is a cave
  3283. 2:05:35filled with evil blobs that are going to
  3284. 2:05:37attack the castle. Because this is a
  3285. 2:05:39variation of the original level, I
  3286. 2:05:41really like the way the original level
  3287. 2:05:43looked. I made sure to make a duplicate
  3288. 2:05:46of that level before I edited this.
  3289. 2:05:48That's how if I don't like my changes, I
  3290. 2:05:50can always go back to the original
  3291. 2:05:52level. Essentially, it is a backup so
  3292. 2:05:54that I don't lose all the progress I've
  3293. 2:05:56already made on my level from the UE5
  3294. 2:05:58beginner tutorial when I was building
  3295. 2:06:00it.
  3296. 2:06:01I did notice that I do want to change a
  3297. 2:06:03little bit about how the blobs work just
  3298. 2:06:06to make my game more interesting, and
  3299. 2:06:08then there is one glitch. So, I will
  3300. 2:06:11right now tell the AI to fix this.
  3301. 2:06:14When it comes to the alpha blob,
  3302. 2:06:15currently the alpha blob just
  3303. 2:06:17immediately bee lines to the player, and
  3304. 2:06:19the alpha blob does not follow the path.
  3305. 2:06:21So, the odds are that the blob will not
  3306. 2:06:23be able to reach the player. So, have
  3307. 2:06:26the alpha blob follow the path with the
  3308. 2:06:28rest of the blobs until it gets into the
  3309. 2:06:31radius of the player and then the alpha
  3310. 2:06:34blob will diverge
  3311. 2:06:36and attack the player. So, have the
  3312. 2:06:38alpha blob be with the rest of the
  3313. 2:06:39players. Sometimes there might be a blob
  3314. 2:06:42stuck and I do not want a blob stuck in
  3315. 2:06:45a mesh or stuck somewhere on the map to
  3316. 2:06:48then hold up the entire game. So, give a
  3317. 2:06:51time limit, let's say 1 minute after the
  3318. 2:06:54start of the wave or actually do a math
  3319. 2:06:57operation depending on how long this
  3320. 2:06:58line is to determine when the wave
  3321. 2:07:01should end. And then if the final blobs
  3322. 2:07:03were not destroyed 30 seconds after when
  3323. 2:07:07you predict the wave should end, then
  3324. 2:07:09the blobs should be destroyed and the
  3325. 2:07:11next wave continues. Also, make it
  3326. 2:07:13that's how there is a one out of 10
  3327. 2:07:15chance that when the blob is going to
  3328. 2:07:18the castle, if the blob is near, so a
  3329. 2:07:20small radius but near a turret, the blob
  3330. 2:07:23may decide to then attack the turret,
  3331. 2:07:25explode and destroy the turret.
  3332. 2:07:28So, actually let's make that one out of
  3333. 2:07:30two times. So, very small radius. Give
  3334. 2:07:32me controls over all these properties
  3335. 2:07:34I'm talking about within the wave
  3336. 2:07:37settings that when the blob is in the
  3337. 2:07:39radius near a turret
  3338. 2:07:41the blob half the time may decide to
  3339. 2:07:43attack the turret and destroy it. And
  3340. 2:07:45that goes for all blobs, not just the
  3341. 2:07:47alpha ones.
  3342. 2:07:48You may have noticed that when it comes
  3343. 2:07:50to that prompt, there was two times
  3344. 2:07:52where I said something that I realized,
  3345. 2:07:55wait, actually I want to do something
  3346. 2:07:57else. That is completely fine and I just
  3347. 2:07:59left that into the prompt. The AI is
  3348. 2:08:00smart enough to then scratch out what I
  3349. 2:08:02just said to ignore.
  3350. 2:08:04So now, this is our final game. And what
  3351. 2:08:08I did is that I went ahead and within
  3352. 2:08:10the wave settings I did play test the
  3353. 2:08:13game a little bit and adjust some of
  3354. 2:08:14these settings to the settings I think
  3355. 2:08:16make the most sense. Specifically, I
  3356. 2:08:18made the blobs faster because it is
  3357. 2:08:21really slow having the blobs go all the
  3358. 2:08:23way over here to the castle. But now,
  3359. 2:08:26pressing play,
  3360. 2:08:28and then I'll press F11 to go into full
  3361. 2:08:30screen mode. Here is my castle. We got
  3362. 2:08:33to defend it. It looks big and
  3363. 2:08:35intimidating from a first-person
  3364. 2:08:36character. So, let's add in a basic
  3365. 2:08:39turret and some of the blobs now.
  3366. 2:08:42They will try to attack the turret and
  3367. 2:08:44get rid of it. So, the positioning of
  3368. 2:08:46your turret does matter.
  3369. 2:08:48Now, the blobs are coming up here.
  3370. 2:08:51They start to attack it.
  3371. 2:09:00Prevent those blobs from coming up.
  3372. 2:09:14And now for the next wave, we can spawn
  3373. 2:09:16in a bunch of friendly blobs.
  3374. 2:09:20Or specifically, I only had enough money
  3375. 2:09:21for just one guy.
  3376. 2:09:23So, now he will sacrifice his life
  3377. 2:09:26for the castle. And honestly, this is so
  3378. 2:09:28fun because in the previous UE6 beginner
  3379. 2:09:30tutorial, all we did was create an
  3380. 2:09:32environment. We did not create an actual
  3381. 2:09:34game from it. And now
  3382. 2:09:37there is a game we can play here.
  3383. 2:09:39And it's a whole 'nother feeling after
  3384. 2:09:42you create an environment in Unreal to
  3385. 2:09:43make it a playable game.
  3386. 2:09:49Just as a quick bonus at the end to
  3387. 2:09:52really complete the game, now let's add
  3388. 2:09:54in a start menu and an options menu. And
  3389. 2:09:56within the options menu, we'll be
  3390. 2:09:57settings that can control the graphical
  3391. 2:09:59fidelity of our game.
  3392. 2:10:02So, I will exit out.
  3393. 2:10:04Let's create a
  3394. 2:10:06pause menu. And on the pause menu,
  3395. 2:10:07there's a setting button. And the
  3396. 2:10:09settings contain all the necessary
  3397. 2:10:11graphical settings for Unreal Engine.
  3398. 2:10:14So, go through and expose as many
  3399. 2:10:16properties as possible to give the
  3400. 2:10:18player flexibilities so they can change
  3401. 2:10:21the quality of the game according to
  3402. 2:10:23their system. And the pause menu will be
  3403. 2:10:26the will be escape. But for us the
  3404. 2:10:29editors, I still want escape to leave
  3405. 2:10:31the game. So, for the editors
  3406. 2:10:34for the game developers, have the menu
  3407. 2:10:37be the T key.
  3408. 2:10:38The reason why I said T key is because
  3409. 2:10:41if we map it to escape, now when I press
  3410. 2:10:43escape, I'm not going to leave the game.
  3411. 2:10:45And that's pretty annoying. I would then
  3412. 2:10:46have to click another button. I still
  3413. 2:10:48want escape to be the shortcut to leave
  3414. 2:10:50the game. So, up until we then compile a
  3415. 2:10:52game, I'll leave it at some other key to
  3416. 2:10:55go to the pause menu.
  3417. 2:10:57And just like that, with one prompt, we
  3418. 2:11:00now have a pause menu. Going into
  3419. 2:11:02settings, and all the settings that you
  3420. 2:11:05would expect, we can go through, change
  3421. 2:11:07it. It even shows us our frames per
  3422. 2:11:09seconds. Now, do keep in mind that the
  3423. 2:11:11frames for the editor will be lower than
  3424. 2:11:15after you compile it when it's its own
  3425. 2:11:17executable, its own program, because
  3426. 2:11:19there is so much overhead in the editor.
  3427. 2:11:21You will have a lower frame rate in
  3428. 2:11:23Unreal Engine than when you have the
  3429. 2:11:25final game. But, this is incredible how
  3430. 2:11:27we already have a working pause menu
  3431. 2:11:30with literally just one prompt. Let's
  3432. 2:11:32take this further,
  3433. 2:11:34and then also create a start menu. But,
  3434. 2:11:37I want at the top of the start menu a
  3435. 2:11:39logo for the game. So, with Claude,
  3436. 2:11:42Claude can generate images cuz in the
  3437. 2:11:44end images are just code. They are just
  3438. 2:11:48they are pixels with values, or you can
  3439. 2:11:51represent images through formulas. But,
  3440. 2:11:54Claude does not have its own dedicated
  3441. 2:11:56image generator AI. And ChatGPT has a
  3442. 2:11:59special image generator built into it.
  3443. 2:12:02So, you're not really communicating when
  3444. 2:12:04you ask ChatGPT to make an image with
  3445. 2:12:06ChatGPT itself. Instead,
  3446. 2:12:09chat is routing you to the specific AI
  3447. 2:12:12model that handles photo generation. So,
  3448. 2:12:15in ChatGPT, I gave it a photo of my
  3449. 2:12:18blobs, of the turrets, and then of the
  3450. 2:12:21castle, because I wanted to use these
  3451. 2:12:23two photos as inspiration to create a
  3452. 2:12:26logo that fits with that style.
  3453. 2:12:29And then it created these logos, Blob
  3454. 2:12:32Siege, Blob Siege, Blob Siege, and these
  3455. 2:12:36other ones.
  3456. 2:12:37And I do I do like the logos, cuz the
  3457. 2:12:39way I worded it, I wanted it to look
  3458. 2:12:41like something you would find on the iOS
  3459. 2:12:43store, and this is something you would
  3460. 2:12:45find. Now, I really like how it shows
  3461. 2:12:48the castles for all of these, and then
  3462. 2:12:50it even gets the red banners. So, I like
  3463. 2:12:53this one specifically, Blob Siege, so
  3464. 2:12:56that I grabbed this logo, and then I
  3465. 2:12:58also gave it a photo, because I want the
  3466. 2:13:00start screen to essentially be over
  3467. 2:13:03here, from this angle, cuz this is the
  3468. 2:13:05main hero angle. This is the coolest
  3469. 2:13:07look at my environment. So, I took a
  3470. 2:13:09screenshot of this, because I knew this
  3471. 2:13:11is where the start screen was going to
  3472. 2:13:13be.
  3473. 2:13:14And then I asked it to create different
  3474. 2:13:17variations of the start menu coming from
  3475. 2:13:19this logo, using this logo also as
  3476. 2:13:21inspiration.
  3477. 2:13:23So, it then generated
  3478. 2:13:26this, and I liked the first generation
  3479. 2:13:29it did. It also gave me this option. I
  3480. 2:13:31like this option. I don't like this
  3481. 2:13:33option. But, it's either this one or
  3482. 2:13:37this one.
  3483. 2:13:39If I do want to keep the red banner flag
  3484. 2:13:42theme, then this one's pretty good, but
  3485. 2:13:44it does construde, so I can't really see
  3486. 2:13:47the rest of the environment. So, I think
  3487. 2:13:49I will leave it at this.
  3488. 2:13:50Within Claude, I will drag my logo in,
  3489. 2:13:53let go, and then drag the reference of
  3490. 2:13:56what I want, and let go,
  3491. 2:13:58and tell it,
  3492. 2:14:00"I want you to make a start screen
  3493. 2:14:02from this angle.
  3494. 2:14:05Specifically, you can look at the
  3495. 2:14:07location
  3496. 2:14:08of camera thumbnail two.
  3497. 2:14:12When the player enters the game, when
  3498. 2:14:14the player starts the game, they will be
  3499. 2:14:17at this location with the start screen,
  3500. 2:14:19and the player can either press play, go
  3501. 2:14:22to the settings, or credits. For
  3502. 2:14:24credits, say created by Unreal Sensei.
  3503. 2:14:26That's it. The settings will be the same
  3504. 2:14:27settings we just created.
  3505. 2:14:29And I want you to use the exact logo,
  3506. 2:14:33which is the first image, and for the
  3507. 2:14:35start screen, create the formatting and
  3508. 2:14:37the buttons to look exactly like the
  3509. 2:14:42second image.
  3510. 2:14:45So, go ahead and work on that.
  3511. 2:14:50Also, do keep in mind that whenever
  3512. 2:14:51you're AI generating something, since
  3513. 2:14:53it's so easy to port features in between
  3514. 2:14:56engines, in between projects, you could
  3515. 2:14:59theoretically take everything we just
  3516. 2:15:01did and port it to a brand new engine.
  3517. 2:15:05Or,
  3518. 2:15:06if you have a feature, for example, you
  3519. 2:15:07like the turrets, or we spent 20 minutes
  3520. 2:15:11generating the settings menu, instead of
  3521. 2:15:13AI generating this from scratch, if I
  3522. 2:15:15have a new Unreal project, I can point
  3523. 2:15:18to this project's location, and then
  3524. 2:15:21tell the AI, "Hey, I want you to grab
  3525. 2:15:23the settings from this project." And
  3526. 2:15:25then, instead of having to generate it
  3527. 2:15:27from scratch, it can reuse what we
  3528. 2:15:29already created. And that is I mean,
  3529. 2:15:33beforehand, you would have to stick to a
  3530. 2:15:35certain template because the way code
  3531. 2:15:37was set up. And let me go ahead and
  3532. 2:15:39let's exit out.
  3533. 2:15:40That's how the AI can work in peace, and
  3534. 2:15:43also open up Unreal Engine by itself to
  3535. 2:15:45test it. Because beforehand, we would be
  3536. 2:15:48limited to the specific ways we would
  3537. 2:15:49create a feature or an actor or an
  3538. 2:15:52object. We wouldn't be able to then take
  3539. 2:15:55that and port it into a new project or a
  3540. 2:15:57new engine without a lot of reworking.
  3541. 2:16:00Now, AI handles all that tedious action.
  3542. 2:16:03So,
  3543. 2:16:04if you like your blob, if you like your
  3544. 2:16:06turret,
  3545. 2:16:07if you like the settings menu and the
  3546. 2:16:09start menu, you can just take those, ask
  3547. 2:16:12AI to migrate it, and it'll do it for
  3548. 2:16:14you. So, Claude is like a super
  3549. 2:16:18migration tool for getting assets in
  3550. 2:16:20between projects. Cuz if you've ever
  3551. 2:16:22tried to mix and match different asset
  3552. 2:16:24packs, you know how hard it can be,
  3553. 2:16:26especially with code.
  3554. 2:16:28Now, I will play the game.
  3555. 2:16:31Alt + P, and we have a full-on menu.
  3556. 2:16:36So, this is a credible. Go to credits.
  3557. 2:16:38Created by Unreal Sensei. Of course, for
  3558. 2:16:40your game, put your name in it.
  3559. 2:16:43Settings. Right here, we have our
  3560. 2:16:45settings, but notice how the user
  3561. 2:16:46interface now looks different from the
  3562. 2:16:49user interface of the start menu. So, we
  3563. 2:16:51could change that in just a moment.
  3564. 2:16:52Also, when I hover over the different
  3565. 2:16:54options, I want there to be a little bit
  3566. 2:16:56of a visual feedback. And pressing play,
  3567. 2:17:01okay, we did not ask for that, but that
  3568. 2:17:03was cool. Maybe I do keep it. Also, the
  3569. 2:17:06UI right here, it doesn't have the same
  3570. 2:17:08design language as the start menu.
  3571. 2:17:10So, we could go ahead and work on that.
  3572. 2:17:13So, large features like this, where I'm
  3573. 2:17:15just implementing the game settings, the
  3574. 2:17:18play menu,
  3575. 2:17:19all of these were just one prompt. You
  3576. 2:17:21could do the same. Let's say if you want
  3577. 2:17:22to add in Let's say you want to add in a
  3578. 2:17:24feature as big as controller support, or
  3579. 2:17:26even something insanely large like
  3580. 2:17:29multiplayer support, you are just one
  3581. 2:17:31prompt away.
  3582. 2:17:33I want you to add animations to the
  3583. 2:17:35start menu
  3584. 2:17:37to make it feel more alive and more
  3585. 2:17:39reactive to the user hovering over each
  3586. 2:17:43button.
  3587. 2:17:45Also, I want you to take the design
  3588. 2:17:47language of the start menu and apply it
  3589. 2:17:50to every other UI element
  3590. 2:17:52in the game. So, including when we're
  3591. 2:17:55buying defenses and the settings menu
  3592. 2:17:59and pause menu.
  3593. 2:18:02And now we are back. Let's go check out
  3594. 2:18:04what we created
  3595. 2:18:06with Alt and P, and that is exactly what
  3596. 2:18:08I want to see.
  3597. 2:18:09Even the buttons have a shine to it. So,
  3598. 2:18:11everything has a slight animation,
  3599. 2:18:13and there's a lot of responsiveness to
  3600. 2:18:15this menu. Clicking the settings, now
  3601. 2:18:18the design language of that menu has
  3602. 2:18:20carried over to the settings,
  3603. 2:18:22and it does look like that the font is
  3604. 2:18:25off center, so I will have to prompt to
  3605. 2:18:27bring that down. Go back, and then press
  3606. 2:18:29play.
  3607. 2:18:32Okay, now all the UI elements for our
  3608. 2:18:34game also carry over the same font.
  3609. 2:18:37Going into the menu,
  3610. 2:18:40I do like that animation showing me all
  3611. 2:18:42the different defense options.
  3612. 2:18:45I'll place a turret there, and now look
  3613. 2:18:47at the escape menu, and this is also
  3614. 2:18:49good. So, now our game has a consistent
  3615. 2:18:52theme to it and UI design. I will quit
  3616. 2:18:55the game because now we are done. As you
  3617. 2:18:58can see, I can just keep prompting
  3618. 2:19:00prompting feature by feature. I can do
  3619. 2:19:02this for days upon days, and if I was
  3620. 2:19:05making my own game, then this would be
  3621. 2:19:07months and months of work. But as you
  3622. 2:19:09can see, with the power of AI, by me
  3623. 2:19:12just prompting adding in new features, I
  3624. 2:19:14can create that game so much faster,
  3625. 2:19:16experiment, and overall make a better
  3626. 2:19:18game. But this was a tutorial, and I'm
  3627. 2:19:22pretty sure you don't want to see me
  3628. 2:19:23prompt for another couple hours. So,
  3629. 2:19:26with that, we are now done.
  3630. 2:19:28To celebrate, let's play one round of
  3631. 2:19:30our finished game.
  3632. 2:19:32So, I'll press play, and do keep in mind
  3633. 2:19:34that this is just going to be one round,
  3634. 2:19:36so I increased the blob spawn amount to
  3635. 2:19:38be in the hundreds, so there will be a
  3636. 2:19:40lot of blobs,
  3637. 2:19:42and I also give myself a lot of cash.
  3638. 2:19:44So, this is kind of like if we had a
  3639. 2:19:46wave
  3640. 2:19:47that is
  3641. 2:19:48very far away from this first round. So,
  3642. 2:19:51obviously, you know, that's a lot of
  3643. 2:19:53blobs.
  3644. 2:19:54I've got to keep on
  3645. 2:19:55bringing in my turrets
  3646. 2:19:59to prepare myself and now I am almost
  3647. 2:20:02out of cash.
  3648. 2:20:06All right, let's see if we can defend
  3649. 2:20:07us.
  3650. 2:20:12See everything working.
  3651. 2:20:26And they are destroying my turrets.
  3652. 2:20:29This is a pretty hectic game.
  3653. 2:20:39The tower has fallen. So obviously we
  3654. 2:20:42just got overwhelmed. I mean look at how
  3655. 2:20:45many blobs were there. So this is what
  3656. 2:20:47the game will look like when we're at a
  3657. 2:20:49later level.
  3658. 2:20:51And this is pretty cool how the game
  3659. 2:20:52just pauses.
  3660. 2:20:54We basically get a freeze frame
  3661. 2:20:56of our death.
  3662. 2:20:58Congratulations, you just finished this
  3663. 2:21:00video. We are now done. You now know how
  3664. 2:21:02to take AI and connect it to Unreal
  3665. 2:21:05Engine to start getting those benefits.
  3666. 2:21:07So don't forget to like and subscribe.
  3667. 2:21:09Also follow me on X because there will
  3668. 2:21:12be a lot more AI game development news
  3669. 2:21:14and tutorials in the future because
  3670. 2:21:17we've never seen such a large change in
  3671. 2:21:19the game development industry as of
  3672. 2:21:22right now. If you were to tell me 4
  3673. 2:21:24years ago that an AI would be able to
  3674. 2:21:27think to itself an artificial
  3675. 2:21:28intelligence and create a game in Unreal
  3676. 2:21:31Engine from start to finish, I would
  3677. 2:21:34have said you were lying. Well, now here
  3678. 2:21:36we are. Artificial intelligence can
  3679. 2:21:39actually do that and that is such a
  3680. 2:21:41seismic shift in the industry. We will
  3681. 2:21:44all navigate it together. So let me know
  3682. 2:21:46what you think in the comments section
  3683. 2:21:48below and I'll see you in the next
  3684. 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.