Why Dependencies are Bad and How To Avoid Them In Unreal Engine | UE5

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 มิ.ย. 2024
  • The Mediator Pattern:
    Software Design Patterns are like a guide on how to write good code, whether you're using Blueprints or C++, knowing good software practices is a MUST!
    This video goes over the mediator pattern to build a "Combat manager" to coordinate actions between multiple enemies and the player.
    We will also be combining the mediator pattern with the observer pattern from the previous video to create an "Event Manager"
    Download the project files and support my channel on Patreon
    / alizoh
    Join my Discord server to chat and mingle with the community
    / discord
    Additional Resources:
    refactoring.guru/design-patte...
    www.gdquest.com/tutorial/godo...
    Chapters:
    00:00 The Problem
    00:33 What We'll Be Learning
    01:21 What Mistake To Avoid?
    02:20 What Is The Mediator Pattern?
    03:20 Creating The Combat Manager Class
    04:39 How To Communicate With The Mediator?
    12:44 Testing The Combat Manager
    14:37 The Problem With The Observer Pattern
    15:31 The Event Manager
    21:51 How To Use An EventManager Interface
    24:16 Summary
    25:19 Why Use Software Design Patterns?
    26:09 What's Next?
    About me:
    I've been learning game development for a few years now, I have a background in software engineering, and I also have a background in education, so being able to combine my love of gaming, software engineering and education is the best way to spend my time.
    I am currently working on a few unreal engine games as a hobby, but I am also trying to build a community, thus I am creating TH-cam tutorials to find others who are interested in game development and design.
    #unrealengine5 #MediatorPattern #tutorial #unrealengine #ue5 #gamedev #softwaredesign #software #designpatterns #cleancode
  • เกม

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

  • @francoisclement416
    @francoisclement416 3 หลายเดือนก่อน +55

    I love these tutorials about "best practice". You speak clearly and actually explain things, I hope you will make more content like this :)!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      I'm really glad to hear that you find the best practice tutorials helpful! Thank you for the kind words and feedback. I'll definitely keep creating content like this, so stay tuned for more!

  • @JesseHelton
    @JesseHelton 3 หลายเดือนก่อน +34

    Clean architecture is either a knows about b, b knows about a, or c knows about a and b.
    The mediator pattern you describe is almost the 3rd case, but not quite. The actors reference the combat manager and this creates a circular reference.
    The way you did this is the way that many devs implement such a thing, and it is ok. A cleaner, purer way, though, would be for the actors (player and enemies) to fire an event saying they want to attack. The combat manager would be required to bind to these events of each actor and instruct the proper actor what to do.
    What I just described may seem like extra and unnecessary work. The advantage, though, is that the actors remain completely unaware of the combat manager, completely modular and decoupled from it. This would allow you to more easily swap it out for a completely new and improved system later. While you may be committed to the current combat manager and may not consider this a benefit, this would also mean that you could implement different combat managers for different scenarios and swap them at runtime. Imagine having a level in your game where the game’s story switches to complete chaos, zombie outbreak, maybe. You could create a combat manager in this level where all of the enemies attack and disengage at random. Then, in the next level, go back to normal. Your actors would be none the wiser.

    • @carlosrivadulla8903
      @carlosrivadulla8903 3 หลายเดือนก่อน +1

      sounds better. Hopefully he makes a tut

    • @kirillnotof4861
      @kirillnotof4861 3 หลายเดือนก่อน +2

      Yes, you are absolutely right. the mediator knows about the actors, but the actors should not know about the mediator.

    • @zeez7777
      @zeez7777 3 หลายเดือนก่อน +1

      Great comment

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +14

      Hey there, thank you for your insightful feedback and suggestions. It's always good to explore different architectural approaches, and your points about decoupling and modularity are definitely valid.
      The only problem with your comment is that Unreal Engine doesn't expose the "Delegate" variable type to blueprint interfaces, which is needed to add "Fired events" (e.g event disptachers) in C++ I would definitely prefer your implementation, but it's just not possible in blueprints alone

    • @JesseHelton
      @JesseHelton 3 หลายเดือนก่อน +11

      Your comment is true if you are adhering to the purity of this pattern from other languages.
      BPIs have their limitations, for sure. As an example, you cannot hold a reference to a BPI; you have to instead hold a reference to an Actor and cast to your BPI when you want to make a call - minor thing, but annoying.
      Similarly, it is annoying that there is no delegate type, as you say. However, also similar to the issue with BPIs, there is an Unreal-flavored workaround. Your Actors should not know about your Mediator, but your Mediator knows about your Actors. On your Actors, expose an EventDispatcher. In your Mediator, BindEvent to this event. Your Player and Enemies will each need to do this, and your Mediator will need to know the existence of each (versus the anonymity of a delegate), but this is not a large issue in your example.
      If this pattern were being applied broadly and you want the Mediator to be more generic, then in UE, you can still achieve this by creating a common base class on your Actors that defines the EventDispatcher. I agree that you want a delegate instead. I haven’t yet found a case where this level of sophistication from BPs is required, though. It’s just annoying that it doesn’t have all the modern language conveniences.

  • @shrew654
    @shrew654 3 หลายเดือนก่อน +8

    Really love when you lay out concepts visually like with the airplanes.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Thank you! I'm glad you enjoyed the visual explanations. I was learning video animations to make this, and it took about 12 hours of works just to get a few seconds of animations 😂 So I'm really glad to hear it was useful 🙏

  • @HumpaLumpaBiriBam
    @HumpaLumpaBiriBam 2 หลายเดือนก่อน +6

    Teaching is a skill itself! Please keep going, don't change anything. You doing this very good! BRAVO!

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Thank you so much for your kind words and encouragement! I'm glad you find my teaching helpful, and I'll definitely keep working hard to create valuable content. Appreciate your support! 🙏

  • @OverlandBound
    @OverlandBound หลายเดือนก่อน +1

    Great videos to level up from a beginner to more advanced. Very well done. Thank you.

    • @AliElZoheiry
      @AliElZoheiry  หลายเดือนก่อน +1

      Very nice to hear from you again 🙏 I really appreciate the feedback, glad you found it helpful ☺️

  • @johnw8472
    @johnw8472 4 วันที่ผ่านมา

    I swear I've needed this kind of information for so long. So many tutorials have tons of casting, dependencies, and so when I've wanted to change things it becomes more difficult. Thank you for these very well explained and comprehensive guides on best practices.

    • @AliElZoheiry
      @AliElZoheiry  2 วันที่ผ่านมา

      Thank you! I'm really glad to hear that you found these tutorials helpful. That's exactly why I create them, to simplify and streamline the learning process. If you have any questions or need further guidance, feel free to ask!

  • @fuilson918
    @fuilson918 3 หลายเดือนก่อน +4

    Simply the best Unreal Engine educational series I've ever seen, congratulations on your work!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Thank you for your kind words and support! I'm really glad to hear that you found the series so helpful. I appreciate your encouragement!

  • @ARY824
    @ARY824 3 หลายเดือนก่อน +4

    You easily have some of the best unreal engine tutorials here on TH-cam. Keep up the excellent work!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Thank you so much for your kind words! I'm really glad to hear that you're finding the tutorials helpful. I'll definitely keep the content coming!

  • @svetsvett
    @svetsvett 2 หลายเดือนก่อน

    This is really great quality stuff! Also I think you've improved a LOT since you started doing this - your tutorials are succinct and to the point and a pleasure to watch. Thank you so much Ali!

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      You're very welcome! I'm truly glad to hear that you find the tutorials helpful. Thanks for your kind words and continued support 🙏

  • @mebessusn
    @mebessusn 2 หลายเดือนก่อน

    These design pattern videos are helping me a lot to actually grasp why these methods are best practices. Thanks so much and I can't wait for more videos from you!

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Thank you for your kind words! I'm glad to hear that the design pattern videos are proving helpful. More content is on the way, stay tuned!

  • @Daniel-sn5se
    @Daniel-sn5se หลายเดือนก่อน

    I cannot wait for more! This series is so universal. You really make difference in my learning progress!

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

      Thank you for your kind words! I'm thrilled to hear that you're finding the series helpful. More content is on the way! 🙏

  • @Cutting2Night
    @Cutting2Night 3 หลายเดือนก่อน

    What an amazing video series! Design patterns visualised in unreal is exactly what I was looking for. Also the structure of your video, graphical representation, audio quality is top notch! Instant sub :)
    Thank you very much for all the effort 🙏
    I'm excited to see more

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Thank you so much for your kind words! I'm thrilled that you found the series helpful and I appreciate your support. I was learning how to make these graphical animations for this video, so it took about 10 hours to get just a few minutes of animations 😅 Glad to see it didn't go unnoticed. I'll continue to ensure quality and informative videos.

  • @vladioanalexandru4222
    @vladioanalexandru4222 3 หลายเดือนก่อน +1

    This is THE tutorial for Unreal Engine that I knew I needed, but never found, until now. I can't wait to put this valuable information to good use☺️

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you for your kind words! I'm so glad to hear that you found this tutorial valuable. Best of luck putting this knowledge into practice!

  • @RoadkillLaharl
    @RoadkillLaharl 3 หลายเดือนก่อน

    I very much enjoy that your lessons are comprehension focused and well explained. This feels like free tid bits from a class, less of a tutorial. And I very much prefer it. There’s a million tutorials on anything but hardly on lessons of comprehension or “best practices” as some other people have been commenting. Love your hard work 🫡

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Thank you so much for your insightful comment! I really appreciate your feedback and I'm glad you find the approach helpful. Your support means a lot!

  • @z90u6r200
    @z90u6r200 3 หลายเดือนก่อน

    in addition to the praise on the calrity and depth, i want to add that its great that you seperate the actual configuration from the talk , making the video much more to the point. this is amazing. thanks so much for your hard work .

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน +1

      I'm very glad you picked up on that! I try to keep things concise and focused, so it's great to hear that it's working well for you. Thank you for your kind words, they mean a lot!

  • @zrmdevelopment7260
    @zrmdevelopment7260 3 หลายเดือนก่อน +2

    Amazing as always. Keep it up!!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you so much for your kind words! I really appreciate your support and encouragement. Stay tuned for more content! 🙏

  • @trvkv
    @trvkv 3 หลายเดือนก่อน

    The cleanest tutorials I've seen so far :) really nice job!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Thank you so much for your kind words! I'm really glad you enjoyed the tutorials and found them helpful.

  • @TheRopiak
    @TheRopiak 3 หลายเดือนก่อน

    I love these new format videos, its helpful for me learning UE but also I do programming for my job but never went to school for it so you're teaching me things I can apply there too! Great video.

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน +1

      I'm happy to hear that the videos are not only helping you with Unreal Engine, but also with your programming work. Thank you for your kind words and I'm glad to know that the content is beneficial to you!

  • @KonradTamas
    @KonradTamas 2 หลายเดือนก่อน

    AWESOME. Love the explanations and the Simple Human Logic behind it

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

      Thank you! I'm glad you found the explanations helpful. I believe in simplifying complex concepts with a human touch.

  • @sheeloocreations
    @sheeloocreations 3 หลายเดือนก่อน

    Once again, exactly what we need! It's all very well to have 2 billion tutorials on TH-cam on how to make foliage, how to put a light etc., but what you really need to know when you start out is to understand and know how to architect your code, to understand a whole paradigm before you can start coding your project. It's been 7 or 8 times now that I've reworked the base of a game I want to make, not because of the code itself, but because of its overall structure/logic so that it's modular and can evolve over time. This is exactly what is described in this tutorial (in part, of course, as the world of code is very vast).
    You warned me on discord about the concept of "separation of concern", and I think that's the most important thing to know when you're starting out (before the other problem-s- that will come later, but it's an excellent start).
    Thank you very much!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Thank you for your kind feedback! Understanding the overall architecture and the concept of "separation of concern" is indeed crucial when starting out in coding. I'm glad you found the tutorial helpful!

  • @shrew654
    @shrew654 3 หลายเดือนก่อน +1

    Great video! You explain things so well!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you! I'm glad you found the video helpful. If you have any questions or suggestions for future content, feel free to let me know!

  • @nosaokhuelegbe
    @nosaokhuelegbe 3 หลายเดือนก่อน

    these tutorials is really awesome for where i am now in ue4 blueprints, thank you, subbed.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you for your kind words! I'm glad to hear that you're finding the tutorials helpful. Welcome to the community, and thank you for subscribing!

  • @lorenfulghum2393
    @lorenfulghum2393 2 หลายเดือนก่อน

    This is my new favorite channel. Thank you so much.

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน +1

      Thank you so much for your kind words! I'm happy to hear that you're enjoying the content. Your support means a lot. 🙏

  • @ikkkki
    @ikkkki 3 หลายเดือนก่อน

    Dude... please dont stop making this videos! i was havin problems with buttons on widgets and this was the perfect awnser... trully thank you

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Thank you so much for your kind words! I'm thrilled to hear you found the solution in the video for your widget button issues. I'll definitely keep the videos coming!

  • @CGWorks1993
    @CGWorks1993 3 หลายเดือนก่อน +1

    Funny you uploaded this now, I was literally just thinking how developers go about implementing this type of logic today lol. Your tutorials are absolutely stellar, man. Very informative, and I appreciate you also teaching good practices and showing how the more "common" approaches can be detrimental. I feel like i learn a lot every video you make. Keep it up!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Hey, thanks for the kind words! I'm really happy to hear that you find the tutorials informative and valuable. I'll definitely keep putting out more content for you to learn from. Appreciate your support!

  • @SirParsy
    @SirParsy 3 หลายเดือนก่อน +1

    Love this series. Keep it going!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Thank you so much! Your support means a lot to me. I'll make sure to keep the content coming for you!

  • @Alex-ui8mk
    @Alex-ui8mk หลายเดือนก่อน

    Your Software Design pattern tutorials are incredible. I'm new to Unreal, and I can sometimes feel how clunky my solutions are, but I don't know how to fix them, because I don't know how to think about programming yet. You're clearing up so much, and you make it so easy to understand. Thank you!

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

      Thank you so much for your kind words! I'm thrilled to hear that my tutorials are helping you clear up any confusion and providing clarity on software design patterns. Keep learning and experimenting, and you'll soon find yourself creating more elegant solutions in no time. If you have any specific questions, feel free to ask!

  • @zeez7777
    @zeez7777 3 หลายเดือนก่อน

    Awesome video, thanks for your effort in creating all these

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      You're very welcome! I'm happy to hear that you found the video helpful. Thank you for watching and commenting 🙏

  • @ryanjdevlin87
    @ryanjdevlin87 3 หลายเดือนก่อน

    The comparison to air traffic control was amazing man. It helped visualize the whole system from a different view and really brought the whole image into focus. Absolutely Amazing tutorial man sooo much thanks !

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Hey, thank you for your comment! I'm really glad the air traffic control comparison helped you understand the concept better. Thanks for watching and happy to hear it was helpful!

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

    I'm pretty sure i found a gold mine of information.
    Thanks for this man, I have been struggling with making my projects scalable and manageable, but after finding this channel i think I am about to overcome just that.

    • @AliElZoheiry
      @AliElZoheiry  หลายเดือนก่อน +1

      That's fantastic to hear! I'm glad you found helpful information here. Keep pushing forward, and I'm confident you'll be able to make significant strides in managing and scaling your projects. Good luck!

  • @sade1212
    @sade1212 2 หลายเดือนก่อน

    This is high quality stuff! I love the animations and everything. It would be awesome if you kept explaining more design patterns; learning them through UE5 makes them more exciting.

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Thank you so much for your kind words and the suggestion! Glad you liked it. I'll definitely consider exploring more design patterns in the context of UE5 in future videos.

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

    Absolutely loving this series

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

      Thank you so much for your kind words! I'm thrilled to hear that you're enjoying the series and finding it helpful. Keep watching and learning!

  • @Michael-zh7br
    @Michael-zh7br 3 หลายเดือนก่อน

    Love these videos, great work!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you for your kind words! I'm so glad you're finding the videos helpful. Keep a lookout for more content coming soon!

  • @grit-mike
    @grit-mike 3 หลายเดือนก่อน +1

    Perfect timing. I have a "brawl" going on in level and this mediator pattern is the perfect fit.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      That's great! Happy that the timing works out for you! Good luck on your game

  • @ferinzz
    @ferinzz 22 วันที่ผ่านมา

    omg, someone actually showing the individual steps of adding the variables types and everything in their tutorial?! Amazing.

    • @AliElZoheiry
      @AliElZoheiry  21 วันที่ผ่านมา

      Thank you so much! I'm glad you found the tutorial helpful 🙏

  • @ABentPaperclip
    @ABentPaperclip 2 หลายเดือนก่อน

    what is this, a youtube channel teaching actual design patterns and not just basic blueprint stuff?? subscribed. more of this please!

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Thank you for subscribing! I'm glad you found the content useful. I'll definitely keep creating videos on design patterns and more advanced topics in the future.

  • @christopherfrancique9912
    @christopherfrancique9912 3 หลายเดือนก่อน

    great stuff, learning so much thanks bro

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you for the kind words! I'm thrilled that you're finding the content helpful. Keep learning and enjoy the journey!

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

    Actually explaining how to think and apprehend the Unreal logic ! These tips are usable for everything then thanks a lot 👍

    • @AliElZoheiry
      @AliElZoheiry  28 วันที่ผ่านมา

      Glad you found the tips helpful! Thanks for watching and commenting 🙏

  • @charzulu
    @charzulu 3 หลายเดือนก่อน

    The absolute best UE tuts.

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Thank you so much for your kind words! I'm happy to hear that you find the tutorials helpful. Your support means a lot to me!

  • @user-po8zb6lc5v
    @user-po8zb6lc5v หลายเดือนก่อน

    We ask for the third part with Jesse's ideas:) You are an amazing teacher: visual, understandable, intelligible and straight to the point. I admire you.

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

      Thank you so much for your encouraging comment! I'm glad you found the content helpful. I'll definitely continue this series soon. Keep an eye out for it! 🙏

  • @mahkhardy8588
    @mahkhardy8588 3 หลายเดือนก่อน

    Great topic with a great example!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      You're very welcome! Thank you for the positive feedback and glad you found the topic and example helpful!

  • @esmail88
    @esmail88 2 หลายเดือนก่อน

    I didn't even start with unreal engine and youtube is full of courses , but you know the special ones after few seconds of watching your videos . I hope you get the best in live and from this youtube channel

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Thank you so much for your kind words! I truly appreciate your support and hope my videos continue to be helpful as you embark on your Unreal Engine journey.

  • @achuthanarayan7383
    @achuthanarayan7383 3 หลายเดือนก่อน

    Take a Bow man !
    I love you I dont miss your tutorials

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you so much for your kind words and continued support! I'm thrilled to hear that you are finding the tutorials helpful. Keep an eye out for more content in the future!

  • @billysatkowski6938
    @billysatkowski6938 3 หลายเดือนก่อน

    Using an actor to set visibility of array of objects in blueprint. But confused on how to get components linked to number of objects given. Thanks for teaching new devs right. I spent two years learning bad habits from other creators. Weeks fixing it.. but your video's are great.. learned behavior trees through you. It's fairly easy to expand with your explanations. Your One of the Best so far. Keep it up.

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Hey there, thanks for your kind words and support. I'm happy to hear that my videos have been helpful to you, and I'm glad to have contributed to your learning experience! Keep up the great work!

  • @nocommentgamez2571
    @nocommentgamez2571 3 หลายเดือนก่อน

    Very interesting video. Never thought about using the gamestate like that. I've tried to decouple things as much as I can, but this will make it even easier to manage. Nice work.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you! I'm glad you found the concept useful. Game state can be a powerful tool for managing game data and decoupling systems. Appreciate your comment!

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

    Another fantastic tutorial Ali. Your tutorial content is some of the best I've stumbled into on TH-cam.
    Any plans to create a target switching/priortizing tutorial? You mention you might make one in Part 12 of your AI series, which would complement a video such as this one perfectly.

    • @AliElZoheiry
      @AliElZoheiry  หลายเดือนก่อน +1

      Hey, thanks for the kind words! I'm really glad you're enjoying the content. Creating a target switching/prioritizing tutorial is definitely on my list of video ideas, so stay tuned for that in the future. Thanks for the suggestion!

  • @kryogenicgames
    @kryogenicgames 3 หลายเดือนก่อน

    another good one Ali :)

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you! I'm glad you enjoyed it 🙏

  • @codymccarty9327
    @codymccarty9327 3 หลายเดือนก่อน

    Nice! I like the use of proper framework classes(game state bc of how it replicates). I like the air traffic rip from refactor guru. You 10x it with the animations, brother! I like the structure of "Tell them what you are going to tell them, tell them, then tell them what you told them."! Most importantly, you picked a solid use case for this pattern, and It didn't feel like you had a solution while looking for a problem. I literally googled/YT a similar problem a month ago and didn't find a concise solution.
    I would love to see more about how to Architecture a game. What Helton said, "Clean architecture is either a knows about b, b knows about a, or c knows about a and b." is a great sentence. A subsystem seems like a good use of the manager, and it seems worth mentioning. I would love to see Strategy Pattern. That and Builder was my go to in SpringBoot. Not sure how useful they are in UE.

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Hey, thank you for the detailed feedback and the suggestions! I'm glad you found the video helpful. I'll definitely take your suggestions into account for future content. Keep an eye out for upcoming videos on game architecture, Clean architecture, Strategy Pattern, and more!

  • @symig
    @symig 3 หลายเดือนก่อน +1

    Well, this is exactly what I asked about last time so I feel like this was made for me. I'll stay tuned in hopes of learning more.
    If you need inspiration, perhaps touch on the subject of when to add something as a component - I could see that being an interesting talk.
    Regardless, thanks you, Ali!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Hey there! I take comments seriously ;) and feedback from viewers definitely guides me decisions on what videos to make, so please keep the feedback coming!

  • @lxyuan14517
    @lxyuan14517 3 หลายเดือนก่อน

    Waiting for more about this series.
    This 2 vedios about coding desigh patterns are very meaningful about us all.
    Your teaching chanel is the best in YTB.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Hey, thanks for your comment! I'm really glad to hear that you found the coding design patterns videos meaningful. I'll definitely continue with the series. Your support means a lot 🙏

  • @kellowattentertainment
    @kellowattentertainment 3 หลายเดือนก่อน

    I'm definitely implementing this into my game. This is lit. This would make the the attack tokens functionality in the Enemies AI tutorials even better. One control how many enemies can attack at the same time and the other controls how many will be attack ready... awesome.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      That's great to hear! I'm glad you found it useful. Looking forward to seeing how you implement it in your game! 🔥

  • @chomnansaedan4788
    @chomnansaedan4788 2 หลายเดือนก่อน

    Wow! This is great. I subscribe.

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน +1

      Thank you! Glad you found it useful ☺️

  • @GloriaTheAnimator
    @GloriaTheAnimator 3 หลายเดือนก่อน +1

    this is so helpful

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Glad to hear that! Thank you for watching and commenting 🙏

  • @nicholasmcmillan7536
    @nicholasmcmillan7536 3 หลายเดือนก่อน +1

    I'd like to see those blocks move like the Obi-Wan episode were his identity is changed and they have to prove himself a bounty hunter. This assimilation reminds me of that episode on Clone wars

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Hey there, that would be a good tutorial series as well. "How to use the force in unreal engine" 😂

  • @talespinnergames700
    @talespinnergames700 3 หลายเดือนก่อน

    This is good stuff. I need to go revise some stuff in my current project.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you! I'm glad you found it helpful. Good luck with your project revisions!

  • @tim.martin
    @tim.martin 3 หลายเดือนก่อน +1

    OP truly delivered. Decoupling was promised, and here it is 😊
    Quoting the truth for my students: "The majority of your time is spent reading and reasoning about your code". Yep, despite Hollywood's efforts this is too true.
    Thanks for another banger 🙏🙏 I can't wait to get started bringing this technique in my projects.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Hey there! I'm really glad to hear you found the video helpful for understanding decoupling techniques. I appreciate your support and I'm excited for your projects ahead. Good luck with implementing the technique! 🙌

  • @CloudStrife4
    @CloudStrife4 3 หลายเดือนก่อน

    SOLID, CLEAN, DESIGN PATTERNS, we love it! Thanks mate!
    PS: I'm wondering if in a real world scenario, devs are using C++ over Blueprint
    I've talked to some game devs before, and apparently, blueprint is not famous among devs (it's more used by game / level designers to create prototypes), but maybe I'm wrong. Keep doing the good stuff!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Hey, thank you so much for your support and kind words! In a real-world scenario, both C++ and Blueprints have their place. C++ is typically used for core functionality and performance-critical code, while Blueprints are great for rapid prototyping and iteration. So both are important in game development.
      As a general rule of thumb, if it's a low level core implementations that's going to be used in most parts of your game, then implement it in C++, if it's high level and more related to gameplay logic rather than the core functionality, then implement it in Blueprints.
      Appreciate your feedback and encouragement!

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

    What the f , Ali?! Im 36 yo IT pro and have seen many many tutorials, but this one is of the highest quality!
    This one contains more cool ue tips than generic youtube video "ue cool tips"! Better design pattern description than any video or book including GoF. Superior pace. Superior pronunciation. Superior material structure.

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

      Wow, thank you for such high praise! I'm thrilled to hear that you found my tutorial so valuable. Your feedback means a lot to me!

  • @rifat.ahammed
    @rifat.ahammed 3 หลายเดือนก่อน

    Thank you soooooooooo much bro . Respect

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      You're very welcome! I'm glad you found the content helpful. Thank you for your support 🙏

  • @jaha9329
    @jaha9329 3 หลายเดือนก่อน

    Nice Power Rangers cameo. Thanks for explaining different patterns, it sure is useful to have someone who can explain those kinds of things in clear manner.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Glad you noticed the power rangers cameo, it sorta happened by accident, and I liked it, so I kept it 😂. Thank you! Your feedback is greatly appreciated!

  • @Algost_
    @Algost_ 3 หลายเดือนก่อน

    Best series ever

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Thank you so much for your kind words! I'm thrilled to hear that you found the series helpful. Your support means a lot to me!

  • @gamedevpaddy3944
    @gamedevpaddy3944 3 หลายเดือนก่อน

    Really interesting video, really useful for creating efficient combat scenerios, anytime i need gamestate or gamemode, I would create an interface function to get self of the gamemode say and i can access all of the variables if i need to. I rarely use casting now and keeps my games running smoother

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Thanks for your comment, glad you found it helpful! I did create an interface for the GameState at the end of the video ;)

  • @Kulimar
    @Kulimar 3 หลายเดือนก่อน +4

    Thanks👌

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Wow! Thanks again Kulimar! I really appreciate your donations, they really help keep this channel going 😊🙏🙏🎉

    • @Kulimar
      @Kulimar 3 หลายเดือนก่อน +1

      @@AliElZoheiryWhatever I can do to keep the great content flowing.

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

    Please continue to make more videos in this series

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

      Your support and encouragement mean a lot! I'll definitely keep the videos coming in this series. Stay tuned for more 🙌

  • @tenowg
    @tenowg 2 หลายเดือนก่อน

    I might suggest that people look at using the MVVM pattern in addition to this (it will extend and event decouple more), it is implemented by UE already, it is a plugin ment more for UMG decoupling, but is easily extended to many different cases, such as this.

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Hey, thank you for the suggestion! The MVVM pattern is indeed a great addition, especially when extended for various use cases. Appreciate your input!

  • @Veluc1f3r
    @Veluc1f3r 3 หลายเดือนก่อน

    Great video!
    A tip:
    UE provides subsystems.
    Instead of using AActors handling the mediation, you can make children of UEngineSubsystem, UEditorSubsystem, UGameInstanceSubsystem, ULocalPlayerSubsystem(according to need)
    Which can easily be accessed by other classes, actors/components/uclass children/etc during gameplay or in editor.

    • @noisegrindercn
      @noisegrindercn 3 หลายเดือนก่อน

      Subsystems are more like singleton pattern. If it was a "global" combat manager and you don't need different instances for different combat scenarios then go for it. Also, subsystems are harder to do custom configrations because you just can't subclass them in BP. (I use custom project settings to do it)

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Hey! Thanks for the comment, though using an actor was done on purpose for the case of the combat manager, because often, combat encounters are confined to a specific area of the map, and you might event want your enemies not to be able to leave the combat zone. Thus you can have multiple different combat managers per encounter in a level, and having is as an actor placed in the world would help with that

  • @GameTourist491
    @GameTourist491 3 หลายเดือนก่อน

    thank you so much

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      You're welcome! I'm glad I could help. Thank you for your kind words!

  • @liamj2528
    @liamj2528 2 หลายเดือนก่อน

    Hey, thanks for these videos, such a good resource to have!! Cheers!
    So quick question, maybe too project dependent to answer easily, but, would it make sense to use the mediator pattern for a topdown interact/dialogue system? Right now my player controller is saving a ref to what ever intractable object/character the mouse is currently hovering over, and when I click, it publishes a message to the intractable. I could get rid of that ref by having a mediator but maybe doing it directly in the controller makes more sense... I dunno!

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Hey! Thanks for your comment!
      If you just have a single ref, to an interface from your player. Then that's completely fine.

  • @wewillmodify8263
    @wewillmodify8263 3 หลายเดือนก่อน

    Hi incredible work loving how to fix all the bad habbits i have picked up with making a game with all hard ref and thinking it was great till i saw the RAM usage and referance viewer info. You have really made me think and Almost made me start over but going to try to fix what i have first to learn more i think. Either way you have helped so much. The situation i am trying to fix from all hard ref are the dependencies between say NPC and actors such as say a tree they are going to chop down should this be handled in the same way with an in world actor as an manger with separate interface or is there a better way.

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Hi, thank you for your comment and kind words! It's great to hear that the videos have prompted you to reevaluate your approach. In terms of managing dependencies between NPCs and in-world actors. I usually have a parent class for all "Interactable objects" that a player or an NPC can interact with, and then using a simple sphere trace or query. I can find all actors that I can interact with without having to cast.
      I don't think a manager would be good in this case because the interaction between NPCs and other actors are not a single use case, they could be a huge variety of different interactions, that would be too much for 1 manager to manage

  • @Lu1Vitor
    @Lu1Vitor 3 หลายเดือนก่อน

    Boa noite professor!! Você me ajuda muito com seus tutorias de AI, obrigado, estou conseguindo acompanhar o pessoal do meu trabalho por conta disso.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Boa noite! Fico feliz em saber que os tutoriais estão ajudando, obrigado pelo feedback! Continue acompanhando o trabalho, e se precisar de algo mais, é só falar!

    • @Lu1Vitor
      @Lu1Vitor 2 หลายเดือนก่อน

      ​​@@AliElZoheiry "Professor, tenho uma dúvida sobre IA. Estou enfrentando um pequeno problema com isso. Criei um inimigo corpo a corpo cujo funcionamento é muito bom, mas suas únicas falhas são que, quando está perseguindo o jogador e o jogador pula, ele executa a animação de ataque mesmo não estando próximo ao jogador. Além disso, ele tenta atingir o jogador mesmo estando em cima de uma plataforma, continuando a atacar incessantemente. Como posso corrigir isso?" (É um jogo sidescroll)

  • @tim.martin
    @tim.martin 2 หลายเดือนก่อน

    Thanks

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Hey Tim! Thank you so much for the support 🙏🙏 these donations really help, I appreciate you !

  • @leemclafferty5622
    @leemclafferty5622 3 หลายเดือนก่อน

    Great video!
    I had a question. When you have the mediator class, where is the actual object created since it's not static? Is it an actor component on the player here or somewhere else?
    I am listening and not watching, so it you addressed this, then I am sorry i missed it.

    • @washynator
      @washynator 3 หลายเดือนก่อน +1

      He created a class based on GameState which is static.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Hey there, indeed for the Event Manager case, the mediator was the GameState class, which is configured in your world settings, then globally available in any class.
      For the Combat Manager case, I created a regular actor class (as our mediator) and placed it in the level. In some cases you have multiple combat managers per level or per section in the level, that's why I went for that approach.

  • @akumadj7569
    @akumadj7569 3 หลายเดือนก่อน

    i got 2 tips for removing casting from this setup and making it more decoupled.
    Use a Actor component or use an interface to return the game state reference (your game state blueprint).
    Using a Actor component might be better as all you need to do is use the get component by class (node), this would remove the need to cast to game state. Also as long as you don't over complicate or fill component with any hard references this is a very light weight and safe method.
    Using the component also decouples the logic and you can copy past the component from one project to another. Another benefit is if you use different game state for different type of game modes you wouldn't have to copy over the events as instead of being tied to the game state itself it is in the component you can attach to new game state allowing you to then use each game state to focus on what specific code you need.

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน +1

      Hey there, I think you didn't watch till the end of the video, because I do indeed use an interface for the GameState

  • @NBAntony
    @NBAntony 3 หลายเดือนก่อน

    Please continue writing tutorials on programming patterns or best practices in Unreal Engine. There are too many tutorials out there that focus on "do this to achieve X" and too few on "understand how to achieve X". I'm not sure if I'm explaining myself well, but what I mean is that most tutorials are too specific and not very flexible.
    I'm a Unity programmer and I really want to learn Unreal Engine, but not in a superficial way, rather in a more in-depth manner, being able to work with both Blueprints and C++.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Thank you for your feedback! It's important to me to provide content that helps people understand the underlying concepts and principles behind achieving specific outcomes in Unreal Engine. Thanks for watching 🙏

  • @clintcollins8966
    @clintcollins8966 14 วันที่ผ่านมา

    these are the best bro. can you do one on making a grab function so i can throw and eat whats in my hand

    • @AliElZoheiry
      @AliElZoheiry  12 วันที่ผ่านมา +1

      Hey, thank you for your comment! I'm glad you're enjoying the content. I'll definitely consider making a tutorial on the grab function you're interested in. Stay tuned for future videos! 🙌

  • @McCoyD6
    @McCoyD6 3 หลายเดือนก่อน

    How is this different from the token setup from the "Smart Enemy AI | (Part 11: Group Enemy Combat)"? Is this better? or just a different way of doing the same thing. New to BP, sorry if this seems like an easy answer . :) Thanks in advance !

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      This is mainly just meant to be an example of how you could apply the Mediator pattern. I liked this example because I myself didn't apply this pattern in the Smart Enemy AI series and it would have been helpful if I did.
      That said, since in the enemy AI series, I don't have any complex combat scenarios, then the token system implemented there will work fine, but as it scales, it would be better to create a mix of the 2, where the tokens are managed by the player, but the combat is managed by the Combat manager, it all depends on the game you're making

  • @user-eg6wh5mu9h
    @user-eg6wh5mu9h 2 หลายเดือนก่อน

    翻訳しながら見させていただいております。参考になります!

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน +1

      ありがとうございます!お役に立てて嬉しいです 😊

  • @13romor
    @13romor 3 หลายเดือนก่อน

    Hi Ali, love your content, always clear up my mind as a beginner on how to visualize data flow and managing, thanks very much :)
    I was wondering : after you talked about the use of GameState in the video, I went to look the UE documentation about GameMode and GameState, are there any good rules of thumbs to keep in mind on when to communicate from one instead of the other ? For a noob like myself half understanding these concepts xd
    Thanks again for the content, if I'm lucky enough to make money from games someday, I'll be glad to be able to support you via patreon !!

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน +1

      Hey there, glad you're enjoying the content! The main thing to keep in mind is that GameState is replicated (meaning it is available on both the client and the server in online games) while gamemode exists on the server only

    • @13romor
      @13romor 2 หลายเดือนก่อน

      Thank you for the answer !@@AliElZoheiry

  • @hendra_winata13
    @hendra_winata13 3 หลายเดือนก่อน

    Hello Ali, love the explaining, so easy to understand.
    Anyway, sorry if out of topic, but i have some question in mind. Do you know how to make Demo from Full Game Build?
    Thank you very much.

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Hey there! Thank you for the kind words. In terms of making a demo from a full game build, you can achieve this by creating a separate build specifically tailored for the demo (you can specify which levels are in that build). Additionally, you can consider implementing specific demo features or restrictions within the game itself. I hope this helps!

    • @hendra_winata13
      @hendra_winata13 2 หลายเดือนก่อน

      @@AliElZoheiry Thank you very much 🙏

  • @starscream2092
    @starscream2092 2 หลายเดือนก่อน

    Hello, love your content, its quality information not like 90% of tutorials. Do you plan on doing a tutorial for loading the game the right way? There are so many tutorials showing just how to add picture for 5 seconds to hide the load. That is the Wrong way and people are praising that

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Hey there, thank you so much for your kind words and support. Really glad to see that my content has been helping you.
      I have a tutorial on how to save and load data, but I believe you are mainly referring to loading levels, correct? I do plan on making a tutorial for that indeed, it's already on my list ;)

  • @Ghossteffect
    @Ghossteffect 3 หลายเดือนก่อน

    Very good and informational.
    Could you please help people with replication in blueprint.
    I have been trying to find best practises on doing this and advice is all over the place, with usually no one is thinking about bad network connection (client predicted rep) or good architecture.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you for your comment! I'll definitely consider making a video on replication in blueprint and addressing best practices, including considerations for network connection and architecture. Stay tuned!

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

    Is there a reason to use a mediator on other things? Like doors opening or switches for movables? Or the switch is considered the mediator for the movables in this case - the interaction isn't between the player and multiple movables but instead between the trigger and the movables?

    • @AliElZoheiry
      @AliElZoheiry  หลายเดือนก่อน +1

      If you have any interaction between 2 classes and you want them to be decoupled and independent, then a mediator should be used. In your example of a switch moving certain actors, then the event manager is a great usecase, the switch just publishes an event to the mediator (the event manager) and the mediator let's all subscribers know that the event is published. That way your switch never communicates with the movables

  • @Fawior
    @Fawior 3 หลายเดือนก่อน

    Is that a JS on the wall?;) keep it up with the content, it's amazing!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Close, it's a Ibanez s420. Thank you for watching, glad you're enjoying the content!

  • @natbouli3767
    @natbouli3767 3 หลายเดือนก่อน

    I'm not sure of the advantages of the last interface over just casting event manager (interfaces use "cast" under the hood, so performance is about the same), is it just about saving nodes to keep everything clean (or being able to see more things at once) ?

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      It's not so much a performance optimzation, it's more a good practice to create an interface for your event manager, that way if you want to create a new event manager later on, or you want to have 2 event managers with slightly different implementation, then you can just have 2 classes that implement the same interface in a different way, and you don't have to change the consumers of that interface. That's basically the main purpose of an interface in most cases

    • @natbouli3767
      @natbouli3767 3 หลายเดือนก่อน +1

      @@AliElZoheiry Ah I didn't see it in that way it makes sense, thank you for the clarification !

  • @BrianEBP
    @BrianEBP 2 หลายเดือนก่อน

    Can I actually implement this teqnique into your previous Smart AI tutorials ?

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Yeah you definitely can!

  • @brandonvanharen2552
    @brandonvanharen2552 3 หลายเดือนก่อน

    At 8:40 I do not have an AI Controller Variable as part of my enemy blueprint. How would I be able to make the AI Controller referenced by my enemy as a Get-able variable?

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      I made an AIController variable because I have a custom AIController, but if you're not using a custom AI controller, then you will already have by default a function "Get AIController", this is available on all character classes

  • @amirhameedamirjalali4399
    @amirhameedamirjalali4399 3 หลายเดือนก่อน

    Hey Ali! really awesome content! Im a Persian American game developer myself, and your work so far has been nothing but inspirational, keep it up!

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Thank you so much for your kind words! It's always great to connect with fellow game developers. I truly appreciate your support and encouragement

  • @alejandromedici2183
    @alejandromedici2183 3 หลายเดือนก่อน

    Sensei 🙏🥷💎

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you! I appreciate your support 🙏

  • @viniguerrero
    @viniguerrero 2 หลายเดือนก่อน

    So how would you combine this with the token system targetting replication? I mean, TMaps can't be replicated, do we need to? since AI is calculated on the server?

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน +1

      Hey there! Thanks for your question and for watching the content. You're correct that TMap cannot be replicated, but since AI is calculated on the server, you don't typically need to replicate the TMap. The server's AI calculations will handle the TMap interactions. Let me know if you need further clarification!

    • @viniguerrero
      @viniguerrero 2 หลายเดือนก่อน

      @@AliElZoheiry that actually helped a lot! I thought I was doing it the wrong way, but in fact I was just not printing AI held tokens properly but they were being calculated, since it’s everything server side, makes more sense, thank you!

  • @WilliamAlex
    @WilliamAlex 3 หลายเดือนก่อน

    please make an advanced combat system tutorial series

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Hey there! Thanks for the suggestion, I'll definitely consider creating a series on advanced combat systems. Stay tuned for future videos 😉

  • @codymccarty9327
    @codymccarty9327 2 หลายเดือนก่อน

    What about the framework classes? (GameState, PlayerState, PlayerController, GameMode, GameInstance, PossessedPawn, HUD/UMG). To avoid circular dependencies, I have the HUD reference any/all of them, but nothing references the HUD. PlayerController references PossessedPawn. Actors can reference their Components, but not the other way around. How should the Other framework classes reference each other? Which way do the dependencies go?

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      If you are looking to understand the entire flow of execution, then I strongly recommend this video th-cam.com/video/IaU2Hue-ApI/w-d-xo.htmlsi=n7yXqVBZFl8FFbZY where Alex goes over all the classes and function involved in initalizing your game

    • @codymccarty9327
      @codymccarty9327 2 หลายเดือนก่อน

      @@AliElZoheiry Great link, but not what I'm trying to understand. My question is not clear. I'm trying to understand the 'dependencies' between the framework classes, much like your video describes the dependencies between the AI and Player and introduces a manager class. The dependencies or references between the framework classes should go one way, not circular. But how? More specifically, does the GameState depend on the PlayerController? Perhaps the PlayerState acts as a Mediator between the GameState and PlayerController? IDK. If a player wanted to send a message to another player(s), which classes would be involved? PlayerController could Server_SendMsg to GameState and GameState could replicate the message to other Controllers, but that's a circular dependency. Imagine a moderately complex multiplayer rpg game. The framework classes become fairly large, and it's easy to tightly couple them with direct references and dependencies on each. How do I avoid each framework class depending on every other framework class?

  • @RationalBike
    @RationalBike 3 หลายเดือนก่อน +1

    Cool

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Hey, thanks for checking it out! Glad you liked it! 🙌

  • @mobildisko579
    @mobildisko579 3 หลายเดือนก่อน

    I use these design patterns without even hearing about them, actually without even realizing it, I generally use player state because for multiplayer, the game freezes when I choose gamestate (non-base).

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      That's great to hear! It's always interesting to discover that you're already implementing important concepts without consciously realizing it. Keep up the good work!

  • @Kkurox
    @Kkurox 23 วันที่ผ่านมา

    I think the combat manager would be a problem in a co op game, because the manager bp would overwrite the ArrackTarget
    Maybe host the logic in the player? although I think that would give other kinds of problems...

    • @AliElZoheiry
      @AliElZoheiry  21 วันที่ผ่านมา +1

      Hey there. Implementation of any system will always depend on the type of game and requirements of course, so make sure to carefully consider your requirements before building anything

  • @addy30001
    @addy30001 2 หลายเดือนก่อน

    Hi can you make a tutorials about skill system with cooldown thanks

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน

      Hey there! Thanks for the suggestion, I’ll definitely add it to my list

  • @NemesisQX321
    @NemesisQX321 3 หลายเดือนก่อน

    hey mannnnnnn I love uuuuu can u make combat finisher system I wanna learn that and u teaching greatttttttttt

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน +1

      Hey, thank you for your kind words! Glad you're enjoying my content. I'll definitely consider a combat finisher system for a future video series. Thanks for the suggestion! 🙏

    • @NemesisQX321
      @NemesisQX321 3 หลายเดือนก่อน

      @@AliElZoheiry I love uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

  • @nicholasmcmillan7536
    @nicholasmcmillan7536 3 หลายเดือนก่อน

    This reminds me of Kamino Clone and jedi training center.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Thank you! That's quite the comparison, I appreciate your comment 🙏

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

    these casts in event dispatchers are not problematic? On the one hand it is said to avoid it, on the other hand I see everyone using it..

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

      Hey there! Casts themselves are not problematic, as long as you understand what they do and when they might be problematic. The reason you may hear people saying casts are problematic is because as soon as you cast to class inside another, then you immediately create what is called a "Hard reference" to that class. Which will mean that if you cast to class B while writing some code in class A. Then anytime you load class A into memory, class B will automatically be loaded as well.
      This is not an issue if the 2 classes are dependent on each other and will always load into memory anyway, or class B is already loaded into memory, then casting has zero performance impact. That's the main thing to keep into consideration.

  • @mobildisko579
    @mobildisko579 3 หลายเดือนก่อน

    Can you show it in pool object pattern?

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Hey! That's a great suggestion, I'll definitely add it to my list of ideas for future videos. Thank you for the comment!

    • @mobildisko579
      @mobildisko579 3 หลายเดือนก่อน

      @@AliElZoheiry If you have any knowledge about multiplayer, it would be great to learn multiplayer widgets. Actually, I basically learned multiplayer, but when I was trying to make widgets, everything went upside down. There is almost no information about multiplayer widgets, like each player has their own widget.

    • @AliElZoheiry
      @AliElZoheiry  3 หลายเดือนก่อน

      Good idea. I must saw, multiplayer is not my strongest skill, but once i know more I will definitely be making videos on that@@mobildisko579

  • @BrianEBP
    @BrianEBP 2 หลายเดือนก่อน

    Hey Ali I know you get lots of comments...But please read mine/ Your channel is fool of advanced tech stuff lets keep it that way, On the internet there is barely anythimg about "Pooling" (for Example: Bullets, Enemies, arrows etc) and explanations as to why it would be a good way of optimizing projects especially if they are in blueprints. What do you think?

    • @AliElZoheiry
      @AliElZoheiry  2 หลายเดือนก่อน +1

      Hey there! Thank you for your comment and your suggestion. I appreciate your feedback, and I'll definitely consider creating a video on "Object Pooling" it's already in my plans for this series, so keep an eye out for it ;)