I Made an RTS Game with Unity DOTS + ECS

Поделиться
HTML-код
  • Опубликовано: 29 янв 2025

Комментарии • 88

  • @boul3ez4
    @boul3ez4 Год назад +16

    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  Год назад +3

      Thank you so much! I've been having a ton of fun too 😀

  • @GumGuts
    @GumGuts Год назад +1

    Thanks!

  • @VADIM-SOLOV
    @VADIM-SOLOV Год назад +4

    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  Год назад +2

      Thanks for the kind words and great to know you'd like to see some related tutorial videos!

  • @TREXYT
    @TREXYT Год назад +1

    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  Год назад +1

      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 Год назад

      @@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 11 месяцев назад

      ​@@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.

  • @mehmedcavas3069
    @mehmedcavas3069 Год назад +3

    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  Год назад

      Closest thing I have right now is the Zombie tutorial - ruclips.net/video/IO6_6Y_YUdE/видео.html

  • @aleixcotsmolina6230
    @aleixcotsmolina6230 Год назад +1

    Amazing! I love your DOTS tutorials, you're doing a great job.

    • @TurboMakesGames
      @TurboMakesGames  Год назад +1

      Thank you so much! I'm having fun making them 😀

  • @walkerdev1
    @walkerdev1 Год назад +1

    So useful, literally was trying to learn this starting last week

  • @rambertoeco8930
    @rambertoeco8930 Год назад +5

    Great job, man. I--and many other, I believe--would love to see some tutorials made from this project

    • @TurboMakesGames
      @TurboMakesGames  Год назад +5

      Thank you much! Definitely seems like there has been some good interest in people wanting to learn more about how this project was made 😊

  • @arsalino1116
    @arsalino1116 Год назад +1

    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  Год назад +2

      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 Год назад

      @@TurboMakesGames I see, thank you for explanaining.

  • @GameDevNerd
    @GameDevNerd Год назад +15

    Johnny looks tired like he really did develop a game: Confirmed. 😆

    • @TurboMakesGames
      @TurboMakesGames  Год назад +5

      That's so funny, I did actually record this at like 11 at night which is way later than I normally record 😆😆

    • @GameDevNerd
      @GameDevNerd Год назад +5

      @@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 😅

  • @rubicon7844
    @rubicon7844 11 месяцев назад +1

    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  11 месяцев назад +1

      IIRC the collision detection was a pretty big performance draw and I didn't have much time on the project to optimize around it

  • @JumpCatStudio102
    @JumpCatStudio102 Год назад +2

    @turbo makes games: how dots perform on mobiles platform atm (especially in regards to stability) ?

    • @TurboMakesGames
      @TurboMakesGames  Год назад

      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.

  • @aleixcotsmolina6230
    @aleixcotsmolina6230 Год назад +1

    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  Год назад

      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.

  • @WorstDeveloper
    @WorstDeveloper Год назад +1

    What is the benefit of using the Agents Navigation package over just the NavMesh stuff that is built into Unity?

    • @TurboMakesGames
      @TurboMakesGames  Год назад +1

      I recently did a video on this asset that goes into much more detail about what it is and why it is useful - ruclips.net/video/kGgDQiQkKf8/видео.html
      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 Год назад

      @@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.

  • @testitestmann8819
    @testitestmann8819 Год назад +1

    This looks amazing. Any chance to get a tutorial style walkthrough of how you made it?

    • @TurboMakesGames
      @TurboMakesGames  Год назад +2

      I'll likely be breaking out different sections of the project into their own dedicated tutorials for all the important bits 😊

    • @ducksuper9058
      @ducksuper9058 Год назад

      @@TurboMakesGames So glad to hear that,and may I ask is there any time schedule for this?

  • @kraythe
    @kraythe Год назад +1

    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  Год назад

      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

  • @n00bstude
    @n00bstude Год назад +2

    Super cool! Did you consider determinism when developing?

    • @TurboMakesGames
      @TurboMakesGames  Год назад

      Thanks! Determinism in what sense? I didn't do anything specifically, but Unity ECS has some deterministic qualities by default.

  • @Grumpy_Muppet
    @Grumpy_Muppet 7 месяцев назад

    I will pay good money to have this as a course. RTS is my favourite genre and I like to make something!

  • @LukeAps
    @LukeAps Год назад +1

    Welldone Johnny!

  • @DũngQuang-d4e
    @DũngQuang-d4e Год назад

    hi, in 14:55 how did you make the minotaur attack two units ?

    • @TurboMakesGames
      @TurboMakesGames  Год назад

      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.

  • @jfkenz2713
    @jfkenz2713 Год назад +1

    when the offer will end?

  • @hollowlabs8671
    @hollowlabs8671 Год назад +1

    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  Год назад

      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!

  • @Schlauewurst
    @Schlauewurst Год назад +1

    Hi, are you going to publish the code?

    • @TurboMakesGames
      @TurboMakesGames  Год назад

      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

  • @georgebratu
    @georgebratu Год назад +1

    Can we have pls the project source code (without the paid assets) ?

    • @TurboMakesGames
      @TurboMakesGames  Год назад +3

      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.

  • @Caden_Burleson
    @Caden_Burleson Год назад

    @7:13 you said you baked the ANIMATIONS into a texture!?

    • @TurboMakesGames
      @TurboMakesGames  Год назад +1

      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 😊

  • @_D_D_D_D_
    @_D_D_D_D_ Год назад +1

    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  Год назад

      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_ Год назад

      @@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!

  • @serveladik
    @serveladik 8 месяцев назад

    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

  • @yudanaim6849
    @yudanaim6849 Год назад +1

    Awesome

  • @tony355367
    @tony355367 Год назад

    amazing !!!

  • @kamienel9941
    @kamienel9941 6 месяцев назад

    Great Video I just kinda wished it has more code explanation like in 12:04 especially with ecs parts

  • @ravenbloodwind7254
    @ravenbloodwind7254 Год назад +1

    Hello Mr . Trubo it is possible to share the code of this project with us?

    • @TurboMakesGames
      @TurboMakesGames  Год назад +5

      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 😊

  • @albiceleste101
    @albiceleste101 Год назад +1

    You could have a massive Total War game too

  • @ChrisMoody
    @ChrisMoody Год назад

    Did you forget the links to the assets you used?

    • @TurboMakesGames
      @TurboMakesGames  Год назад

      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 Год назад

      @@TurboMakesGames thanks!

  • @VEETEEGameStudio
    @VEETEEGameStudio Год назад +1

    its the man himself...😃

  • @dungphamtien3255
    @dungphamtien3255 Год назад

    Please analyze "mile high taxi" game

  • @josephseger6053
    @josephseger6053 Год назад +1

    My netcode project broke

    • @TurboMakesGames
      @TurboMakesGames  Год назад

      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

  • @MichaelLee-lu4qq
    @MichaelLee-lu4qq Год назад

    On mobile, Can we do this?

  • @toto3777
    @toto3777 10 месяцев назад +3

    So the whole video is an asset ad sponsored by Unity and peddled by an influencer

  • @lomzogaming3631
    @lomzogaming3631 Год назад

    Hey if you can beat vs AI consistently your plat level

  • @thanatosor
    @thanatosor Год назад

    only Unity guys know how Unity work 😂

  • @seekpodcast
    @seekpodcast Год назад +1

    Algorithm

  • @artemisDev
    @artemisDev Год назад +1

    oof... so much asset store plugs

    • @TurboMakesGames
      @TurboMakesGames  Год назад

      🔌🔌🔌
      They are truly helpful assets though!!