Unity ECS Angry Bots demo - full code walkthrough

Поділитися
Вставка
  • Опубліковано 19 лис 2019
  • Walkthrough of this example by Mike Geig, github.com/UnityTechnologies/....
    I forgot to mention in the video that the enemies are animated by their shader. It's the shader that makes them shimmy, not any MonoBehavior or ECS code.
    The video I mentioned, 'Converting scene data to DOTS': • Converting scene data ...

КОМЕНТАРІ • 37

  • @mikegeig4297
    @mikegeig4297 4 роки тому +48

    It is worth noting that this project was built specifically to be used in a presentation. As such, some of the structure is to make the presentation smoother so I could focus on the information that was relevant to the topic and audience. I say this so you know that not all of this represents "the way you should do it" and instead is meant for conceptual understanding.

    • @mouadovic
      @mouadovic 4 роки тому

      if you say thanks it will be helpful!

    • @user-gl1ls1jx3h
      @user-gl1ls1jx3h 4 роки тому

      Hey Mike! I loved your presentation, probably the clearest explanation of implementing DOTS I've seen so far. I'd love to see more content by you, maybe some youtube videos, about implementing DOTS. For example, you mentioned how the collision system in this project isn't a good way to do it; I'd like to see you elaborate on that and other things you wouldn't have had the time for on stage. Would you ever consider making youtube videos or some other kind of content?

    • @mikegeig4297
      @mikegeig4297 4 роки тому +4

      @@user-gl1ls1jx3h Thanks for the kind words. Making youtube videos was one of the ways I got started, but it is hard to find the time any more. With the collision system, you'll notice that each bullet is checked against each enemy (which is super wasteful). Also, since it fires in a pyramid shape, only the horizontal bullets could even hit an enemy, so many of the checks are doubly wasteful. Also, it is a simple radial check, which isn't very accurate.

    • @michaelbeee3801
      @michaelbeee3801 4 роки тому

      @@mikegeig4297 thanks Mike and thanks Brian. Could you point to an efficient collision system we can kinda copy/adapt to our code?

    • @mikepandolfini8369
      @mikepandolfini8369 3 роки тому

      I find this a bit annoying. It's hand waving like this that contribute to the years-long discussion of "why are you getting input in Update and doing motion in FixedUpdate?" and this can be extremely frustrating to beginners who are using this as sample code from a reliable source.

  • @AndrewErwin73
    @AndrewErwin73 2 роки тому +4

    wow! You found a use for object oriented programming!

  • @mikegeig4297
    @mikegeig4297 4 роки тому +30

    Hey, that project looks familiar! ;)

  • @dribbler8131
    @dribbler8131 4 роки тому

    Hi Mike, How does ECS work with nested prefabs? Like for example I used the RPGHero Free model from the Unity Asset store and it creates 70 entities for 1 model with a ConvertToEntity method, Seems ECS is fine for 1 model meshes but if you have a model consisting of other models. (IE... A house prefab might have windows, doors and walls inside it). I am confused how you access the root and then update all the relevant children components... Nice tutorial though!

  • @user-hn4sf7cn1r
    @user-hn4sf7cn1r 3 роки тому +1

    Helpful video

  • @MalikenGD
    @MalikenGD 4 роки тому

    Great video

  • @sebastianviruzab7986
    @sebastianviruzab7986 4 роки тому

    Hey Brian, what happened to codeschool ? :'( new subscriber here

  • @MaxMustermannDerDritte
    @MaxMustermannDerDritte 4 роки тому

    Hey Brian, I am trying to use ecs in my project, but it wont convert the Meshrenderer. The entities are moving and have a speed but you cant see them.
    Do i miss something?

    • @briantwill
      @briantwill  4 роки тому +3

      Two most obvious questions: 1) In the entity debugger, does the entity have a RenderMesh component? 2) Did you import Hybrid.Rendering?

    • @MaxMustermannDerDritte
      @MaxMustermannDerDritte 4 роки тому +1

      @@briantwill the Hybrid.Rendering fixed it, Thank you very much! Will you also post a tutorial to the fish swarm demo?

    • @childofakingcharity5597
      @childofakingcharity5597 4 роки тому

      @@MaxMustermannDerDritte what version of the Hybrid Render should I use because I'm getting some errors namespace errors

    • @MaxMustermannDerDritte
      @MaxMustermannDerDritte 4 роки тому

      @@childofakingcharity5597 I dont really know anymore, but it was the newes version 4 month ago, what errors are you getting?

    • @childofakingcharity5597
      @childofakingcharity5597 4 роки тому

      @@MaxMustermannDerDritte error cs0103:the name renderpipline does not exist

  • @JohnSmith-ox3gy
    @JohnSmith-ox3gy 4 роки тому +2

    0/5 the gun doesn't shoot out enough glowy stuff.

  • @WangleLine
    @WangleLine 4 роки тому

    What's ECS?

    • @MegaMiley
      @MegaMiley 4 роки тому

      It's the Entity Component System, you can learn about it in the Docs docs.unity3d.com/Packages/com.unity.entities@0.1/manual/index.html :)

  • @sooaolongtian3710
    @sooaolongtian3710 4 роки тому

    hi, where to download this project file?

    • @briantwill
      @briantwill  4 роки тому

      github.com/UnityTechnologies/AngryBots_ECS

  • @jackwhitenoise3943
    @jackwhitenoise3943 4 роки тому +1

    I like the video, but as far as the "Angry Bots 2" I don´t understand why this project was not on the asset store ,
    I think that there is a lot of people unaware that Angry Bots 2 project even exist

    • @MikeGeigTV
      @MikeGeigTV 4 роки тому +1

      Honestly, my team built it to use for demos with the plan being to eventually post it for everyone. Then we got super busy and just haven't done it yet. There still needs to be some general cleanup and maintenance at this point.

    • @jackwhitenoise3943
      @jackwhitenoise3943 4 роки тому

      Sorry for late reply,Thanks for the answer about Angry Bots 2 Mike ,i know you guys have a lot of work,thanks for all the good tutorials and everything ,keep up the good work ,i really appreciate all the help you and the team are giving us every day

  • @tka912
    @tka912 4 роки тому

    it is pure ECS right?

    • @briantwill
      @briantwill  4 роки тому +2

      No, pure ECS isn't really a viable option yet. The player avatar, the gun, the ground, the lights, are all GameObjects. The bullets and enemies are entities.

    • @stormAster720
      @stormAster720 4 роки тому

      it is hybrid ECS

  • @ps5games821
    @ps5games821 2 роки тому

    Make tutorials please

  • @ThePixelitomedia
    @ThePixelitomedia 4 роки тому +1

    unreal entering chat: lol... unreal left chat.