Using Interfaces in Game Development (Unity Tutorial)

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.ย. 2024

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

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

    📦 Download the project at www.patreon.com/posts/35152838

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

      You're guys be sponsored by Unity(not that guy, who's name begins with 'B', and still teaching bad practices for beginners).

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

      You probably dont give a damn but does anyone know of a method to log back into an Instagram account?
      I was stupid lost my account password. I appreciate any tricks you can give me

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

      @Grayson Hamza instablaster ;)

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

      @Rogelio Raiden Thanks so much for your reply. I got to the site through google and Im in the hacking process now.
      Seems to take a while so I will reply here later with my results.

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

      @Rogelio Raiden it did the trick and I now got access to my account again. Im so happy!
      Thank you so much you really help me out !

  • @QuietSnake-xs5vx
    @QuietSnake-xs5vx 4 ปีที่แล้ว +293

    "just another Prototype that I'll probably never finish"....that hit me right in the feels ....but thanks for the interface revision

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

      Big fucking mood.

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

      Still in the first prototype, so no unfinished prototypes yet. Will come back in a few years when this hits.

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

    Finally someone explains how Interfaces are actually USED instead of just saying 'iT enFOrcEs a cONtracCT1'
    Thanks guys!

    • @Layarion
      @Layarion 2 ปีที่แล้ว +6

      lol, fucking microsoft wiki levels of speak there.

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

    This whole channel is like blue's clues for programmers, and I mean that in the very best way.

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

    As far as I could remember (and correct me if I'm wrong), the "I" in the interface is there since the C++ days. This is because they didn't have interfaces, so they used abstract classes with an "I" to denote that they are interfaces and fill in that class with virtual functions (or methods?) only, and ever since it got stuck with us I guess. I personally cannot imagine myself writing an interface without an "I" =P.
    Nevertheless, awesome video ;)

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

    I've been struggling to understand interfaces for a while, but this video is the only thing I've come across the really demonstrates to me personally WHY they are useful, and HOW to use them. Really appreciate your channel!!

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

      This video might also be useful: th-cam.com/video/MZOrGXk4XFI/w-d-xo.html

    • @Kalahee
      @Kalahee ปีที่แล้ว

      The common struggle is "the approach". There may be multiple ways to do something thus we get stuck in "what is the most efficient one", often the answer is none and you're left with "There has to". Since most items that I would use interface for are inherently similar I end up making abstract class to inherit from, plus they can be serialized in the inspector, unlike an interface reference.
      Say I have a "SpawnedObject" script and it has a public reference to an "IItem" so I can assign an SO that implement the interface in the editor. It won't show up in the inspector, I can only assign it through code. If instead I have an "Item" class that "Lamp" has inherited from, I can link it in the inspector.
      Interface is mostly advantageous, IMHO, if both classes are significantly different and need a few common denominators for a method to work seemlessly between them OR to decouple your interaction system from the interactable system and you might want one or the other in a different game. Don't forget to bring the interface with it.

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

    My brain collapsed when you said "Hey Jason" instead of "Hey Charles" after answering that call in the beginning of the vid

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

    Holy s**t. These "skype calls" explanations with an actual problem are by far the best approach to teach others something. Please, keep doing the videos this way because I'm loving it! :D I'm not rich or something but I'll squeeze my wallet a bit to start supporting you and keep this kind of content alive.

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

      @
      Infallible Code That was a fast like :)).

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

      I appreciate your feedback and support 😄

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

    Now we just have to tell Unity to finally implement serialization of interface type for the inspector ^^

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

      Thats why i googled interfaces in unity. I know what interface are and how they are used haha. Stupid inspector

  • @rdunajekv
    @rdunajekv ปีที่แล้ว

    This is EXACTLY what I have been looking for. I know an interface is a contract but seeing the use case help me visualize how to use it. Now I will spend the next 5 hours slamming keys and cussing my old spaghetti code as I rewrite my scripts

  • @Judge_OnYouTube
    @Judge_OnYouTube 3 ปีที่แล้ว +2

    I first came accross your channel maybe around 18 months ago? I have over a decade experience writing tools in Excel VBA and decided to leverage that knowledge to get into game development. When I first started watching your channel, I found the content to be a bit too dense for me (read: it went way over my head), so I followed along some Brackeys tutorials to help me understand the real basics of Unity and C#.
    After getting a feel for better designing my code, your content (which I've been viewing over the last month) is changing the game for me; both in VBA and C#. I'm writing better structured code, and if I get stuck, I google around for a bit until I stumble upon what feature I'm looking for, and you generally have very clear instructions on how it should be implemented.
    Thank you a heap! Your content is pure gold.

    • @InfallibleCode
      @InfallibleCode  3 ปีที่แล้ว +1

      Thank you so much for your comment! I’m glad to hear that my content has been so helpful to you 😄

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

    Wow, this showed exactly why Interfaces are useful as opposed to just saying it's a contract that you attach to an object that you have to implement what it tells you. Subscribed!

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

    I've been avoiding interfaces because I never got to know how they're actually used.
    This was just what I needed. Thanks!

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

    I'm an iOS developer, not working on unity but I watch your videos because like the way you explain things. Appreciable

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

    Absolutely loved the format! Every logical step is being explained without being pedantic or redundant!

  • @quocvnguyen7117
    @quocvnguyen7117 3 ปีที่แล้ว +1

    I have to stop in the middle of the video to drop this comment: "I love it. Great channel. I'm learning what I'm looking for + tons of tip and fact!"
    Thank you

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

    This is hands down the best tutorial on interfaces out there, its 6 minutes, it very simply and clearly explains when to use them as well as how to use them, and then it even shows how to implement them into an existing problem. And i'm saying this as someone who went through 4 other tutorials having problems understanding what they were talking about, or not wanting to spend 40 minutes waiting for them to get to the point. Really wish more people made content this good.

  • @charlesjames2748
    @charlesjames2748 3 ปีที่แล้ว +1

    This is the first time interfaces for interactable objects has clicked for me in I don't even know how many tutorials. Thank you!

  • @Daniel-Mast
    @Daniel-Mast 4 ปีที่แล้ว +5

    Wow, I found you through the stream you did, and honestly this is what I was looking for! Very easy to understand and explains the use of interfaces in a unique and creative way. Thanks so much!

  • @arthurmorgan3833
    @arthurmorgan3833 2 ปีที่แล้ว +1

    its blows my mind thank you for this it really help my project to clean and easy to add things

  • @ambi2435
    @ambi2435 ปีที่แล้ว

    This is the best way of teaching and learning. You guys should post more of video like this..

  • @CinematicGigglePlay
    @CinematicGigglePlay 6 หลายเดือนก่อน

    Wow I really like this style of teaching. Its slow, calming, feels more in depth and easy to follow. I LOVE IT! I LOVE IT! I LOOVVEE IT!!!(but I don't love it enough to turn off my ad-block XD)

  • @Landon_Hughes
    @Landon_Hughes 3 ปีที่แล้ว +2

    This is such a good video explaining interfaces with game development! My professor can only think of fruit and animal examples....this, however, makes much more sense than her just saying "it's a contract"....her explanation is as clear as mud.
    Thanks guys!

    • @InfallibleCode
      @InfallibleCode  3 ปีที่แล้ว +1

      Haha yeah there’s always some super contrived example like sword types or animals. In reality those are rarely the use case for interfaces!

  • @MahmoudMohamed-dj9wd
    @MahmoudMohamed-dj9wd ปีที่แล้ว

    where did those guys go , they were so good honestly and provided some great practices and introductions to important topics like the use of jobs

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

    I love the slightly awkward acting. The message is good too.
    In Unity inheritance is often better than interfaces though, as FindObject or FindComponent functions can manage the former but not the latter.

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

    "Let me just share my screen", a sentence that was used alot during the start of the pandemic

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

    Really cool way of doing this tutorial. Great job, Charles!

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

    I know using interface for each object's component but have not thought to use it as Composite like that. Thanks man. You're great!

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

    Your channel is a lifesaver. I never fully understood interfaces until I watched this video. Every video of yours I've watched has given me so much more insight into concepts I didn't previously understand.

  • @JayPatel-cd2fu
    @JayPatel-cd2fu 4 ปีที่แล้ว +3

    generally, as a theoretical way, this is very hard to understand where to use this, or when to use this!but the way you gave the practical examples and the way you both were communicating made these things easy and understandable.

  • @starlitcastle
    @starlitcastle 8 หลายเดือนก่อน

    Just watched a couple of videos explaining this concept, this one was the best. It not only made clear what interfaces are, but also how to use them. Thanks.

  • @xz8928
    @xz8928 ปีที่แล้ว

    Best example of Composite pattern i've ever seen

  • @fanerv3304
    @fanerv3304 ปีที่แล้ว

    This is the form of tutorials that we need

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

    Please make more videos like these one.
    After a Really long search I FINALLY find out how to use interfaces and how it simplified the job.
    The last class that turned all interactables off just blowed my mind
    PLEASE make more videos showing how to implement common functionality in games.
    You are awesome, thank you.

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

    Hey, guys, thanks. I went down a small TH-cam rabbit hole after watching a bit on Unity's channel about persistent save data. They had an example that used an Interface, and I just never understood interfaces. This was the best explainer video I could find! Love the interaction between you-two, and it was simple enough to really grasp while having a great example tied to it! No, seriously, ya'll did a great job, and I will definitely be exploring the rest of your videos to learn more! Thanks!

  • @geraldclark1741
    @geraldclark1741 2 ปีที่แล้ว +1

    So glad I subbed to this channel. You guys are killing it! Thanks!

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

    the best example I have seen yet as use case for interfaces , Thank you

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

    OMG where have you been, I feel bad to not have know you before, I guess this is the beginning of our lifetime journey.

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

    Fantastic format. Very approachable and right to the point. The only thing I would like to suggest is that you slow down a little bit on implementing the code. I had to go frame by frame at one point lol.

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

    This feels so much like the videos teachers made me watch on high school when they didn't feel like teaching. But then of course for things like geography and math!😂

  • @Luis-Torres
    @Luis-Torres 4 ปีที่แล้ว +2

    Jason's got his priorities straight! Overwatch > game dev

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

    This is the most concise and understandable explanation of interfaces out there. Your videos truly are a blessing!

  • @maximumreality
    @maximumreality ปีที่แล้ว

    Awesome lesson! I'm developer but I have never seen how deep can be integrated the coding into unity. Really nice!

  • @Stalkie
    @Stalkie 3 ปีที่แล้ว +5

    I really love this teaching style!

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

    Ty for making this. Finally understands interfaces.

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

    I sure like this format, a Q/A thing. Well done.

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

    I live the new format of tutorials

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

    I am much more amazed by the usage of that keywords

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

    those guys are gods! cristal clear examples about abstract concepts. Bravo!

  • @kirichnererwin1062
    @kirichnererwin1062 11 หลายเดือนก่อน

    I just found out about this channel and damn, these videos are really cool, I never tried implementing interfaces, but now I can see why they're so useful!

  • @clintanderson4591
    @clintanderson4591 ปีที่แล้ว

    Dang, dude. Subscribed after one video. You set the record. I can tell how this channel will be after the production quality, after being straight to the point, being useful, you guys making it entertaining, with no requests to subscribe or littered with advertisements. Wish you all success.

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

    As a beginners it's still somewhat difficult to comprehend but it certainly gives me some handles to start experimenting with how interfaces work and how I can implement them. Gonna get to it straight away, thanks for making this video and adding a bit of humor to it ;)

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

    This is the first time I've seen it explained in a way that makes total sense to me. 😂

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

    These conversation based tutorials are actually very cool

  • @playonce4186
    @playonce4186 3 ปีที่แล้ว +1

    I wish I had a friend like him.

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

    Nice explanation! Fast and straight to the point.

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

    I love the narrative of this tutorial definitely hitting subscribe

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

    Nice one, but I made the same demo for IoT project, and went with composition. Its just very convenient when you can drop a component on an object to make it interactable.

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

      Oh yeah I definitely favor composition. Especially in Unity!

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

    yeah... was looking for game interfaces in Unity, basically a how to do UI stuff... found this video, not what I was looking for, but damn I just learned something new and very useful.

  • @milkywaygalaxymedia4311
    @milkywaygalaxymedia4311 2 ปีที่แล้ว +1

    YOOOOOOO .... this was a GREAT ONE! good job gentlemen.

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

    TFW you finally figure out interfaces and switch over a complex mess in a few minutes...and it works.

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

    I love interfaces. Often they're just so much better than class inheritance.

  • @teh1archon
    @teh1archon 2 ปีที่แล้ว +1

    I LOVE these kind of tutorials :)

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

    I usually dont comment but this is by far the best tut ive seen!

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

    Thank you very much and stay healthy

  • @dreamescence
    @dreamescence ปีที่แล้ว

    Wow this was awesome actually, very apt, maybe for a beginner who doesn't know much about coding might have to pause and replay some parts more, so flow maybe improved, but nonetheless great, simple and apt explanation!

  • @EnchikO
    @EnchikO 3 ปีที่แล้ว +1

    0:32 Most casual sentence of all Unity developers. :DDDD

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

    Nice, I really liked how the format provided context for solving the problem 🤓👍

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

    Thank you Charles. Thanks to you & Code Monkey, I now have my first modular platformer system for my ripoff "test" project of Mario 3 to test my capabilities on finishing a game.
    I have 2 interfaces:
    IHorizontalMovementInput, IJumpInput...
    that have 2 implementations each:
    HorizontalInput_Keyboard, JumpInput_Keyboard,
    HorizontalInput_EnemyAI, JumpInput_EnemyAI
    Then I have a modular movement system that refers to said interfaces...
    HorizontalMovement & JumpController,
    aswell as a GroundCheck class that is referenced in JumpController.
    It is insane how you can do more with less, and I am so glad I figured this stuff out. I have saved myself hours of copying and pasting code, feeling overwhelmed and lost, and many many headaches. Interfaces are a must have for reusability, and I can't imagine life without them now.

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

    Good stuff as usual. I enjoyed the Jason cameo as well :) I can't wait to see how you guys tackle DOTS when it's 'released'.

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

    I started a new project,and day one i used and am using Interfaces,i'm thinking it's gonna pay off in the long run,a lot.

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

    As always, Great video, non clickbait video, straight to the point, and crystal clear on how use interfaces! Upvoted 2 times for you :)

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

      Really appreciate the feedback! :D

  • @shady0917
    @shady0917 ปีที่แล้ว

    Simple but freaking awesome. Thanks a lot

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

    love these videos, always clear and to the point but also explained at a good pace that beginners can easily follow and more advanced devs can easily reference as good reminder

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

    Such a friendly way to teach, thanks.

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

    Instead of holding a list of GameObjets, where you first get the IInteractable of before applying it, you could initially hold a list of IInteractables. There you are also applying the contract and nothing not-IInteractable will fit there.

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

    This is such a cool way of explaining a concept! I've seen countless amounts of unity tutorials till date and the way you guys did it just amazed me. Keep it up guys!

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

    Nice video. I liked the concept of ask a friend. The interaction brings a Nice tune to the video. Also very helpful tips to do interactables

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

    Very nice video, always enjoy a good Storey.

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

    I've always struggled with learning interfaces and this just made so much sense to me!

  • @coutnico-f9265
    @coutnico-f9265 4 ปีที่แล้ว +1

    i loved this video. the acting is funny and added a new nice way to approach us haha. thanks for this very useful information about interfaces in unity!

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

    CompositeInteraction will have strange behavior when lights have different states))))

    • @hamza-trabelsi
      @hamza-trabelsi 4 ปีที่แล้ว +1

      every light will do the opposite of it's current state, that's it.

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

      @@hamza-trabelsi That's strange then.

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

      Сразу видно, что ты русский.

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

      If you have a complex light setup in your house where you can turn on each light independently but also have a master switch that turns on/off all lights, this kind of behavior is common...

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

      @@AbstractObserver no it's fucking not, common would be the switch turns the whole circuit off - not magically cuts off the electricity but still somehow let's current flow dynamically to another part of the circuit on the same fucking wire that it cut off.

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

    Great tutorial guys. Interfaces are so much better than tags for finding and comparing objects with certain behaviours.

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

    Very clear to the point tutorial. Thanks

  • @Sykkoss391
    @Sykkoss391 ปีที่แล้ว

    I love your approach with filming. Explaining with a clear example and resolving the problem chatting with a friend is pretty smart and something I'd love to see more because it is simple and easy to identify. Great job ! :D

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

    I've never seen Jason Storey act before haha! Jason you're great, seen you from The Weimann Chronicles

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

    While I would prefer a format that more directly teaches rather than this "scene between two people" one, I must commend you for explaining this better than any of the videos I watched before this one.
    4:35 right there shows what I wasn't getting about these things. They seemed pointless because you just had to manually add code that you needed to add to each class anyway.
    But now I see that I can call a function on any class without having to directly inherit from it.
    I was struggling with how I should organize some of my classes that need to be able to get hit by weapons. I made a "pawn" class that my player, enemies, and npc's all inherited from, and when something was attacked, I called a "hurt pawn" function. But that made it awkward with other objects in my scene that the player can attack and destroy, but weren't actually pawns. I figured the only way around this was to either make those objects pawns but nerf all the other pawn attributes, or make pawn extend from another class that parents both pawns and destructible objects.
    But now I see that I can make an interface for "IDamageable" and I can call a damage function in that on (effectively) any class I want, without having to have them all inherit from the same base class.
    This isn't even what I came here for, but this really helped with my project.
    Instead of just trying to describe what it is, you showed an example of a situation that could be improved with what you were teaching. This is how programming should be taught.

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

      As I think about it more, combining both the function I just mentioned with the one you showed in this video is a PERFECT example of something you could only do with these interfaces. (Well, without having complex garbage code.)
      What if I need objects that I can interact with, and objects I need to be able to damage? An object might need only one of those, or both. I could have a switch on the wall I need to interact with, a breakable pot on the floor I need to be able to damage, and an npc that needs both. How can I have an npc respond to both interaction and damage without making everything in my scene extend from the same class that allows both options?
      I can make an Interface for each of those functions, and my game just checks for the interface it needs. No need for complex class hierarchies loaded with functionality not all of them need, and no need for complex checking functions that iterate through multiple classes to find valid options.

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

    Wow, thank you ! And I like how you designed the way to introduce the issue and how to use Interface solve it, nice !

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

    This video changed the way i code now

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

    Yep, i reach this step on my learning process. I kinda proud to be able make something work but in the same time worried of how the code mess. Thanks mate, +1 sub

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

    I won't stop saying that it's awesome

  • @chris.davidoff
    @chris.davidoff 4 ปีที่แล้ว +1

    This was killer! Loved it, and the composite example was a sweet cherry on top that I didn't know I needed :D

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

      Glad you enjoyed it! Thank you for the kind words :D

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

    Thanks for the video, but one thing I've found missing from every video on interfaces I've ever seen is an explanation for why you would use them instead of creating base and derived classes.

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

    God damn it's best tutorial ever!!
    Explained in real situation

  • @In-N-Out333
    @In-N-Out333 4 ปีที่แล้ว +31

    I’m glad you’re not talking to yourself this time. That was just weird lol

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

    This good demo of concept of indirection.

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

    Great video. The narrative format is very interesting 🤔

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

    Great video, started to use Interfaces a lot more latetly and this was a nice video to watch and the final with the switch for multiple interactbles was cool :)
    Always exciting when you get stuff working the way you want.
    The biggest problem I have discovered atm is that you should plan Interfaces well because if you decide for another method in middle of a project it means you will have to implement this method to all other scripts that implemented the Interface. So in this case can you implement it to all without any functionality in every script without actually having to go through every script? or would a much better option be to create another Interface if such situations occurs?

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

    Awesome video Charles! Very professional and enjoyable to watch! keep it up

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

    This was really insightful. Thank you!