Unity DOTS: System Base

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

ความคิดเห็น • 67

  • @martin_isla
    @martin_isla 4 ปีที่แล้ว +1

    I never comment on TH-cam, but you just explained the differences so well I felt like I had to let you know. Thank you.

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว

      Thanks! Glad you enjoyed it. Still waiting on DOTS to mature before we make any more videos...

    • @martin_isla
      @martin_isla 4 ปีที่แล้ว

      @Game Academy.school Yeah, I started learning last week and found things from 6 months ago that are already obsolete. In any case, the content in your channel is more than enough for devs to get the idea behind DOTS (even if things change) and be better prepared when it's officially out. Thanks again!

  • @behnamrasooli8801
    @behnamrasooli8801 4 ปีที่แล้ว +21

    I really love to see someone like you explain how to implement gameplay logic with ECS. Because spawning 10,000 cubes is not the whole part of making a game. I heard that ECS is not only good for performance but also making the gameplay logic easier to write, debug, and extend.

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว +14

      Well, it's different. The classes are shorter, so that makes them easier to debug. You don't have so many classes and subclasses so it's easier to read and debug in that aspect.
      But honestly it's six of one, half a dozen of the other at the moment. It's just a different way of organizing your logic.
      The performance aspect is a big part of it...but the architecture change is needed for a more long-term evolution of Unity. Eventually the Editor will catch up to the current state of using GameObjects and Monobehaviours as far as ease-of-use.
      Anyway, we'll see if enough people are interested in building a complete DOTS mini-project.

    • @jakehix8132
      @jakehix8132 4 ปีที่แล้ว +1

      @@GameAcademySchool Wud love a DOTS project video. Not even a finished mini-project, though... like a rushed dive into doing like a rough RPG or something, showing the bare bones of what different completed systems could look like. Variety > thorough.
      Great vids.

  • @unclerandy398
    @unclerandy398 3 ปีที่แล้ว

    Brilliant explanations, I think if you made a full course there would be a lot of interest.

  • @washynator
    @washynator 4 ปีที่แล้ว +27

    Another excellent video! Loving your DOTS-videos, please keep them coming! :)

  • @thalysantana
    @thalysantana 3 ปีที่แล้ว

    I have searched a lot for DOTS content and this is undoubtedly the best one I found. Great explanations. Amazing series.

  • @RomanNaumov
    @RomanNaumov 3 ปีที่แล้ว

    You made best DOTS-videos I've ever seen. Thank you.

  • @gndevelopment6798
    @gndevelopment6798 4 ปีที่แล้ว

    Take a bow son! Excellent series many thanks.

  • @richerlecool
    @richerlecool 4 ปีที่แล้ว

    Your videos are great for people who actually wanna learn. Someone who needs a quick "how to" would get bored here, but people like me and many others who need to understand the fundamentals before trying to do stuff on our own really appreciate your lessons :)
    So thank you!

  • @xinrutang6883
    @xinrutang6883 3 ปีที่แล้ว

    I like your Unity videos, speaking very clearly and English accent is nice too. Hope you can make more Unity tutorial videos!

  • @wrinklymon
    @wrinklymon 4 ปีที่แล้ว +2

    I actually think I understand the job system in Unity now, thanks! First video that's really clicked with me.

  • @ataro4x
    @ataro4x 4 ปีที่แล้ว +3

    Absolutely lovely series for DOTS and it would be really awesome to see a complete DOTS mini-project. It would motivate me to start project using dots.

  • @shakofarhad876
    @shakofarhad876 4 ปีที่แล้ว +2

    This DOTS series is great! Thank you very much! Please keep them comming. :D

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว +1

      Shako Farhad please share them. Not enough viewers to justify more...

    • @shakofarhad876
      @shakofarhad876 4 ปีที่แล้ว

      @@GameAcademySchool I understand. I'll do my part. Thanks for making such informative videos. They are much appreciated!

  • @Songfugel
    @Songfugel 4 ปีที่แล้ว

    This video was amazing in clarifying the varying techniques in various tutorials

  • @christofstanits
    @christofstanits 4 ปีที่แล้ว +11

    excellently well explained!
    great channel

  • @maezir1808
    @maezir1808 4 ปีที่แล้ว +1

    Great series so far. ECS in Unity was daunting for me at first but you've explained things really clearly. Also +1 for seeing an implementaiton of these concepts in a real game, even if it's just something small like an Asteroids clone.

  • @Ankhtepot
    @Ankhtepot 3 ปีที่แล้ว

    I bought several of your courses because how you teach is really valuable. Thanks! This mini series was awesome too :)

  • @Forjugadname
    @Forjugadname 4 ปีที่แล้ว +5

    Really great tutorial, I've been using this stuff, but with barely understanding it, great explanation.

  • @aaaAaAAaaaaAa1aAAAAaaaaAAAAaaa
    @aaaAaAAaaaaAa1aAAAAaaaaAAAAaaa 4 ปีที่แล้ว +4

    Seriously amazing tutorial, you have taught me more about DOTS and ECS than any of the unity documentation!

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว

      Arcanine300 Thanks! Please share with anyone interested :)

  • @afarman87
    @afarman87 4 ปีที่แล้ว

    Went through the whole series before leaving a comment. I just want to say thank you so much for the great tutorial. Your explanation is so clear and concise. Very easy to digest. Thank you!

  • @DmitriNanaktaev
    @DmitriNanaktaev 2 ปีที่แล้ว

    Awesome! Keep doing what you are doing.

  • @ajnabi-
    @ajnabi- 4 ปีที่แล้ว

    You are an amazing teacher! Very clear and very detailed explanation. Waiting for a full DOTS course on Udemy by you. :)

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว

      Sorry I guess you’re not on the mailing list. Since DOTS fell off the Unity Roadmap so did the course. It’s delayed by at least a year. Just waiting and seeing since DOTS is not leaving preview for a while.

  • @huangrichard8466
    @huangrichard8466 3 ปีที่แล้ว

    Thanks for all the high quality videos. Hope there'll be more courses from you.

  • @RyanDB
    @RyanDB 4 ปีที่แล้ว

    THANK YOU! With everything changing so quickly, this is the first I've even heard about this, and it's super useful to know

  • @starburstdragon
    @starburstdragon 4 ปีที่แล้ว

    Excellent stuff on this channel thx for sharing

  • @lkhprime
    @lkhprime 4 ปีที่แล้ว +4

    Yeah!!!

  • @chenbin0802
    @chenbin0802 3 ปีที่แล้ว

    Thanks for the video.
    5:31 when I change ref to in, I got a compile error.

    • @chenbin0802
      @chenbin0802 3 ปีที่แล้ว

      Also 6:21, also converted from ComponentSystem to JobComponentSystem. the job still only run on mainThread. my fps is still low, even lower than ComponentSystem way.

  • @LukibillyBase
    @LukibillyBase 4 ปีที่แล้ว

    Do you have to complete the jobs in SystemBase?
    Amazing series btw

  • @smgvlad
    @smgvlad 4 ปีที่แล้ว

    Excellent. Please show a basic game whenever possible, using SystemBase approach.
    thanks

  • @AM-dj4vp
    @AM-dj4vp 3 ปีที่แล้ว

    wow, AMAZING!

  • @JxcksonSF
    @JxcksonSF 4 ปีที่แล้ว +1

    Cant wait to dots be fully implemented.
    Even if i try now, every tutorial on the internet use a different sintax 😂😂😂
    so i will wait the 1.0 and than convert my project.

  • @sdv-51
    @sdv-51 4 ปีที่แล้ว +1

    bless you

  • @lizkimber
    @lizkimber 4 ปีที่แล้ว +2

    Id love to see how to make a system that runs on one lot of entities such as turrets, and finds each ones nearest entity of type mob

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว +1

      That is actually the perfect type of thing to use this for

  • @shirosurfer8864
    @shirosurfer8864 4 ปีที่แล้ว

    Please do more, make one using triggers and command buffers to add components please
    When does the course come out?

  • @shenshaw5345
    @shenshaw5345 3 ปีที่แล้ว

    So I should just use system base instead of jobs?

  • @w-hellhaus
    @w-hellhaus 4 ปีที่แล้ว

    Thank you so much for these videos, they've been really helpful for learning. I'm using the 0.11 for entities right now though, and my worker threads aren't doing any work with the JobComponentSystem, it's still all being done in the main thread. I've tried looking at the changelogs between versions, but I haven't really found a reason why this is happening, Is there anything you could point me towards to explain what might've changed in between versions?
    Update: Nevermind, turns out I was viewing my profiler wrong and wasn't scrubbing correctly to see what was happening while it was actually in play mode and was just seeing what was happening before and after exiting play mode

  • @nanami-dl7eh
    @nanami-dl7eh 4 ปีที่แล้ว

    Using Entities.Foreach will burst automaticaly?

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว

      If you’re using the Jobs System, Burst enabled is default. But stuff running only on the main thread is not Burst compiled

  • @omgawesomeomg
    @omgawesomeomg 2 ปีที่แล้ว

    Is there any reason to Jobify a System when running it on the main thread with .Run() ? There wouldn't be any performance benefit, right?

  • @iamarugin
    @iamarugin 4 ปีที่แล้ว +1

    You do not need [AlwaysSynchronizeSystem] in the SystemBase when using Run

  • @simon000winter
    @simon000winter 4 ปีที่แล้ว

    Hey, inb4 nice clean tutorials! I have a bunch of questions i hope you or someone else can explain me:
    1. Having Time.ElapsedTime outside the job implies, that all jobs use the same time stamp. So is it guaruanteed that all the jobs get executed that very frame i shedule them?
    2. Does a ECS only game make sense? i mean, i have no grasp on how to apply ECS and the jobsystem to character control for example. Is combining ECS and the old way a thing? like exclusivley use ECS for things that get updated/used often, but things that exist just once can still be normal GameObjects?
    3. As concrete question, let's say i want to implement the marching cube algorithm (voxels), where do i actually put the instiantion of the mesh? does that belong into a system if i create topology?
    do i have to split up the voxel grid into chunks to make use of the jobsystem?
    Thank you in advance for every comment and help!

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว +1

      1. You're passing the timeElapsed as a float into the Job. The Job is not correlated to the World clock. It's just passing in a value as you throw the Job into the Job Queue when you Schedule. You would hope that it can run the same frame but there's no guarantee of that. It's just done when it's done. If it's super critical and absolutely needs to match the World clock, you should run on the MainThread instead of using a Job.
      2. From what I have seen, you'll still need some Monobehaviours as a jumping off point. Some degree of game management that ties you back to the Editor. Often you will have some static settings or values.
      You can still use methods from the UnityEngine within ECS. For example, you can pass Input as data into a System. That way you can drive your player using ECS. But those need to execute those on the Main Thread, so just use Run() instead of Schedule or ScheduleParallel

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว +1

      3. You can definitely use the EntityManager to Instantiate Entities at runtime. I think we just used the Spawner Monobehaviour in this example because it was simpler. But yes, you can just make a System for that. I mean all Logic runs in a System, so that's where you put it.

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว +1

      Also what I didn't mention in these videos, you don't have use the Entities.ForEach query for everything. It's just a common way to do stuff to check on the existing Entities. You also could schedule a single Job.WithCode if you just want to schedule a single bit of logic.
      Or just do whatever you want in the other parts of a SystemBase. Just like a Monobehaviour has Awake/Start/Update/etc, a SystemBase has OnCreate, OnStartRunning, OnUpdate, OnStopRunning, OnDestroy. Use those the same way. OnUpdate is the only method that is mandatory to implement. That's why we show it here.

  • @lizkimber
    @lizkimber 4 ปีที่แล้ว

    interesting when I do an JobHandle jh = Entities.Foreach ... it tells me it returns a void and I cannot get the job handle for it....

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว

      Make sure you are using a Job and not running it on the Main Thread

    • @lizkimber
      @lizkimber 4 ปีที่แล้ว

      @@GameAcademySchool well schedule and scheduleparrallel are supposed to return jobhandles right?? .. Im also finding major restrictions in what i can do inside the foreach, even more than before.. as an example, I want to get a list of entities, positions and health points, and then itterate through turrets and pick the closest to each turret and zap it down 5 health, and then obviously update the original entities with health points to say how many they lost....

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว

      @@lizkimber You need to use this.Dependency when using Schedule or ScheduleParallel if you want a JobHandle back. e.g. ScheduleParallel(this.Dependency); Then you will need to use the JobHandle methods to combine them and set this.Dependency to whatever your final JobHandle is.
      Otherwise, use the automatic dependency by just putting the Entities.ForEach queries in order, which is probably what they are pushing us to do.

  • @richardbiely
    @richardbiely 4 ปีที่แล้ว

    Just a note - it’s not C# job system. It’s Unity3D job system. Those are two very different things.

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว +2

      docs.unity3d.com/Manual/JobSystem.html
      Sorry, I didn't name it. Unity calls it the "C# Job System" -- you'll need to take it up with their Marketing and Tech Documentation departments. :)

  • @Ziboo30
    @Ziboo30 4 ปีที่แล้ว +2

    With the new SystemBase I don't think you need the [AlwaysSynchronizeSystem]

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว +2

      Robin Bonhoure correct. Sorry that was an error on my part

  • @mrbinggrae5954
    @mrbinggrae5954 4 ปีที่แล้ว

    I need Korean subtitles.

    • @GameAcademySchool
      @GameAcademySchool  4 ปีที่แล้ว +1

      binggrae Mr unfortunately somebody will need to contribute those. TH-cam creates English only by default

  • @sconosciutosconosciuto2196
    @sconosciutosconosciuto2196 4 ปีที่แล้ว +1

    :D