I Made an RTS Game with Unity DOTS + ECS

  Рет қаралды 22,934

Turbo Makes Games

Turbo Makes Games

Күн бұрын

🤑 Get these assets for 50% off: assetstore.unity.com/turbo-ma... 🤑
🎯🎮 Play Turbo Wars: johnnyturbo.itch.io/turbo-wars 🎮🎯
👇 List of Assets Used 👇
1. Gridbox Prototype Materials: assetstore.unity.com/packages...
2. POLYGON Sci-Fi Worlds: assetstore.unity.com/packages...
3. Shapes: assetstore.unity.com/packages...
4. Agents Navigation: assetstore.unity.com/packages...
5. GPU ECS Animation Baker: assetstore.unity.com/packages...
6. Adaptive Split Screen: assetstore.unity.com/packages...
7. Epic Toon FX: assetstore.unity.com/packages...
8. DOTS Mesh Slicer: assetstore.unity.com/packages...
9. DOTS Plus: assetstore.unity.com/packages...
10. Flock Box DOTS: assetstore.unity.com/packages...
11. Low Poly Monster Bundle 2: assetstore.unity.com/packages...
12. Fake Interior: assetstore.unity.com/packages...
Bonus: Gimme DOTS Geometry: assetstore.unity.com/packages...
Thank you to the Unity Asset Store for sponsoring today's video! Links to the Unity Asset Store are affiliate links and I may receive a small commission with each purchase - thank you for supporting the Turbo Makes Games KZbin channel!
💬 Join our Discord community: tmg.dev/Discord 💬
💻 My Game Development Setup: tmg.dev/GameDevPC 💻
📸 My Camera Gear: tmg.dev/CameraGear 📸
🎮 Let me know what other topics you want to learn about 🎮
⌚ Time stamps for key topics ⌚
- 0:00 - Turbo Wars
- 0:52 - Inspiration for the Game
- 2:46 - Blocking out the Level
- 4:14 - Creating the Building System
- 5:44 - Unit Pathfinding
- 6:34 - Unit Animations
- 7:39 - Enemy Battling
- 12:28 - Destroying Enemy Bases
- 14:09 - Adding Unit Variety and Polish
- 15:42 - Final Result
🌐 Find Me Online! 🌐
📄 Blog: tmg.dev
👨‍💻 GitHub: github.com/JohnnyTurbo
🎮 Games: johnnyturbo.itch.io/
🦅 Twitter: / turbomakesgames

