Game Architecture Tips - Event Driven UI - Unity

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

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

  • @HadiLePanda
    @HadiLePanda 4 года назад +4

    I like how this turns out to work remotely by only listening to incoming input and not relying on direct links :)
    Thanks for the video, again really happy to see this kind of architecture ^^

  • @welltypedwitch
    @welltypedwitch 4 года назад +5

    I really like these kinds of videos! I will definitely try this, when I implement UI in my current game :D

    • @DapperDinoCodingTutorials
      @DapperDinoCodingTutorials  4 года назад +1

      I'm glad you like them. Feel free to let me know how it goes when you get around to implementing it :)

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

    not hadey zorkow! it is pronounced Ha-dee zoor- kot 😅 Nice video by the way. keep doing more. these are the best type of tutorials everybody actually needs

  • @beardordie5308
    @beardordie5308 4 года назад +1

    I appreciate seeing how you've separated the logic from the inspector values that get injected so you can do tests. Also, I tend to use event Action and not EventArgs. Not sure what advantages each has.

  • @baconchaney
    @baconchaney 4 года назад +1

    Thanks for the link to the project on this. You run through some aspects really quickly so it's really helpful to be able to read through at a slower pace (a tutorial walking through how to set it up would be really nice).
    How would you go about creating this for multiple players (say for local co op)? Would you have to marry together the instance with the player index ID?
    Great work once again!

    • @DapperDinoCodingTutorials
      @DapperDinoCodingTutorials  4 года назад +2

      The project I'm using for the video is actually not public on GitHub as it's for a game I'm working on in my free time that I do plan on releasing one day. I'm not making this project public but quite a bit of the code is public in my Dapper Tools package. I'm perfectly fine showing people the project but I'd rather not give full access as some people will probably just try to use it as their own game.
      As for local coop, it depends whether you'd want both health bars displayed at once? Or to change depending on the situation? It's up to you. Feel free to elaborate more :)

    • @baconchaney
      @baconchaney 4 года назад

      @@DapperDinoCodingTutorials Totally understand that! It looks really promising from the stuff you have shown so far. I've been looking at displaying each of the players health (amongst other data) at the top of the screen. I can get it working for floating health bars but I'm struggling to wrap my head around how to marry together a player instance if it exists on another object (so when 2 players exist, 2 player healthbars appear, 3 players etc).

  • @theavaliengineer
    @theavaliengineer 2 года назад

    Thanks so much for this amazing tutorial! I'm using this as a reference to code architecture for my own project. One question I still have is why you have a separate HealthSystem and HealthSystemBehavior - I'm not really sure why there's a need to seperate them, nor what the HealthSystemBehavior does. Is there some specific advantage this creates?

  • @wspascoe
    @wspascoe 4 года назад +1

    I have been working in this same thing for my game. Thanks for sharing it shows me a different direction. Question though where is this on your Github. I missed it in the video.

    • @DapperDinoCodingTutorials
      @DapperDinoCodingTutorials  4 года назад +1

      Have a look at the other comment on this video from @Chris Charney where I explained it to him there :)

  • @Hassanali-jr4yb
    @Hassanali-jr4yb Год назад

    I am really new to unity and was looking a way to create a health UI system but do not know how.
    After watching your video just got a very high level idea of how there is a better way then simply using singleton of a system which is really difficult to scale after on.
    But now I need these scripts that you are using to attach Health system & Colider script that takes all the functions like a button does when its triggered and runs all the needed code.
    Can you provide their link of these scripts dipper dano ....???
    I really need it but at this time do not have the logic or experience to create such system on my own.
    Or anyone guide me thoroughly to creat such a system for myself because , I myself is sick of all the unscalable tutorials they only work for a limited things cannot reuse them anyway in the meaning of scalability in the next projects
    and really appreciated this video and trying to learn from it.

  • @blumalice
    @blumalice 4 года назад +4

    Hi Dapper, great to see more of these videos coming out. Developers definitely need to learn about systems like this. They are not the means to all ends, but certainly help a ton. Particularly with modularity and scalability.
    Hope you will continue to expand on the topic and make developers more aware of this kind of architecture. If you like, you can check out my implementation of the architecture and hopefully draw some inspirations for the next video.
    github.com/BLUDRAG/SOFlow

    • @DapperDinoCodingTutorials
      @DapperDinoCodingTutorials  4 года назад +4

      I'm glad that there are plenty of people enjoying this content and encouraging me to create more of it. I'll be sure to have a look at your repo before my next video :D

    • @Ubaidullah-et9my
      @Ubaidullah-et9my 4 года назад

      The main bru!

  • @simzzzz2504
    @simzzzz2504 4 года назад +1

    You don't have a test where you make damage with negative value. If someone will do -10 damage, you will get 110 of total health because you using Mathf.max instead mathf.clamp and ui will get broken :)

    • @DapperDinoCodingTutorials
      @DapperDinoCodingTutorials  4 года назад

      Ah, I must have forgotten to show that part in the video. Inside the damage data struct that passes damage amount, damage type, etc... the setter for damage stops it going below 0. Though now that I think about it, that could have unwanted behaviour when it comes to damage calculation. I'll have to have a think about the best way to implement it :D

  • @NeedsMoreNinjaGames
    @NeedsMoreNinjaGames 4 года назад +1

    Have you taken a look at Unity Atoms at all? (github.com/AdamRamberg/unity-atoms)
    It's based on a talk given by Ryan Hipple at Unity 2017 and takes this kind of abstraction one step further by having the event itself be an asset. Something like that would allow, in this case, the player to be a prefab and fire the event, while have other objects (maybe also prefabs, or scene objects) responding to the event themselves.

  • @mouldor-3843
    @mouldor-3843 4 года назад +1

    Hi, why does your Inspector have a different design from mine, an update?

    • @micaiahstevens8840
      @micaiahstevens8840 4 года назад

      Didn't see the UI, but its probably Odin, it drastically changes things around. Shows different things, and colors them. VERY different. BUT its a pretty expensive paid asset, but does a lot of cool things.
      Honestly love what it does, just hate the look of it.

    • @mouldor-3843
      @mouldor-3843 4 года назад

      @@micaiahstevens8840 Hi, thanks for your answer, but i download new version of unity and this is the new design ;)

    • @NinProf
      @NinProf 4 года назад +1

      They reworked the look of the UI in Version 2019.3

    • @DapperDinoCodingTutorials
      @DapperDinoCodingTutorials  4 года назад

      It's true that I do have Odin which changes some aspects of the inspector such as lists, but the main changes you see are as @Ninja_Professor says from the 2019.3 Unity release

  • @th3terminator774
    @th3terminator774 4 года назад +1

    First