Transcript of Сделал игру с JEV: 3D RTS с нуля на Unity, где юниты думают сами
Студия Игор
0:00Today I have an exclusive prepared for0:02 you. I have received early access to0:04 the new generation neural network, Jeff0:05. We will create a Warcraft-style RTS0:08 in 3D using Unity without any0:09 ready-made assets. And every unit in0:11 this game will have its own brain based0:13 on a neural network. All this and much0:15 more in this video. It’s going to be0:17 interesting. Hello everyone and welcome0:23 to the Game Studio channel. My name is0:25 Igor, and today we are going to make a0:27 game. There will be a lot of0:28 interesting things in today’s video.0:30 We will build a 3D game in Unity from0:32 scratch without using any pre-made0:33 assets, and I will show the entire0:35 process. You can often see similar0:37 videos on my channel, but this0:39 particular video is special. A new0:40 generation neural network, Jeff, was0:42 recently released. The public release0:44 hasn't happened yet at the time of0:46 recording, but I managed to get early0:48 access. So what kind of neural network0:50 is this? Former OpenAI researcher Hugo0:52 Almeida, who worked on research that0:55 helped create ChatGPT, co-founded a0:58 company called Typeesave AI with Erik1:01 Gaffney and Sasha Shen. For 2 years,1:05 the company worked in stealth mode, and1:07 on September 15, 2026, they unveiled1:09 their first neural network, Jeff, while1:11 simultaneously announcing a $ 401:13 million investment. Jeff is not a1:15 competitor to ChatGPT. This neural1:18 network is not designed for1:19 conversation or writing text. Its task1:21 is to make decisions within a program1:22 in a fraction of a second. How does it1:25 work? You provide the model with1:27 free-form context of up to 32,0001:29 tokens and three types of actions to1:31 choose from: answering yes or no,1:33 choosing from provided options, or1:35 rating on a scale, for example, from1:37 one to 100. The scale can be anything,1:40 and you receive an answer in less than1:42 100 milliseconds. The developer company1:45 claims that requests take 701:46 milliseconds on average to process.1:48 That is about twice as fast as it takes1:51 a human to blink an eye. And in terms1:53 of intelligence, the company claims1:55 this model is at the level of GPT 5.6.1:59 They also say that it is completely2:00 free of hallucinations. They are, in2:02 principle, impossible at the2:04 architecture level. This model costs 42:06 cents per million input tokens. Output2:08 tokens are free. Suggested areas of2:11 application include risk analysis, data2:13 categorization, fast decision-making,2:15 and so on. But we are interested in how2:17 this neural network can be used in game2:19 development. The idea, in fact, has2:21 been in the air for a long time. To2:23 make a game where your opponent is AI.2:26 But I decided to go even further and2:28 make a game where every unit is an AI.2:30 Literally making every decision. No2:32 pathfinding algorithms, state machines,2:34 or anything else we are used to seeing2:36 in games. I am going to equip every2:38 unit with sensors so it can see the2:40 world in real time and understand what2:43 is happening. Then we will give units2:45 commands, for example, to build a house2:47 or attack an enemy. And this is where2:49 the most interesting part begins. The2:51 unit will decide how to execute the2:52 command and whether it should be2:54 executed at all. For instance, a worker2:57 might realize there isn't enough wood2:59 to build a house and go chop wood first3:01, while a warrior might refuse to3:02 attack or flee the battlefield if the3:04 enemy has a numerical advantage. To3:07 test the idea, we will build a test3:10 project and connect Jeff to it. To do3:12 this, we'll open the code, describe the3:14 game concept, and set the task to run3:16 100 simulations—individual scenarios3:19 or small real-time strategy sessions at3:21 the data level—where Jeff will make3:23 all the decisions. GPT-6 Astra prepared3:25 the test bench, and a couple of hours3:27 later, I received a response that the3:29 experiment was completed successfully.3:31 Now I will show you roughly how this3:33 works. The neural network put together3:35 this RTS base defense test bench. Here3:38 we have the context that we feed into3:40 the input. Enemy units are approaching3:42 from the north. There are eight of our3:44 units left, and 21 enemy units.3:47 Reinforcements in 40 seconds, and a3:48 description of the terrain. And we ask3:50 questions. You can ask several of them.3:53 Choose a tactic: defend, attack, or3:55 retreat. Assess the threat level3:57 according to specific criteria and3:59 answer the question: does the number of4:01 enemy units exceed ours? I press the4:03 run button and get an answer in less4:06 than a second. Tactic: defense; threat:4:08 significant and even critical. And with4:11 99%probability, there are more enemy4:13 units. You get the idea. The entire4:16 game will be built on the foundation of4:17 these kinds of request-response cycles.4:19 Alright, the math is finished. Let's4:21 start making the game. And the first4:23 thing we'll do is choose the setting.4:24 After the Great Eclipse, the world4:26 plunged into eternal twilight. Humans4:28 survive around campfires and fortified4:30 settlements, while the undead rise from4:32 the infected forests and fog. Both4:35 sides fight for the last safe lands,4:37 resources, and control over ancient4:39 ruins. This will be a small RTS on one4:42 map with two factions: Humans and4:44 Undead. Both have the same set of units4:46—worker, warrior, and archer—but4:48 different models and visual styles. The4:50 main feature: each unit is controlled4:53 by Jeff and makes its own decisions,4:55 but you already know that. I asked it4:57 to create an image of the game concept.5:00 This is what I got. This, of course, is5:03 no good at all. I send the image to the5:05 chat and write: "Redo this, it doesn't5:06 look like a game at all." After a5:08 couple of iterations, I got something5:10 like this. This is better; we will work5:12 with this. Next, I ask it to create a5:14 list of all building models for both5:16 factions, environmental items, and to5:18 generate the units. You can see the5:20 results on the screen. In parallel, I5:25 am still fine-tuning the core part of5:27 the game. For example, I ask it to add5:29 morale and make the undead scary but5:30 weaker, while humans are a bit stronger5:32 but can be afraid of the undead. I'm5:34 not actually making the game yet. It's5:35 just that I still have data-based game5:37 session simulations running in my5:39 codebase. I also asked to check unit5:41 group movement separately, but we'll5:43 test that in the game itself later. By5:45 the way, after running all the5:47 simulations, the Jeff model usage page5:49 showed zeros, but I rejoiced too soon.5:52 The data arrives there with a delay. I5:54 spent about 5 dollars on all the5:55 simulations. We will make all the5:57 building and unit models in 3P AI. I've6:00 already registered, and all that's left6:02 is to pay for the subscription. To pay6:04 for subscriptions to various neural6:06 networks, you might need a bank card.6:08 That's why I want to tell you about the6:10 sponsor of this video, the company6:12 Zarub. It’s a service where you can6:14 get a virtual card to pay for6:15 subscriptions to a wide variety of6:17 services. And all this happens right in6:19 Telegram. No verification is required6:21 to issue a card. You can top up the6:23 balance in rubles via SBP. And if6:26 someone finds crypto more convenient,6:27 that option is available here too.6:29 After issuance, you get the card6:31 details and pay for the subscription6:33 yourself in your account. 3D Secure6:35 works for confirming payments with a6:37 one-time code. There is no monthly6:40 maintenance fee. You can check the6:42 issuance cost and commissions in the6:44 service itself. And if you need help6:46 with a subscription payment, the bot6:48 has step-by-step instructions for6:50 various services. Get your card using6:52 the link in the description or scan the6:55 QR code on the screen, and use the6:56 promo code "Game Studio" to get a6:58 discount on card opening. So, the7:03 subscription is purchased. Now I can7:05 generate assets. I’ve identified two7:07 ways to work with it for myself. First:7:09 generate a model in maximum quality7:11 with a high-resolution texture and then7:14 do retopology. That's how I made all7:16 the buildings for the game. Using7:17 references like these, which ChatGPT7:19 prepared for me. One such generation7:22 costs 55 credits, including the texture7:24. You can see the results on the screen7:26. This, for example, is the human town7:28 hall, and this is the undead town hall.7:30 Plus, retopology will cost another 357:32 credits. In total, one building cost me7:35 about 90 credits. Yes, I know, it's7:37 expensive; it could be cheaper, but7:39 while you’re setting it up and7:40 finding the right configuration, all7:42 your credits are burned on failed7:43 attempts. For comparison, this is the7:45 town hall model that GPT6 Astra made in7:47 the codebase using the same reference.7:53 But for units, I used a different7:55 approach, generating them with the7:56 required triangle count and texture7:58 right away. That cost about 40 credits8:00 per generation. Next, we will do the8:02 animations. For this, there is the free8:05 Mixamo library, where hundreds, if not8:06 thousands, of animations are available8:08 to download and animate your 3D models.8:11 All of this is available, including for8:13 commercial use. I asked GPT in the8:15 codebase to animate my knight and8:17 create a web page preview with all the8:18 animations. And that was when I8:21 realized I had made a fundamental8:22 mistake. The 3D model was already posed8:25 during generation, and items like the8:27 sword or shield were part of the8:29 character's overall mesh. GPT6 Astra8:31 did a great job, even separating the8:34 characters and items into different8:36 models, but artifacts remained, like a8:38 piece of a leg on the shield or a hand8:41 floating separately. So I asked it to8:44 generate images of all the characters8:46 in a T-pose with their arms spread, and8:48 all the items separately. This is what8:50 the skeleton swordsman model looks like8:52 in a T-pose. I also generated all the8:54 weapons and items separately. And here8:56 is the result. I think it turned out8:58 really cool. GPT6 Astra set up the9:01 skeleton for animation in Blender9:02 itself and transferred animations from9:04 Mixamo onto the characters I generated9:06 in Tripo, having first downloaded them9:08 via the built-in browser. By the way,9:11 on the screen you can see the9:13 skeleton's animations, and the cloth9:14 between the legs works properly and9:16 doesn't move with them. When working in9:18 Blender, Astra can not only place bones9:20 and transfer animations but also assign9:23 weights so only the necessary parts of9:25 the model are affected. Done. All9:27 characters with all animations are9:29 prepared for import into Unity. Next, I9:31 ask Astra to create all the environment9:33 assets for the game based on the9:35 reference we prepared earlier. Once9:37 everything is ready, I ask for a 3JS9:40 scene to see roughly how it will look9:43 in the game before I import everything9:46 into Unity. We will do this in ultra9:48 mode. And this is the really cool9:50 result I got. I didn't even notice at9:52 first that I forgot to add the building9:54 models I generated in Tripo to the9:56 project folder. So GPT6 Astra made the9:58 houses procedurally as well, just like10:00 all the other environment objects.10:02 Nevertheless, the result turned out10:04 really cool. You can rotate the scene10:06 and examine the details. Again,10:08 everything you see here was made by GPT10:10 in Blender, except for the character10:12 models. I decided to add the building10:15 we made in Tripo, expand the scene four10:17 times over, and create spots in the10:19 corners for future bases for both10:21 factions. In the process, ASTRA runs10:23 various checks and optimizations,10:25 measures rendering speed, and optimizes10:28 the geometry. Done. Let's look at the10:30 result. Here we have the human base,10:32 the undead base, the old bridge, the10:34 sawmill, the Gold quarry, and many10:35 other points of interest. This is10:37 exactly how the map will look in the10:39 game. And now we are finally ready to10:41 start moving all of this into Unity. I10:44 will prepare a separate package for10:46 Unity, and you will be able to use all10:48 these assets for your game. The link10:50 will be in the description. If you like10:52 what I do, you can support the channel10:54 on Boosty, either by subscribing or10:55 making a one-time donation. You can see10:58 the QR codes on the screen. Next, I11:00 simply ask GPT-6 Astra on CodeK to11:02 build me a level in Unity, but without11:04 any game mechanics for now. To develop11:07 the game in Unity, I will use the11:09 official Unity plugin in CodeK. You can11:11 install it, too. To do this, go to the11:13 plugins tab, find Unity, click the plus11:15 sign, and you’re all set. In a new11:17 session, you can click the plus, select11:19 the Unity plugin, and start writing11:21 prompts for your game development.11:23 After some time, the level was ready.11:25 In Unity, it looks better than the11:27 preview in 3GS in the browser. But we11:30 won't stop there. Next, I ask it to11:32 work on the world, to add twilight,11:34 lighting, fire, weather, water, wind,11:37 and so on. We’re working on the11:39 overall feel of the game. We’ll even11:41 add glowing eyes for the undead. And as11:43 soon as everything was ready, I asked11:44 it to make a short video, a11:46 presentation of the game level. You can11:48 see the result. The clip is 30 seconds11:50 long and shows the main locations and11:52 characters. The clip was rendered11:54 directly in Unity. The camera flew11:56 through the level scene and recorded11:58 the video. That’s it, now we’re12:13 making the game. I write a prompt as12:15 long as this one. In a nutshell, it12:17 needs to study the simulations I ran on12:19 Jeff. Gather all the data from there12:21 and build a game based on it, where12:23 every unit has its own neural brain12:25 based on Jeff, with no state machines12:27 or pathfinding algorithms. All12:29 decisions made in the game will work12:31 solely at the level of requests to Jeff12:33. Regarding pathfinding. In another12:35 video of mine, where I was making a12:37 strategy game, I already ran similar12:39 tests where a large number of units had12:41 to get from point A to point B through12:43 a narrow corridor. I decided to check12:45 if Jeff could handle this task. Yes,12:47 the units were able to go through the12:49 corridor one by one and stop at the12:51 destination. One of the test criteria12:53 was that the units shouldn't move for12:55 10 seconds after finishing the path, so12:57 they wouldn't run in circles and12:59 instead hold their formation. Jeff13:01 successfully handled that as well. As13:04 the game development progressed in13:05 Unity, I slowly tested it and wrote13:07 refining prompts to add some minor13:08 improvements. I even moved a couple of13:12 objects on the level myself to free up13:13 more space for the base or roads,13:15 although the map had already been made13:17 by Astra very well and logically. The13:20 result is a Unity project where13:21 everything is built with prefabs, all13:23 files are logically organized in13:24 folders, and the level scene is neatly13:26 assembled and configured in the editor,13:28 with each faction's starting location13:29 determined by the position of the town13:31 hall on the map. Well then, it’s time13:33 to play the game. I’m launching it13:35 right in the editor, and for the first13:37 test match, I’ll play as the humans.13:39 Right from the start, we have the town13:40 hall available as a building, and one13:42 worker as a unit. I sent him to chop13:44 wood, hired more workers, built a13:46 couple of houses and barracks, and13:47 decided to do a knight rush for a quick13:49 win. The graphics turned out really13:52 cool. Weather effects like rain,13:55 lighting, fire, wind, water. Everything13:57 looks quite beautiful. Nevertheless, I14:00 discovered a bunch of problems in the14:02 first game. The units seem to derp out14:04 for long periods. A ton of money is14:05 spent on GPT requests. I attached a14:08 cost counter for the game in the top14:10 right corner so that I could watch the14:11 money being spent in real time. All of14:14 this was lagging quite a lot. The fog14:16 of war wasn't working properly. I14:17 somehow made it to the enemy base with14:19 my knights and eventually managed to14:21 defeat them. Half of my knights got14:23 lost in the forest on the way. I was14:24 lucky the enemy put up no resistance14:26 because they were also derping out14:28 somewhere. I fixed all these problems,14:30 and we’ll play the second match as14:32 the undead. First, I'll send a worker14:35 to chop wood to clear space for the14:37 barracks. In parallel, I'll hire a14:39 couple more. I'll send one to build14:41 houses and another to mine gold. I14:43 think a couple of houses will be enough14:44. Once the barracks and houses were14:47 built, I sent all three workers to mine14:49 gold, and I’m hiring 17 knights to14:51 attack the enemy. Everything you see14:54 now, the way the units behave in the14:57 game, they do it based on a neural14:59 network that makes a decision once per15:01 second based on game data. I split all15:04 the knights into two groups. I lead one15:06 group through the forest to the western15:08 bridge and the other group along the15:10 road to the eastern one. I set up rally15:12 points there for the two squads. We15:14 will attack from two sides. As soon as15:18 the army was ready, I sent out one15:20 scout unit each to scout the paths to15:22 the enemy base, so it would be easier15:24 to move through explored territory15:26 instead of the fog of war. Then I send15:30 both squads on the offensive. And now15:33 the first battles have already started15:35 at the top. The enemy prefers archers,15:37 and they attack from a distance. Some15:41 of my units are fighting, while some15:42 are watching from the sidelines. They15:44 can refuse to follow orders. In the end15:47, their neural brain decides everything15:49. Meanwhile, the second squad attacks15:52 from the east, breaks through the15:53 enemy's defensive line, and starts15:55 attacking everything around quite15:57 briskly, including buildings. The enemy16:00 doesn't give up and tries to rebuild16:02 for a while, but I manage to overwhelm16:04 them with numbers. The battle lasted16:08 for several minutes, and in the end,16:09 after destroying the enemy town hall,16:11 we are greeted by the victory screen.16:13 That’s how the game turned out.16:15 According to the counter, this game16:17 session cost me a little over 3 dollars16:19. That's about two to three times more16:22 than my initial estimates, but I think16:23 there is still room for optimization.16:25 And now let's quickly run through the16:27 development costs of the game itself.16:29 As usual, I’ve prepared this landing16:31 page, where information about the16:33 game’s development is presented. I16:35 don’t think we’ll go over it in16:36 detail. In short, the entire creation16:38 process can be divided into 10 stages.16:41 We started with a simulation and ended16:43 up with a full-fledged game prototype,16:45 solving a large number of various16:46 interesting tasks along the way. In the16:49 end, the cost of the game, in terms of16:51 AI expenses, came out to 900 dollars.16:54 Regarding token usage: 15 million input16:56, 600 million cache, and almost 316:58 million output. As for the subscription17:02, I spent about 70%of the weekly limit17:04 on the 200-dollar OpenAI subscription.17:07 So, my actual out-of-pocket costs were17:09 35 dollars plus the ChatGPT17:11 subscription, plus 15 dollars I spent17:14 on the GPT experiment. Well, that’s17:16 the interesting experiment we ended up17:18 with. This isn’t a final game, but I17:20 tried to make it look good so you’d17:22 find it interesting. Actually, I’m17:24 even a bit surprised that the17:26 experiment turned out more or less17:28 successful, and I managed to beat the17:30 game, where every unit literally moved17:32 by feel and made decisions on its own17:35 once per second. You won’t be able to17:37 play the game without a GPT API key,17:38 but I’ll upload all the source code17:40 to GitHub, and the link will be in the17:41 description. If you manage to get an17:43 API key, you can try it out yourself.17:46 In addition to the game's source code,17:48 I’ll publish a package with all the17:50 assets, 3D models, textures, and17:51 animations. Feel free to take it and17:54 use it for your own purposes. Hit the17:55 like button if you enjoy this kind of17:57 content, and leave a comment to let me17:59 know if you liked the experiment and18:01 the game. Subscribe to the channel; it18:03 really helps it grow. And don't forget18:05 to subscribe to the Telegram channel.18:07 You can see the QR code on the screen,18:08 and the link will be in the video18:10 description. See you all later. Yeah.
3,456 words · 513 lines







