Humble Objects in Unity

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

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

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

    📦 Follow along by downloading the example project code at www.patreon.com/posts/38990018

  • @pritheebecareful6895
    @pritheebecareful6895 4 года назад +78

    Alternate title: Schitzophrenic refactoring unity code.

  • @Rurek47
    @Rurek47 4 года назад +7

    Charles I'm a professional game developer and your channel is the only one that I've seen that provides the knowledge that can be used to design architecture for a bigger project! Thank you!

  • @gabrielkind2970
    @gabrielkind2970 3 года назад +1

    As surreal and deadpan this is, the conversational style was actually really easy to follow. Nice work bruv.

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

    Nowadays, I was trying to find using more "regular c# classes" and i just found out its POCO... I literally couldnt find any information about that around internet with my keywords. But now, I have a full access to these Humble Pattern & Poco keyword.. Thanks a lot Charles, as always, advanced structure video..

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

    Even though the dialog is kind of cringy... I like it. It actually sets a pretty good example for how to collaborate on code with peers in a healthy way. There's nuance in the relationship between Charles and Barles. Charles doesn't condescend to Barles. Barles isn't a bad or careless programmer who makes nightmare mistakes. When Charles suggests something, Barles can immediately see the value and connects it to principles he already understands - Barles is given dignity as a competent programmer and quick learner who just needs a good teacher/peer for new ideas. I can relate to both of them in different situations. This type of nuance is pretty hard to achieve.

  • @TurboMakesGames
    @TurboMakesGames 4 года назад +11

    Great video -Barles- Charles!
    I appreciate videos like this because this is already something that I was kindof doing, but this makes it much more clear about when and why I should be using them.

  • @gunesaydin
    @gunesaydin 4 года назад +43

    Don't you find it weird that Charles always calls when he is needed most. You might need to check your place for listening devices man, someone might be stepping over some boundaries.

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

      The Akinator of real life

    • @RosieSapphireMusic
      @RosieSapphireMusic 3 года назад

      What if Charles is just a figment of his imagination; what if he was somebody who used to help him with his code all the time, but since his death, he's been hallucinating him still helping him to this day.

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

    I am so glad I have found this channel, that's quality content and you are completely different from the "cheap microphone sniffles zombie voice numb 2 hours+ video making" youtubers, and I respect that deeply!

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

    Just wanna say your videos are the best I've found on RUclips, it's all as clean as it gets :)

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

    Infectiously optimistic

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

      until Charles starts making soap in the basement

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

    Cant wait for the introduction of Dharles. His shades are so cool.

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

    Very well put together as usual Charles and Bharles! This might be something to flesh out on the livestreams as well.

  • @JJZzZzZzZ
    @JJZzZzZzZ 3 года назад +1

    this design pattern is brilliant!!!

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

    just learned new things Poco , humble objects and humble object pattern thanks Charles

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

    i love this whole idea of friend advicing you...just brilliant :)

  • @dustypants9326
    @dustypants9326 4 года назад +25

    The important take away is there's a Tavern music playlist on spotify lol

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

      And it’s amazing lol

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

      I thought I was the only one that start listening it too

    • @rod-abreu
      @rod-abreu 4 года назад

      You're not alone guys, I also follow that one Hahahahahahaha.
      Some other cool stuff to listen to while coding are: Derek and Brandon Fiechter, Adrian Von Ziegler and everything WarCraft related.

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

    Wow I havent done this in Unity but I've used this pattern before. I had no idea.
    Great explanation! subbed. Please do more design patterns!

  • @CodingWithUnity
    @CodingWithUnity 4 года назад +3

    Great video as always, regardless of the topic I learn something from your videos.

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

    Dude, I love this type of video!!! Keep it up⚡🔥

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

    Really nice! Great video!

  • @chris.davidoff
    @chris.davidoff 4 года назад +1

    You should create your own pattern... Call it the Infallible Code Pattern. I'd be pretty convinced to use it just based on the name ;)
    sweet video, thanks!!

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

    Wow, man. You're awesome. Nice tutorial

  • @JohnSmith-ox3gy
    @JohnSmith-ox3gy 4 года назад +1

    Casually being a bro and a mentor to yourself.

  • @gargoth
    @gargoth 3 года назад

    great video! are you using visual studio?

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

    You're really awesome dude.

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

    Gonna try out the Tavern music channel now

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

    Hi, dude, what keyboard do you use? what do you call a mointor

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

    Is this the first mention of Bharles, or have I just missed it? 😐

    • @InfallibleCode
      @InfallibleCode  4 года назад +3

      I think this is only the 2nd or 3rd time. It’s always subtle and hard to catch, though haha

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

      @@InfallibleCode Should have gone with "Gnarles" as a subtle but respectable shout-out to Gnarles Barkley.

  • @jega3593
    @jega3593 3 года назад

    Aweromse video! Thanks!!!

  • @nathanielsaxe3049
    @nathanielsaxe3049 3 года назад +1

    0:51
    3:40
    6:29
    8:53
    9:04
    9:09
    9:13

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

    Out of curiosity here, what are you thoughts about designing this a bit differently?
    I'm not talking about a substitute for the humble object pattern. I'm talking about the mashroom and haverstable relationship/concept?
    Couldn't you just refactor the verb/action bits into an interface, so whatever/whoever implement the IHarvestable interface can be harvested.
    besides, you could take all the data and probably couple common functionalities (such as applying the effect of the collectable to the collectee (if that is even a word? xD)) and tuck it away in a ScriptableObject leaving just the unity logic within Monobehaviour.
    What do you think?

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

      Absolutely! That would be one of many valid approaches to this problem :D

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

      Never used scriptable object what would it look like ?

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

      @@captainnoyaux Oh, you are in for a treat :D ruclips.net/video/6vmRwLYWNRo/видео.html

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

    What code editor are you using? Nice practice indeed!

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

      That seems to be Resharper (a visual studio extension)

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

      It's called Rider. It has all the features of Resharper and much much more.

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

      @@InfallibleCode Thanks!

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

    This is high quality content (even the acting!). Great stuff, I'm learning a lot. You definitely deserve more subs!

  • @nicolasbrunet6430
    @nicolasbrunet6430 3 года назад +1

    0:23 what kind of monster clic like that.

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

    Lmao I didn't know this is a design pattern but I have been using this pattern all along lol

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

    Awesome Vid! But lets say you need the Monobehaviour to run 1 or more POCOs methods in its Update method, ie call poco.Update() from mono.Update(). Is that the same cost as calling methods declared inside your MonoBehaviour, or does it add some overhead? Thanks!

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

    Are you only able to run tests from IDE via Rider? Do you know if its possible in VS or VSCode?

  • @__ian94__
    @__ian94__ 4 года назад +3

    3:39 The exact same thing I said! 😂

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

    Really enjoying the format, is a little strange but much easier to digest the information.
    Quick question: As someone coming from a web-programming background, any suggestions on where to start with Unity?

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

    The font looks really clean, what is it called? Thanks in advance!

  • @yoimokacc
    @yoimokacc 3 года назад

    Is this something you should do even outside of it's use for testing? It's merit isn't very clear to me outside of that.

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

    Great content again.. Humble object is my most favorite pattern .. Btw, what font are you using in Rider? It looks great!

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

      Thanks! It's called Victor Mono - rubjo.github.io/victor-mono/

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

    Wish the camera setup was a bit crisper. seems a bit grainy and out of focus? not sure if it's YT killing it or what. anyway excellent content

  • @phmohmmedalaa174
    @phmohmmedalaa174 3 года назад

    thank you for great tutorials .
    Can you make a video for shortcuts that's used in vs ?
    when u used a constructor and making class and for refactoring the code .... and others

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

    Do you have someone read the lines with you? It sounds really really smooth

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

      Thanks! I actually run them alone, which looks really weird when I play back the footage during editing lol

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

    i get the feeling that charles was talking shit the moment that he hung up

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

    Awesome!!

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

    Also like to listen tavern music when working)

  • @redboss5429
    @redboss5429 4 года назад +29

    this format will always make me feel uncomfortable, good content tho lol

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

      I have the feeling Bharles is gonna tell Charles he’s not real.... 🤷‍♂️

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

    Cheesy acting - I love it.
    Actually, do you think you could address IDEs eventually? I hate all of the extra stuff that VSCode puts on the screen, like types and reference counts, etc. I love the simplicity of Sublime Text - maybe others will too?

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

      You can toggle a lot of that stuff off in VS Code. That said, I'd love a guide to moving to Rider for Unity, as I haven't made the jump yet.

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

      Search settings for Codelens, and turn it off.

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

    Post a video about how to get a programming friend like that.

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

    2:04 Well... Ackshuallllyyyyyy!

  • @Abken.
    @Abken. 4 года назад +1

    Good video as always. I would write public bool IsHarvestable { get => _harvestable.IsHarvestable; } as a property instead of a public field. But otherwise really good content

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

      He write a property in minit 6:18 (public bool IsHarvestable => _harvestable.IsHaverstable) that is a property;.

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

    Xharles has telekinesis and is vegan on Tuesdays. Zharles plays saxophone and will usher in the end of all things. Wake up, each of your selves, open all your eyes! All of them!

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

    Charles, please tell Bharles that he is a lammer :)

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

    Alright, I just have to speak my mind. I say it with love and hope you take it as constructive criticism. You are a good coder, a good teacher and have great content. But I just can't handle this video format. I'm getting frustrated trying to skip over the non informative parts (the unecessary acting parts in the beginning), and try to get to the information I came here for. I much rather like your tutorials where you are straight to the point: This is what I am going to teach you and how.

  • @munaq-jp
    @munaq-jp 4 года назад +1

    is it just me or does Charles feels a bit condescending to Barles?

  • @sodium7554
    @sodium7554 3 года назад

    Can someone recommend a good channel that doesn't waste 3/4 of the time on narration? Thansk.

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

    It's not that the information was bad, but personally I found it very difficult to follow what was going on.
    It was like watching over someone's shoulder while also trying to listen in on their conversation.
    Personally I'm not really a fan of the set up acting to show off whatever you're trying to demonstrate. I found it both confusing and distracting, but some other people seem to like it. Different strokes for different folks, just wanted to throw out my two cents.
    I would have much more appreciated just saying 'here's my code, here's what it does, here's what's wrong with it" instead

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

    why he talk with him self

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

    Talking with yourself the whole video was so weird bro.

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

    conversation between two a.is pretending to be human

  • @47Mortuus
    @47Mortuus 4 года назад

    Why are you so afraid of structs?
    Do you _LOVE_ garbage collection?

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

    Is it just me that finds it weird to use var everywhere? Feels like it throws away some of the benefits of explicit static typing.

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

      It's lazy writing.

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

      @@greglyons288 it's fine so long as the type is apparent. It's not lazy. IMO