Пікірлер: 86
@boul3ez4
@boul3ez4 9 ай бұрын
Man, I've been having fun since the beginning. Great stuff! The best of ECS always comes from you. Wishing you even more success!
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Thank you so much! I've been having a ton of fun too 😀
@aleixcotsmolina6230
@aleixcotsmolina6230 9 ай бұрын
Amazing! I love your DOTS tutorials, you're doing a great job.
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Thank you so much! I'm having fun making them 😀
@VADIM-SOLOV
@VADIM-SOLOV 9 ай бұрын
It looks really cool! I am glad that this project is made using Unity DOTS and ECS. I would also be very happy to see tutorial videos on this project on your channel. Thank you for this amazing job!
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Thanks for the kind words and great to know you'd like to see some related tutorial videos!
@walkerdev1
@walkerdev1 9 ай бұрын
So useful, literally was trying to learn this starting last week
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Haha awesome, glad to hear it!
@GameDevNerd
@GameDevNerd 9 ай бұрын
Johnny looks tired like he really did develop a game: Confirmed. 😆
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
That's so funny, I did actually record this at like 11 at night which is way later than I normally record 😆😆
@GameDevNerd
@GameDevNerd 9 ай бұрын
@@TurboMakesGames dude, I've been simultaneously doing contract work, learning Houdini, learning the rigging and skinning tools in Maya and taking care of a baby ... I look like a hobo that's lived a hard life of train hopping right now 😅
@rambertoeco8930
@rambertoeco8930 9 ай бұрын
Great job, man. I--and many other, I believe--would love to see some tutorials made from this project
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Thank you much! Definitely seems like there has been some good interest in people wanting to learn more about how this project was made 😊
@testitestmann8819
@testitestmann8819 9 ай бұрын
This looks amazing. Any chance to get a tutorial style walkthrough of how you made it?
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
I'll likely be breaking out different sections of the project into their own dedicated tutorials for all the important bits 😊
@ducksuper9058
@ducksuper9058 9 ай бұрын
@@TurboMakesGames So glad to hear that,and may I ask is there any time schedule for this?
@LukeAps
@LukeAps 9 ай бұрын
Welldone Johnny!
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Thank you Luke!!
@tony355367
@tony355367 4 ай бұрын
amazing !!!
@yudanaim6849
@yudanaim6849 9 ай бұрын
Awesome
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
I thought so!
@mehmedcavas3069
@mehmedcavas3069 9 ай бұрын
hey turbo, do u have a full dots course? where u finish a game from start to finish with pooling, saving, same mechanics and UI interaction. like a normal unity full game course but with dots
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Closest thing I have right now is the Zombie tutorial - kzbin.info/www/bejne/f4CZkGmPlL6Imqc
@aleixcotsmolina6230
@aleixcotsmolina6230 9 ай бұрын
Hi! How do you handle phyisics? I am having a problem with that because I want to use ICollisionEventsJob but it does not work, and what I am seeing everywhere is that it only works with PhysicsShape and PhysicsBody, which are not available by default anymore (I understand the devs want us to use regular Rigidbody and colliders). Is there any other way to check collisions? Or how are we supposed to handle physics? Would raycasting everything be an acceptable answer? 😂 Thanks!
@TurboMakesGames
@TurboMakesGames 8 ай бұрын
This is a pretty deep topic as there are different ways you can go about it depending on your needs. For this project I was mainly using DOTS physics triggers to detect collisions between the projectiles and the units. By the way you can access the previous physics shape/body components by opening the package manager, clicking the DOTS physics package, and going to the "Samples" tab. But yeah sometimes it would be more appropriate to do a raycast or a collider cast depending on what you want.
@JumpCatStudio102
@JumpCatStudio102 9 ай бұрын
@turbo makes games: how dots perform on mobiles platform atm (especially in regards to stability) ?
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
I haven't done much testing myself as of late - in general being able to process entities more efficiently is a huge win for low-end mobile devices. However, I have heard some people having issues with certain things on mobile with the DOTS physics system in the past, but I am unsure if that is still an issue.
@kraythe
@kraythe 7 ай бұрын
I find your content fascinating. I am wondering how you are perceiving the latest price changes from unity? I am starting to finance an indie studio and although I would prefer to use Bevy, its just not ready and I don't have the budget to make it ready. So I have been looking at Unreal and Unity as possibilities. I am quite interested in your content and wonder if you think that Unity still has the field here or should I look at unreal. I don't need thousands of entities in my game but I do need hundreds.
@TurboMakesGames
@TurboMakesGames 7 ай бұрын
There are definitely a lot of factors to consider and everyone's situation is unique so it is hard to generalize. But I really do think that Unity's ECS is by far the best solution for creating a production-ready game with higher entity counts. Now, depending on what you need to be able to do with hundreds of entities, you may not even need to go fully into a Data-Oriented approach, but it is at the point where you should still consider it. Feel free to shoot me an email if you'd like to jump on a call to chat more about the specifics for your project - contact (at) tmg (dot) dev
@poggchampion
@poggchampion 9 ай бұрын
Super cool! Did you consider determinism when developing?
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Thanks! Determinism in what sense? I didn't do anything specifically, but Unity ECS has some deterministic qualities by default.
@GumGuts
@GumGuts 5 ай бұрын
Thanks!
@TurboMakesGames
@TurboMakesGames 5 ай бұрын
Thank you so much for the support 😀
@WorstDeveloper
@WorstDeveloper 8 ай бұрын
What is the benefit of using the Agents Navigation package over just the NavMesh stuff that is built into Unity?
@TurboMakesGames
@TurboMakesGames 8 ай бұрын
I recently did a video on this asset that goes into much more detail about what it is and why it is useful - kzbin.info/www/bejne/oXjKdYSfhtB-nJo Three main reasons: - It is fully compatible with Unity ECS entities, while the build in nav mesh is not - You can achieve much higher performance as the heavy calculations are done using the C# job system and burst compiler - The code is easy to follow, clean, and well documented allowing you to add in additional behavior as you please
@WorstDeveloper
@WorstDeveloper 8 ай бұрын
@@TurboMakesGames Thanks, that video made me buy the asset. However I wonder what hardware you used to reach that performance. I'm mainly looking to use it for mobile games, which will obviously be way less powerful.
@user-kp5de3zh1g
@user-kp5de3zh1g 9 ай бұрын
hi, in 14:55 how did you make the minotaur attack two units ?
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Great question! Basically when the minotaur completes its attack wind-up/backswing, I spawn an invisible cylinder-shaped entity and have that follow the position of the head of the axe. When the cylinder detects a collision with an enemy, it will deal damage and spawn the damage effect GameObject at the point of collision. The whole attack/damage system is quite interesting and something I'd like to make a video on at some point as well.
@albiceleste101
@albiceleste101 9 ай бұрын
You could have a massive Total War game too
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Sounds like fun 😀
@rubicon7844
@rubicon7844 2 ай бұрын
Hello, looks neat! I have a small question: why did you not use the collision detection in the Agents Navigation plugin? Just to know a bit more about youre thought process
@TurboMakesGames
@TurboMakesGames 2 ай бұрын
IIRC the collision detection was a pretty big performance draw and I didn't have much time on the project to optimize around it
@_D_D_D_D_
@_D_D_D_D_ 9 ай бұрын
Hello, im getting pretty strange behaviour while testing your build. At 100+ units my GPU gets pretty high usage. Furthermore, I have noticed in the Task Manager that GPU used not only from TurboWars process, but also "System" process. Your "zombie tutorial project" don't have such problems on my pc.
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Hello and thanks for giving this project a go on your machine. Since I've recorded this video, I've been able to do a bit more testing into the game and have noticed that the performance drops significantly with lots of the "Boids" units on screen and when running in the split screen mode. Try the project with lots of Marines and Hover tanks as those are pretty much fully ECS based and run the game in single camera mode (Press F1 to cycle camera modes). Curious as to how it runs for you with those changes!
@_D_D_D_D_
@_D_D_D_D_ 9 ай бұрын
@@TurboMakesGames Yes, the problem was in the split screen mode. The second process in task manager, i mentioned earlier, no more drains GPU power and everything run smoothly. Thanks for this info and all your work/tutorials!
@arsalino1116
@arsalino1116 4 ай бұрын
So how exactly do you match the shooting the actual projectile to the animation in regards to timing? And how would you do it for melee attack? like which frames of animation actually check for collision etc?
@TurboMakesGames
@TurboMakesGames 4 ай бұрын
I was going super fast so I kinda just did the hacky thing and hard coded some timing values in for things lol. For melee attacks, I just spawn a separate entity that matches the position of the sword that only exists for a fraction of a second before destroying - if it collides with anything it deals damage, exactly the same as a projectile. Good question though!
@arsalino1116
@arsalino1116 4 ай бұрын
@@TurboMakesGames I see, thank you for explanaining.
@hollowlabs8671
@hollowlabs8671 9 ай бұрын
Funny how i am creating a very similar concept of a game since early 2022. Is this networked? I am still not using dots because i am using mirror for 4-8 players. I am still at 400-500 combating networked units and often thinking about using DOTS/ECS to reach 1k+ maybe i should go for a hybrid solution, but not much knowledge available out there atm. Also i dont know if/how to simply use all my models with this ECS Animation solution, i had problems using them with other GPU instancing solutions. One last question, do you have a tutorial how to approach using scriptable gameobjects with ECS? As i did a very complex SO system were all gameobjects like units, spells etc are managed as/with SOs. Keep up your great tutorials and work about and with ECS and DOTS!
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Cool - sounds like a fun project you've got in the works! No this project is not networked, but I am considering making a multiplayer version of it for a netcode for entities tutorial. I do not believe the GPU ECS Animation Baker supports synchronizing animations over the network at this time. I do not currently have a tutorial for using SOs with ECS, but if you want to do some research on your own, look into blob assets (I do have a few older tutorials on them) as on the code side, they have some similarities to SOs. Hope that helps!
@georgebratu
@georgebratu 9 ай бұрын
Can we have pls the project source code (without the paid assets) ?
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
I likely will not be releasing the code for this project. As an alternate, I'd like to create some polished tutorials on specific topics and systems I used in this project that will be much better learning resources.
@Schlauewurst
@Schlauewurst 7 ай бұрын
Hi, are you going to publish the code?
@TurboMakesGames
@TurboMakesGames 7 ай бұрын
Not for this project as it contains tight integrations with several paid assets which I cannot redistribute. However, I do plan on making some dedicated tutorials on some of the core parts of the code. I just put up a poll the other day to see what kind of project people would want to see me make a full project with Netcode for Entities on and RTS is in the lead, so that may be something to look forward to as well
@ravenbloodwind7254
@ravenbloodwind7254 9 ай бұрын
Hello Mr . Trubo it is possible to share the code of this project with us?
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Likely not just because there are so many paid assets used in this project that connect to most of the core systems. Though I would like to spin off parts of this video into individual tutorials where of course I will be able to share all the code 😊
@TREXYT
@TREXYT 8 ай бұрын
Hey man, i have a zombie game, where my player shoot on zombies, i just want to change instantiate bullet game object to instantiate entity, can you help me ? I find very different the way to code with entitys
@TurboMakesGames
@TurboMakesGames 8 ай бұрын
I'd be curious as to why you would want to do that to just have the bullets as entities? The biggest issue with mixing GameObjects and entities for something like this is going to be the physics systems as the DOTS physics and regular unity physics systems cannot collide with each other. So you'll either need to have a GameObject mirror the position of the bullets anyways to detect collision with the Zombie GameObjects, or you'll need an entity to match the position of all your Zombies to detect collisions with the bullet entities.
@TREXYT
@TREXYT 8 ай бұрын
@@TurboMakesGames oh i didn't knew that, the thing is, i control 1 to 50 players at same time and when 50 players shoot at same time then game become laggy, i thought dots would be a good alternative
@SolWayward
@SolWayward 2 ай бұрын
​@@TREXYT You might have already discovered the solution since this was 6 months ago but for anyone else or just incase. Sounds like you are not pooling your bullets. You need to make a pool of objects for the bullets that are pre instantiated and cycle through them instead of instantiating every time a shot is fired. If you instantiate a bullet every time it is fired, you create a memory and garbage collector overhead among other things that will cause your game to stutter if you do this often.
@VEETEEGameStudio
@VEETEEGameStudio 9 ай бұрын
its the man himself...😃
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
🤩🤩🤩
@jfkenz2713
@jfkenz2713 8 ай бұрын
when the offer will end?
@TurboMakesGames
@TurboMakesGames 8 ай бұрын
August 31st at 8am Pacific Time
@Caden_Burleson
@Caden_Burleson 9 ай бұрын
@7:13 you said you baked the ANIMATIONS into a texture!?
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Yeah crazy right!? The basic idea is that the (X, Y, Z) values for the vertices in the animation can be stored in (R, G, B) values in a texture - that texture can be sampled by the GPU and appropriately deform the skinned mesh. There are some limitations but the performance is extremely high as everything is running on the GPU. Check out the video I just put up today if you want a little more info on this 😊
@dungphamtien3255
@dungphamtien3255 4 ай бұрын
Please analyze "mile high taxi" game
@ChrisMoody
@ChrisMoody 9 ай бұрын
Did you forget the links to the assets you used?
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
The link to my asset store page has most of the assets I used, but I went ahead and updated the description with links to each of the packages!
@ChrisMoody
@ChrisMoody 9 ай бұрын
@@TurboMakesGames thanks!
@MichaelLee-lu4qq
@MichaelLee-lu4qq 9 ай бұрын
On mobile, Can we do this?
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Yes you can build ECS games for mobile
@serveladik
@serveladik 16 сағат бұрын
Unfortunately you did nothing as i understand I really want to find DOTS RTS tutorial, but only i can see here - is bought assets combined
@josephseger6053
@josephseger6053 9 ай бұрын
My netcode project broke
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
Oh no sorry to hear that! Hope you can sort it out soon, or stop by our Discord, I know there are a bunch of people who use netcode on there - tmg.dev/Discord
@lomzogaming3631
@lomzogaming3631 9 ай бұрын
Hey if you can beat vs AI consistently your plat level
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
🏆🏆🏆
@lomzogaming3631
@lomzogaming3631 9 ай бұрын
dev blog would be cool in my opinion, good work!@@TurboMakesGames
@thanatosor
@thanatosor 9 ай бұрын
only Unity guys know how Unity work 😂
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
It is a beast for sure 😆😆
@seekpodcast
@seekpodcast 9 ай бұрын
Algorithm
@TurboMakesGames
@TurboMakesGames 9 ай бұрын
👨‍💻👨‍💻👨‍💻
@artemisDev
@artemisDev 9 ай бұрын
oof... so much asset store plugs
@TurboMakesGames
@TurboMakesGames 8 ай бұрын
🔌🔌🔌 They are truly helpful assets though!!
@toto3777
@toto3777 2 ай бұрын
So the whole video is an asset ad sponsored by Unity and peddled by an influencer
Should You Use DOTS in 2024? (plus what is Unity ECS)
30:15
Turbo Makes Games
Рет қаралды 34 М.
Making a Strategy Game (It's Really a Tactics Game)
6:04
Anders Lundbjörk
Рет қаралды 223 М.
Normal vs Smokers !! 😱😱😱
00:12
Tibo InShape
Рет қаралды 37 МЛН
Intro to DOTS Animation - Unity ECS Tutorial 2023
28:30
Turbo Makes Games
Рет қаралды 20 М.
how RTS games are threatened by technology itself
21:23
Voxel
Рет қаралды 453 М.
I Made Spore 2 Because EA Didn't
34:13
Daniel Lochner
Рет қаралды 674 М.
We Made VAMPIRE SURVIVORS in 2 Engines - Unity & Bevy
19:19
Turbo Makes Games
Рет қаралды 29 М.
Unity DOTS vs Assembly Benchmark - Which is fastest?
30:34
Lingon Studios
Рет қаралды 79 М.
Easy Pathfinding for ECS and MONO [Agents Navigation Asset Review]
16:19
Turbo Makes Games
Рет қаралды 13 М.
I Paid Fiverr Game Developers to Make the Same Game
10:25
BadGameDev
Рет қаралды 592 М.
2 Ways to use UI with Unity ECS 1.0 - Unity DOTS Tutorial 2023
22:38
Turbo Makes Games
Рет қаралды 18 М.