Тёмный

The Most Common Mistake Beginners Make in Unreal Engine | UE5 

Ali Elzoheiry
Подписаться 34 тыс.
Просмотров 114 тыс.
50% 1

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 685   
@peppastone
@peppastone 6 месяцев назад
This is the kind of tutorials youtube needs more of! You actually explain conecepts, instead of just telling your viewers to copy paste some code with no explanation. I don't leave comments often, but you definitely deserve it.
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you so much for your kind words! I really appreciate your support and I'm glad you find my tutorials helpful and informative. Your feedback means a lot to me.
@sgtpeppr778
@sgtpeppr778 6 месяцев назад
I literally came down here to write the same sentiment. Thank you!
@reede140
@reede140 5 месяцев назад
Here to say the same, this is a really great video and i'm excited to see more in the series. Started watching this channel to start learning some basic AI stuff, but this kind of content I will absolutely love to see.
@tips6233
@tips6233 Месяц назад
What are conecepts? I have only been using UE for a little over a year but never heard of this?
@perochialjoe
@perochialjoe 7 месяцев назад
It's almost uncanny how you described my exact method for this at the beginning. Thanks a lot for not just teaching solutions to problems, but teaching more efficient workflows and good practices while you're doing so. It might be more work up front but it absolutely pays off!
@maxten1463
@maxten1463 7 месяцев назад
What's uncanny is his eyes bro is seeing into my future
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you @@perochialjoe I'm really happy that you see the value in what I do. I truly try to teach how to become a proper developer instead of just how to copy and paste code. Glad that you find it helpful. Thanks for watching and commenting ☺️🙏
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hahah thanks @maxten1463 ☺️
@swarnavadas5461
@swarnavadas5461 5 месяцев назад
You are an ABSOLUTE SAINT for actually explaining where concepts can be used for actual functionality in the engine instead of just showing people how to make a shiny looking functionality. God bless you man.
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you! I appreciate your kind words and I'm glad you find my explanations helpful.
@EdenPresents
@EdenPresents 7 месяцев назад
I dont leave comments often, but just wanted to say that your tutorials are easy to follow, and I enjoy watching them! Youre doing a great job!
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey Eden, thanks so much for watching and commenting. I'm really glad you found this useful 🙏
@visualfinesse7445
@visualfinesse7445 2 месяца назад
I've been watching tutorials for a while - not once has anyone talked about a coding pattern with UE5 blueprints. What a legend.
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Thank you so much for the feedback, I appreciate your support. Indeed it seems people forget that blueprints are still code, and you need to follow proper coding practices when building them
@jomesias
@jomesias 7 месяцев назад
In Unreal 5.2 and up, You can also just call interface functions on the overlapping or hitting actor. The enemy calls the player when hit and dead, the player calls the interface function for the door, when no more actors of class exist each time an enemy dead event is called. There are many ways of creating in Unreal with the new interface functionality. I’d say use interfaces to generate blueprints fast, and when working you can refactor to use proper patterns
@Fafhrd42
@Fafhrd42 7 месяцев назад
Interfaces are not new to 5.2. Epic has been recommending using Blueprint Interfaces for years and years because the hard reference created by a Blueprint cast can be extremely costly memory wise.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Unfortunately blueprint interfaces don't support having event dispatchers in there. So you would always need the exact reference to the class to bind to an event from it. And even if interfaces supported event dispatchers, you would still need a reference to some class that implements this interface to bind to it
@Fafhrd42
@Fafhrd42 7 месяцев назад
@@AliElZoheiry Technically, you just need a reference to the actors that implement the interface, not their class (and you can use 'Get All Actors With Interface' to get the actors at run time). I believe it's also possible to define delegates in a native UInterface class, and set them up so they can be bound in Blueprint, but I haven't tried it.
@jomesias
@jomesias 7 месяцев назад
@@Fafhrd42 cool! Sounds awesome, that get all actors with interface must be costly too though :( Like I stated in my initial comment: use interfaces for prototyping fast, then when that works think about refactoring and changing it to use design patterns.
@jomesias
@jomesias 7 месяцев назад
@@AliElZoheiry correct, I personally use the hit or overlap events for the interactive part. (The collision system part that is) So I have both the overlapping and overlapped (and hitting) objects available in those events. So it’s no biggie. If you will use another way of hitting actors (like Multi trace sphere let’s say) you’ll also have the reference to them, so it works out with interfaces just fine too! It’s all about advantages and disadvantages of each method 😁 cheers fellow Game devs
@chantalduxfield
@chantalduxfield 6 месяцев назад
This is the kind of UE tutorial video I've been searching for for years! It's so much easier to understand concepts and retain that kind of information when it's described and showcased in this way. Excellent work!
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you for your kind words! I'm thrilled to hear that you found the tutorial helpful and easy to understand. I aim to make complex concepts more accessible and it's rewarding to know that it's making a difference for you! Keep watching for more helpful content in the future.
@1point521
@1point521 4 месяца назад
THIS is EXACTLY what youtube tutorials should be like! Very helpful, easy to understand, you explain the why and hows. Perfect, thank you
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Thank you for your kind words! I'm thrilled to hear that you found the tutorial helpful and easy to understand. Your feedback means a lot to me! 😊
@3dsakr
@3dsakr 7 месяцев назад
A great tutorial!!, but there is a little adjustment that I would add to make it much better: instead of dispatching an event from the enemy, 1- I would create my own GameInstance class, and this can be referenced from anywhere. 2- Now in my GameInstance class, I would add the event dispatcher that you added in the enemy 3- in the enemy, call the GameInstance event that you added 4- in the widget, just reference the GameInstance, and bind to the event the benefit: you won't need to iterate all enemies to bind so many events (consider the worst case scenario of having thousands of enemies where you will have thousands of binds). Regards!!
@ByteShock
@ByteShock 7 месяцев назад
The game instance should only contain stuff that is necessary to "survive" level switches. Using interfaces is the best way. But in the end it doesnt really matter, as long as you are happy with it. :D
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey 3dsakr, what you're describing is an attempt at creating the observer pattern with an event bus, which unfortunately doesn't have native support in blueprints. I will be going over a custom implementation you can use to create an event bus and prevent these hard references, but first I wanted to explain the "simple" concept first.
@xForseen
@xForseen 7 месяцев назад
@@ByteShock You still use interfaces. Just between the gameinstances and widget instead of enemy instances and the widget. This avoids hard references.
@danielszucs281
@danielszucs281 Месяц назад
Just started to learn UE game dev, trying to make a simple game and this is one of the best kind of UE5 tutorials for beginners. Thank you!
@AliElZoheiry
@AliElZoheiry Месяц назад
You're very welcome! I'm glad to hear you're finding it helpful. Best of luck with your game development journey, and thank you for watching! 🙏
@Daniel-sn5se
@Daniel-sn5se 5 месяцев назад
My mind is blown how clean and easy someone is explaining that! You are a gem in all these Unreal tutorial channels. This is a real learning lesson and not just ''look at me how I did that and try to copy''. This is awesome.
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you so much for your incredibly kind words! I'm happy to hear that you find my tutorials helpful and valuable. Your support means a lot to me! Keep learning and creating amazing things in Unreal Engine!
@DarkoSubotin
@DarkoSubotin 7 месяцев назад
You could also update a variable in game mode class, the game mode could have its own event dispatcher and be called when an update occurs, and everyone listens to that ED in the game mode. This way you don't have to get all actors of class just the game mode. Game mode is accessible from anywhere so that would make it also easy to update the variables.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey there! What you're describing is the Observer Pattern using an "Event Bus" which is exactly what I'll be working towards in this series, but unfortunately to explain the concept the best way I can, I have to explain some other patterns first. You are already 2 steps ahead, well done 💪
@realarchanger
@realarchanger 7 месяцев назад
This is really kind of UE related content I've been looking for. Actually I'm pretty sure you did some kind of poll while ago or something and I was mentioning back then, that THIS kind of videos or tutorials or explanations is what I'm missing. I can't say I'm struggling, but there are times when I'm discussing my approach of designing some systems with experienced programmers. Thank you for this and I'm looking for more of this.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey there, thanks a lot for the feedback, I did indeed make this tutorial based on community polls and feedback, so if you participated in those, then thank you so much, you're the reason for this kind of content 🙏 and I'm really glad you see the value in it. I'll definitely keep em coming
@OverkillTheory
@OverkillTheory 7 месяцев назад
While you don't have any hard references anymore with an event dispatcher you still have to bind to each enemy when the widget is constructed. In a way this is similar to holding a reference to the enemies you did the bind for. If any new enemies are spawned after the widget was constructed they will call the event dispatcher but the bind on the widget won't fire. I find this counter intuitive as other more traditional pub/sub methods use named channels for messages and don't need binding to specific publishers. I'm not sure if Unreal Engine has something like that but I feel like it would be a better approach to this problem.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey there, thanks for the feedback, and indeed what you're saying is correct. In the sense that the widget still has to reference the enemy, so they are coupled in that way, but not dependent on each other's implantations. The solution to that is using the observer pattern with an event bus for a specific subject, so that the subscriber can just listen to all events coming from that bus without referencing the actual class that published the event. And that is indeed what I'll be covering in later videos once I cover the component design pattern, since they are connected. But you're already one step ahead ;)
@Velgan83
@Velgan83 Месяц назад
I've just started learning UE5 a week ago, almost done with my entry level course, and I already now THIS will be mega usefull since I want to make a dungeon crawler and I actually need to check if all the bosses are dead to validate a run. Thanks a lot, this will come handy later on! Much love!
@AliElZoheiry
@AliElZoheiry Месяц назад
Hey, thanks for your comment! I'm thrilled that you found the video helpful and that it will be useful for your dungeon crawler project. Good luck with your learning journey, and feel free to reach out if you have any questions in the future!
@Velgan83
@Velgan83 Месяц назад
@@AliElZoheiry Thanks again for the kind words! Alright, gotcha, I won't hesitate then! Thanks again for your time! Have a nice day :)
@elumixor
@elumixor 2 месяца назад
It's probably the best quality tutorials on UE5 that I have seen!! Thank you!
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Thank you for your kind words! I'm happy you found the tutorials helpful 🙏
@MichaelDavis-nu3sz
@MichaelDavis-nu3sz 7 месяцев назад
I've watched a few of your videos, and many others of others. And I have to say I am really looking forward to this series. The way you explain your code and the design patterns within it are some of the best ive seen on youtube.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you Michael, real glad you found it useful 🙏☺️
@juggernautx1779
@juggernautx1779 7 месяцев назад
Love these videos that resolve bad practices from other youtubers, amazing!
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you so much for your comment 😊🙏 I do indeed try my best to showcase good practices so that people don't end up with a mess and not know why. Glad you see the value in that
@JC-nx3lk
@JC-nx3lk 3 месяца назад
Great video, thank you. Clear explanation and examples. Shocking how difficult it is to find this kind of information in such a concise way. Subbed, please keep up the great work.
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Thank you for your kind words! I'm thrilled to hear you found the video helpful. I appreciate your support and look forward to continuing to provide valuable content for you! 🙏
@Hamad_S
@Hamad_S 7 месяцев назад
Great tutorial! Thank you very much. For the example you provided, I think that using the loop and bind event in multiple places might not align with best practices. I'd suggest using bind Event and the loop in single location, such as the Game Mode or Level Blueprint. This way, all necessary actions triggered by an enemy's death, like opening a door or increasing the score, can be handled in one place. I think it helps maintain best practices. Please correct me if I'm mistaken. Also, the Unreal Engine community greatly benefits from such great tutorials. Your direct and simplified approach is fantastic, and I hope you continue sharing more!
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey Hamad, great catch! That is indeed not the final implementation, what you're suggesting is the observer pattern using an "Event Manager" (or event bus), and that is the topic of next lesson. "The mediator pattern", using the mediator pattern, we can implement an event manager that both the publisher and subscriber talk to, thus removing all references and loops. You're already 1 step ahead ;)
@Hamad_S
@Hamad_S 6 месяцев назад
@@AliElZoheiry Can't wait for the next lesson! Thank you very much.
@Butter007
@Butter007 6 месяцев назад
Hands down best tutorial I've watched so far in my early UE5 journey. You explain everything so well. The first video I didn't have to pause and rewatch 100 times.
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you so much for your encouraging feedback! I'm delighted to hear that the tutorial was helpful for you as you start your journey with UE5. Your appreciation means a lot!
@troreen2154
@troreen2154 4 месяца назад
Wonderful video, no bs intro, straight to the point, no waste of time about a life story, love the work, keep it up.
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Thank you! I'm glad you found the video straight to the point and useful. I'll definitely keep it up! 🙌
@samuraischultz
@samuraischultz 2 месяца назад
Definitely putting this in my UE5 tutorial playlist. Thanks, Ali!
@AliElZoheiry
@AliElZoheiry 2 месяца назад
You're very welcome! Glad you found it useful
@Huunneerr
@Huunneerr 3 месяца назад
Really appreciate your videos. I got so many of your vids in a playlist I use as a beginner to unreal engine 5. Just started learning this engine about 2 weeks ago, and it's so enjoyable learning something new and actually being able to understand it. Never stop posting PLEASE!!
@AliElZoheiry
@AliElZoheiry 3 месяца назад
Thank you so much for your kind words! I'm thrilled to hear that you're finding the videos helpful as you dive into Unreal Engine 5. Keep up the great work with your learning journey, and I'm glad to have you as part of the community! 🙏
@ptcmia
@ptcmia 7 месяцев назад
Thanks for creating tutorials that go beyond beginner subjects.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you! I'm glad you appreciate the more advanced topics. Always striving to provide valuable content for learners at all levels.
@YoutubeAccountMan
@YoutubeAccountMan 5 месяцев назад
One thing to note, you don't want to decrement your enemy count variable because it can change if new enemies spawn. It's better to always get all enemies because the performance hit is negligible or have another dispatcher increase count when enemies spawn.
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thanks for the suggestion. In the next video in this series I tackled the issue of spawning enemies as well as killing them, make sure to check it out if you want to see how it's done
@chickenmadness1732
@chickenmadness1732 5 месяцев назад
Thank you. Your Tutorials are sooooooooooo good. I was trying to figure out how to deal with this exact problem and didn't realise UE5 already had built in features for it. Please keep making tutorials on 'best practices' for common programming problems like this. They're super valuable.
@AliElZoheiry
@AliElZoheiry 4 месяца назад
You're very welcome! I'm so glad you found the tutorial helpful. Thank you for your kind words and for watching! I'll definitely keep making tutorials on best practices and common programming problems. Your feedback is super valuable 🙏
@simonasstonys3844
@simonasstonys3844 5 месяцев назад
Your tutorials is next level. Cant understand why you dont have x10 subs. You like Brackeys but in Unreal. Keep going!
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you so much for the kind words and the comparison to Brackeys! I'm thrilled that you found the tutorials helpful, and I genuinely appreciate your support. Keep creating!
@lxyuan14517
@lxyuan14517 4 месяца назад
wow,just 3 month, this video had been watched 82000 times! This tell us the useful knowledge is the most important and polular.
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Wow, indeed! It's great to see the video being so well-received. Thank you for noticing and for your kind words! 🙏
@Zero-bg2vr
@Zero-bg2vr 6 месяцев назад
really loved this video brother, may Allah reward you. Rather than giving code you actually gave a pattern that we can use and fill the code in our selfs.
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you my friend 🙏 that's exactly what I meant to do, teach you to code instead of teaching you to copy code 😊
@maskn7208
@maskn7208 6 месяцев назад
I feel like this is one of the best unreal guides ive seen, really like it man thanks
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you so much for your kind words and feedback! I'm happy to hear that you found the guide helpful. If you have any more questions or need further assistance, feel free to reach out!
@hardwire666too
@hardwire666too 7 месяцев назад
This is probably the best explanation on not just how, but also and more importantly, WHEN to use event dispatchers I have ever seen. I find a lot of videos for UE BP skip over the why in favor of the how and it drives me nuts. Sure it's just visual scripting. Except logic is still applied making the concepts, or "the why", still just as important. Without the why things like tick or delay get abused. Good stuff you gained a sub!
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you so much for the kind words! I'm really glad you found the explanation helpful. Understanding not just the how but also the why behind these concepts is crucial indeed for building scalable games. Welcome to the community, and I appreciate the support!
@andriustheviking
@andriustheviking Месяц назад
Love this. Really great teaching design patterns with actual examples!
@AliElZoheiry
@AliElZoheiry Месяц назад
Hey there! Thanks for the positive feedback! I'm thrilled that you found the examples helpful! 🙌
@waw4428
@waw4428 7 месяцев назад
I'm intrigued, why would interfaces not be better for this? Wouldn't an interface send the same message to the blueprint and is actually easier to implement and to include other blueprints in the system? Especially if you have tens of thousands of actors.
@RenegadeRukus
@RenegadeRukus 7 месяцев назад
Same. 😅
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
I believe there is some confusion between interfaces and event dispatchers. An interface on its own doesn't really do anything. It simply describes what functions a class should implement to be considered an instance of that interface. It has nothing to do with the observer pattern which is based on 1-to-many communication between subjects and objects. In classical C++ the interface can also describe what events a class is publishing, which would have been helpful in blueprints. Meaning you would use interfaces as an additional layer between the publisher and subscriber but not as a replacement. Unfortunately that doesn't exist in blueprints though
@EHLarson
@EHLarson 7 месяцев назад
This is such a great concise explanation of how Event Dispatcher is like the Observer Pattern. I was "pretty sure" that is what it was used for before this video, but now I am very sure.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Awesome! Glad it helped you gain confidence in your knowledge. I will be expanding on this pattern in later videos to make it even more performant and efficient
@BlueprintBro
@BlueprintBro 4 месяца назад
I don't know why it has took me this long to properly understand the event dispatcher but I am glad to have come accross your video. Explained the pattern and the technique in an excellent manner. Subscribed
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Thank you so much for the kind words! I'm glad the video helped you understand the event dispatcher. Welcome to the community, and thanks for subscribing! 🙏
@soadindakhor3932
@soadindakhor3932 6 месяцев назад
one of the best Unreal training videos….very clear, very focused, superb example
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you so much for your kind words and support! I'm happy to hear that you found the video helpful and engaging. Your feedback means a lot to me 🙏
@szymongruca3068
@szymongruca3068 4 месяца назад
Thank you! This really would change my workflow as a begginer in unreal and will probably save me a lot of time.
@AliElZoheiry
@AliElZoheiry 4 месяца назад
You're very welcome! I'm glad you found it helpful. Always happy to hear that it's making a difference in your workflow 🙏
@JairusC
@JairusC 7 месяцев назад
I'm very new to a lot of Unreal Engine 5 and working within its BPs. It's safe to say that I don't entirely understand everything here, but I do want to comment on the fact you explain things very eloquently and also mention examples of why this "Publisher + Subscriber," or "Caller + Listener," pattern is VERY practical and resource efficient. I'm definitely subscribed and hoping that I'll be able to understand a lot of this in the near future. Haha. Thank you for this!
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you for watching and commenting ☺️🙏 really glad you found my teaching style helpful, I do put a lot of time and effort into making sure that things make sense before I hit that record button. glad you see the value in that.
@sniper44x
@sniper44x 3 месяца назад
Oh wow, great tutorial man, instantly following through all the way along no problem, loved it
@AliElZoheiry
@AliElZoheiry 3 месяца назад
Thank you for your kind words! I'm thrilled to hear that you found the tutorial so helpful and easy to follow. Stay tuned for more content! 🙏
@Zeis
@Zeis 6 месяцев назад
That was fantastic. I've watched several tutorials, including paid udemy tutorials to get my head around event dispatchers and none of them made sense to me. But you explained it to clearly with such great examples AND didn't just go over which nodes to use, but also why! Thank you! Instantly subscribed.
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
I really appreciate your kind words! Glad you found it useful 🙏😊
@chomnansaedan4788
@chomnansaedan4788 6 месяцев назад
I knew it was correct to use Event Dispatchers I just didn't know why. Coupling and the ramifications down stream. Thanks for clearing that up for me.
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Glad to be of service! Thanks for watching 🙏
@oscblade1691
@oscblade1691 5 месяцев назад
This was great tutorial very well taught with easy to follow instructions and descriptions that help you to really learn what is being taught. I have learned about event dispatchers already but this made them more understandable to me.
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you so much for your kind words! It's happy to hear that the tutorial helped you gain a deeper understanding of event dispatchers. I'm really glad you found it useful.
@oscblade1691
@oscblade1691 5 месяцев назад
@@AliElZoheiry I know this has nothing to do with your tutorial but I am working on a project and I am running into a issue I can not find a solution to. I have been asking around to find a solution but have not got an answer yet. Anyways I am making a character that can either be in third person or sidescroller with a camera on the right side. I have it with a enum that lets you switch between which camera is in use. I also have the code where you can switch between being able to move everywhere or just on the x axis. However, I can not seem to figure out how to activate the y constraint in code only when I set the player to sidescroller. If you have a answer for this that would be great if not no issues. Thanks again for this tutorial I have already watched another video and plan to go through more of your videos here soon.
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Hey @@oscblade1691 Unfortunately I've never done sidescrolling in unreal engine, so I'm not sure what the issue is :(
@oscblade1691
@oscblade1691 5 месяцев назад
@@AliElZoheiry that's fine thanks for replying
@artkalm
@artkalm 6 месяцев назад
Nothing new but explanation is clear and coherent. I wish somebody told me all this when I only started to learn UE. Good work!
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you for the positive feedback! I'm glad to hear you found the explanation helpful. It's always great to know that my content is providing valuable insights to new learners.
@crisppxls
@crisppxls 5 месяцев назад
Thanks for the tutorial! Ive been looking for a way to include a remaining enemy counter for my retro shooter and this will work perfectly
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
You're welcome! I'm glad you found the tutorial helpful for your retro shooter. Good luck with implementing the remaining enemy counter!
@EvasHookGame
@EvasHookGame 7 месяцев назад
Hello from France ! After 6 months of learning C++, I'm on learning UE5 learning journey for 1 month and a half, I just worked myself through Blueprint Interfaces to communicate between Target, Trigger, via Gamemode in my little practice aim game. I had a hard time understanding how casting works even though it seems so simple ! Your video is so clear, gave me few tools and opened my mind on some aspects, I will look for more about your work for sure, thank you very much Ali ! +, just the way you drag nodes effortlessly to align them shows a lot how many hours you may had been practiced UE lol Thanks for your time if you read that :)
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey there, Thank you so much for your kind words and feedback! I'm really glad to hear that the video was helpful and that you found it insightful. Keep up the great work on your UE5 journey, and feel free to explore more of my content as you continue to learn. And yes, the hours spent practicing UE have definitely added up! Stay connected and all the best with your learning endeavors!
@BaseRealityVR
@BaseRealityVR 7 месяцев назад
WOW I am currently working on a remaining players display, and see this video in my feed, But Your tutorial style is perfect and clear and fully explained, and not just a do this BUT also WHY! :) subscribed !
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you for the kind words and for subscribing! I'm glad you find the tutorials helpful and explanatory. Good luck with your remaining players display project!
@PatrickTheDM
@PatrickTheDM 7 месяцев назад
Excellent tutorial. Anyone could understand this the way you explained it.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you! Really glad my teaching style resonates with you. I do put a lot of effort into making things as streamlined as possible ☺️🙏
@merccc1
@merccc1 5 месяцев назад
I often find that the most difficult part of learning this engine is just how exactly to go about things and the best practices. Stuff like this really helps bring clarity. I mean, even if I can figure out what an individual feature does, It is still very difficult trying to work out exactly how, or more specifically, when, to use it. Never understood event dispatchers, or that little red box at the top right. Always get confused with most of the tutorials covering them, or they just seem to be missing something. This was really well done, and many things started to click. Only issues now are knowing how to use all the other options besides just call and bind that the event dispatcher has. When should I unbind, and when to use dispatcher over other things; Lets say for example, over interfaces. I suppose sense this is for observing when something happens, interfaces are just more for when you actually interact with things more directly. Like communicating to the button you are pressing, or the gun trigger you are pulling without specifically targeting a specific one. At least that is where my head is on it for now.
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Hey there, I totally get where you're coming from, Unreal Engine can be quite overwhelming at times. Event dispatchers and interfaces can be a bit tricky to grasp initially, but essentially event dispatchers are great for signaling when something happens, while interfaces are more about direct interaction. Knowing when to unbind and when to use dispatchers over other options does indeed require a deeper understanding of the context and specific needs of your project. Glad to hear that things are starting to click for you, keep at it!
@revan9903
@revan9903 5 месяцев назад
Very nice video. I look forward to see the upcoming ones because I find it very interesting to learn how to use Software Design Patterns in Unreal/Game Dev for better code and which ones to use. Also very good explanied. Love your videos. :3
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you for your comment and your support! I will definitely create more design pattern tutorials. Glad you're finding the content helpful! 😊
@chupitolepame5357
@chupitolepame5357 4 месяца назад
This is amazing for decoupling, will give it a shot with my current logic. Thanks!
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Glad to hear that you found it helpful! Best of luck with implementing it into your current logic 🚀
@Imtinan.ACEDIA
@Imtinan.ACEDIA 3 месяца назад
Best Series in my opinion. Keep up the good work. ❤
@AliElZoheiry
@AliElZoheiry 3 месяца назад
Thank you for the kind words! I'm glad you enjoyed the series. Your support means a lot! 🙏
@libertarianterminator
@libertarianterminator 6 месяцев назад
Thank you so much!! I always saw the usual tutorials and I thought "there is no way I should reference other actors for everything. There has to be a better way" and yes there is. Now I know how to make a light turn green when I deposit an item quest.
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
You're very welcome! I'm happy to hear that the tutorial was insightful for you. If you have any more questions or ideas, feel free to share them!
@weikor6545
@weikor6545 7 месяцев назад
I asked somehting along these lines in discord a few weeks ago, its still been a bit of a problem. Now you made the perfect video! Thanks a lot.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
That's awesome to hear! I do take all feedback into consideration when making a new video, so it could have very well been your question that led to this video. Glad you found it helpful 😀🙏
@MrAwesomeChel
@MrAwesomeChel 4 месяца назад
This is probably the best channel about UE. Thank you very much!
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Thank you for your kind words! I'm thrilled that you find the content helpful. Keep creating and learning! 🙏
@ThatGhostsHost
@ThatGhostsHost 7 месяцев назад
THIS right here is high quality teaching!! not a copy and paste video, ironically considering the topic; Software design pattern
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you so much for the kind words! I'm really glad to hear that you appreciate the depth of the content and my teaching approach. Your feedback means a lot to me.
@miquelsalvatejedor3123
@miquelsalvatejedor3123 4 месяца назад
Great content Ali! Very well explained and easy to follow, Thanks!
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Thank you for your kind words! I'm glad to hear that you found the content helpful and easy to follow. Your support is much appreciated 🙏
@MorafixHD
@MorafixHD 16 дней назад
holy shit. Awesome video. Your style of explaining and teaching is nice and easy to follow. Keep going!
@AliElZoheiry
@AliElZoheiry 16 дней назад
Thank you so much for your kind words! I'm glad you found the video helpful. I appreciate your support 🙏
@texaslinux
@texaslinux 5 месяцев назад
This was a very well done explanation and illustration, thank you!!
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you so much for your kind words! I'm glad it was helpful. Keep an eye out for more content in the future.
@1play2fun
@1play2fun 5 месяцев назад
It's a bit of a mistake to add manager logic to a widget. You should have an enemy manager class (AActor, AInfo, UObject, custom pure cpp class without UCLASS) which will spawn enemies and which will subscribe to their events. The widget should ask the manager how many enemies there are and subscribe to the manager's death event. In general, the video is right about avoiding dependencies and this pattern is perfect for solving this problem. Also, it is worth mentioning that in the BP you can't pass delegates as a function parameter, which is sometimes very important. For example, you open a dialog box widget and you want to wait for its completion (When the user chooses YES or NO). You should just pass a delegate and it will be executed when the user clicks the button. But in BP you have to create an object, take its event dispatcher and subscribe to it, which violates the OOP principles a bit
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thanks for the feedback. You might want to check the next video in the series where I actually implement a lot of the things you mention here. These aren't part of the video because it's not the "Observer pattern" that allows for a solution like that, but instead the "mediator pattern" which is the topic of the next video
@souhaibbenchaker4824
@souhaibbenchaker4824 6 месяцев назад
Not the best solution to the problem at hand, but you've earned a sub because you're teaching a concept instead of just giving a solution to a problem.
@BilalAzeem
@BilalAzeem 6 месяцев назад
interfaces then?
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thanks for your comment! Glad you enjoyed the concept
@Wrexthor
@Wrexthor 7 месяцев назад
Something you could add to avoid hard references to actors (like you have currently) is handling dispatchers in actor components. In that way you can have a reference to a generic character instead, get component by class, bind to onDeath that is ran in the component. Hard references should be avoided when possible because otherwise you will always have the entire enemy class and all its dependencies in memory whenever the Widget is in memory. Maybe its too much for one lesson, but i think it would be better to not teach hard references. I think these types of videos are badly needed and i hope you will make many more in the future. Excellent presentation and easy to follow.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
I like how you think! You're indeed one step ahead of the rest ;) My plan is to cover actor components when I talk about the component design pattern, and show how it relates to the observer pattern as well. The result would be very similar to what you described, and one of the benefits is indeed runtime "soft" references that can be garbage collected easily
@carlosrivadulla8903
@carlosrivadulla8903 7 месяцев назад
wow I need a tutorial about this. Soft references + using dispatchers inside components
@jackie.p6891
@jackie.p6891 7 месяцев назад
@@AliElZoheiry if you're going for "soft" references, I would advise using interfaces instead. this way you could simply add an IKillable interface, that describes an event you can bind to. you can implement multiple interfaces, so at runtime you could check if the IKillable could be cast to another interface that knows whether or not it's an enemy.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey@@jackie.p6891 Thanks for the suggestion, a lot of people seem to be confused about this. I would definitely add event dispatchers in an interface if possible, but in blueprints, that's just not possible. To bind to an event of a class, you need a reference to that exact class, an interface reference isn't enough because you CAN'T add event dispatcher definitions in an interface. In the next lesson though, as I mentioned, I will be going over the mediator pattern to create an event manager which will remove references all together, both hard or soft
@jackie.p6891
@jackie.p6891 7 месяцев назад
@@AliElZoheiry Oh, my bad. I've been a programmer for years, but am pretty new to Unreal. Seems weird to me that you can't add event dispatchers in an interface. anyway, nice video, I'll definitely check out the next one!
@alexm666
@alexm666 8 дней назад
Finally I found some top quality content on BP in UE5 I was looking for. Thank you so much for this! Question - what if instead of counting enemies in the widget, we created another event couple, say "OnAllEnemiesDead" and the widget would publish it once counter reaches 0, and the door would listen to it? This way the door doesn't need to know anything about the enemies. Thanks!
@AliElZoheiry
@AliElZoheiry 5 дней назад
Hey! I'm glad you found the content useful 🙏 That's a really interesting idea! and actually what I cover in the next video of this series, where I create an "Event Manager" to remove the need of having references to the actors that dispatch events. Check it out here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-y4fE2JdFdvY.html
@MrUbister
@MrUbister 5 месяцев назад
I been learning programming since 2017 and this is what ALWAYS troubles me when the scope gets larger. No matter the programming language, no matter the engine if any. This is the type of universal architecture design logic that's actually at the core. Thank you for this
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you for your feedback! I'm glad you found the architectural design logic helpful, and I appreciate you sharing your experience with programming. Keep up the great work in your learning journey!
@hjhw100
@hjhw100 2 месяца назад
Nice clear video with a good pace. I think the idea of using a software term is good because it helps people understand the principle, however in terms of the approach I would perhaps say getting all actors of class isn't suitable for the scalable method you propose. If you are making a Zelda clone where only one room exists at any given time that's fine but in most cases it would have some issues (ie where enemies would exist in more than one room at a given time). There are a few ways to resolve this but a room manager actor is the most common, it is responsible for controlling the logic for any given room, making it very flexible. Typically you would have a collision component on the room manager that would track the pawns you care about and bind itself to any event dispatchers at begin play. It also means you can start with a base room manager and add layers of complexity for different rooms with children without the need to overload your project with unused code.
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Thank you for the thoughtful feedback and suggestion. I do something similar in the next video of this series by creating a "Combat manager" check it out!
@auchucknorris
@auchucknorris 5 месяцев назад
as a web dev, my first inital thoughts were the bad way, 100% your way is correct, thanks for the pattern
@AliElZoheiry
@AliElZoheiry 5 месяцев назад
Thank you! Glad you found it helpful 💪🙏
@hernangomar5445
@hernangomar5445 Месяц назад
this tutorials are next level, thank you for this
@AliElZoheiry
@AliElZoheiry 29 дней назад
You're very welcome! I'm glad you found them helpful. Thank you for watching and commenting 🙏
@ERBaruin
@ERBaruin 7 месяцев назад
Your tutorials are great! Im switching from Unity to Unreal and it really helps to re learn the basics. Keep it up and thank you!
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
You're very welcome 🤗 really glad to hear that! In Unity it's much easier to find these kinds of tutorials since there's so much info on good C# programming, but it's a lot harder in Unreal's proprietary blueprints, so I'm glad to be filling that gap 🙏
@jgrodrigueza
@jgrodrigueza 3 месяца назад
Excellent information!!! Very well explained and and clear. Thanks!
@AliElZoheiry
@AliElZoheiry 3 месяца назад
Thank you for your positive feedback! I'm glad to hear that you found the information helpful and clear. You're very welcome!
@sinksinkswim
@sinksinkswim 7 месяцев назад
Great tutorial, been looking for more methods of decoupling to ensure best practices!
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you for the feedback! I'm glad you found the tutorial helpful in understanding decoupling methods for best practices. If you have any more specific topics you'd like to see in future tutorials, feel free to share your suggestions!
@Deiollymous
@Deiollymous 6 месяцев назад
If all unreal engine tutorials were like this, I would be a much much better UE dev. ❤
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you so much for your kind words! I'm truly glad you found the tutorial helpful and valuable. Good luck with your Unreal Engine development journey! ❤
@joanvillora
@joanvillora 7 месяцев назад
The Observer pattern was very well explained. I would put in the title that it is about using the Observer pattern.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you for your feedback! I'm glad you found the explanation of the Observer pattern helpful. The reason I don't have observer pattern in the title, is the sad truth of trying to balance making good educational content, which making sure people click on it, and the truth is, people won't click on a title called "The observer pattern in game development", believe me, I tried. So instead I tried to make it about what the observer pattern helps you avoid and why it's common to make mistakes when you don't know software patterns. That said. I will still try to fit Observer pattern somewhere in the title, or maybe the thumbnail. Thanks for your suggestion.
@MatthewPymAnimations
@MatthewPymAnimations 3 месяца назад
That was great, I learned something new. Thank you so much. I'll be coming back to this video a few times I think for use in my own project 🙂
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Thank you for the kind words! I'm really glad to hear that you found the video helpful and that it will be useful for your project. If you have any more questions, feel free to ask.
@janschrader8048
@janschrader8048 6 месяцев назад
Greate explanation, easy to follow and actually understand the concept of observer patterns. Kudos! 🏆
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you so much for the support Jan Schrader! I really appreciate it 😊🙏 I'm happy you found this useful
@pisoleto
@pisoleto 7 месяцев назад
Could be super nice a serie about the good way of taking objects like swords, spells... etc, how to save them in a bag or whatever, organize them and combine it with the last serie. Thanks! U're awesome!
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey! Thank you for the suggestion! I'll definitely consider creating a series about managing and organizing objects like swords and spells in a bag or inventory, and how to combine it with the existing series. Your support means a lot!
@blackshinobi956
@blackshinobi956 7 месяцев назад
Great video, I'm really looking forward to this series because sometimes I struggle to figure out how design patterns translate to BPs. Thanks!
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you! Glad you're finding these topics useful 🙏 I wasn't sure either in the beginning if this was going to be interesting for people but it seems there is a need for this type of content indeed
@GameTourist491
@GameTourist491 6 месяцев назад
Such a concise and informative tutorial. Really helps me a lot. Can’t wait to see more content like this.
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you for your kind words! I'm thrilled to hear that you found the tutorial helpful. Stay tuned for more content like this in the future! 🙏
@ProxyRushSc2
@ProxyRushSc2 7 месяцев назад
Amazing tutorial again. One of the better channels for all type of tutorials on youtube for sure
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you so much for the kind words! I'm really glad to hear that you find my tutorials helpful. Your support means a lot to me!
@protophase
@protophase Месяц назад
Amazingly easy to follow tutorial
@AliElZoheiry
@AliElZoheiry Месяц назад
Thank you! I'm glad you found it easy to follow 🙏
@raisgamesnz325
@raisgamesnz325 7 месяцев назад
Very good video. I knew the observer pattern, but not how to do it in UE. Thank you! Excellent example too.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
My pleasure 😊🙏 glad you found it useful
@mojhin
@mojhin 4 месяца назад
very straightforward and clear, +1 sub
@AliElZoheiry
@AliElZoheiry 4 месяца назад
Thank you! Welcome to the community 🙏
@GloriaTheAnimator
@GloriaTheAnimator 7 месяцев назад
i wish this was the only tutorial style on youtube, best tutorials, FINALLY THEORY INSTEAD OF CLICK THIS AND THAT AND IT WORK TRUST ME BRO tutorial
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you so much for your kind words! I'm really glad to hear that you find the theory-based approach valuable 🙏
@GloriaTheAnimator
@GloriaTheAnimator 7 месяцев назад
its much more helpful in the long term since it helps you think better and what aproaches to take to common problems, please make more theory based videos
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Next one coming quite soon ;)@@GloriaTheAnimator
@shadowtjnl
@shadowtjnl 7 месяцев назад
Amezing.. Designer patterns tutorial series in game dev ...absolute insane :) very hard topic to explain in a way everyone can follow along .. absolute amezing and can not wait for the upcomming patterns :) absolute amezing work :)
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you so much for your comment 😊🙏 glad you found this helpful. I'll definitely be making more
@roguepithlit
@roguepithlit 7 месяцев назад
Great video, thank you for covering good coding practices and patterns!
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thank you! I'm always excited when I hear that someone sees the value of good coding practices! Thanks for watching and commenting ☺️🙏
@RikkuTheDead
@RikkuTheDead 3 месяца назад
i learned some UE at school, more specifically blueprinting and i have been refreshing it a little and stumbled across your videos, i am flabbergasted, the way you explain things is so clear and simple! amazing work man! you're A-grade teacher material!
@AliElZoheiry
@AliElZoheiry 3 месяца назад
Thank you so much for your kind words! I'm really glad to hear that my explanations are helping you understand UE better. It's feedback like this that makes creating these videos so rewarding. Keep practicing and exploring, and I'm sure you'll keep mastering your skills!
@voidconcepts
@voidconcepts Месяц назад
I aint even gon' lie it was really hard to focus past them eyes! I was searching for tips and tricks for user interfaces...and then wheeeew. But on a serious note leading with the direct solution/problem/the pertinent info is a GREAT S-Tier video format. Not sure of your channel but very and I mean VERY few people follow this format/layout.
@AliElZoheiry
@AliElZoheiry Месяц назад
Thank you for your feedback! I appreciate your thoughts on the video format and I'm glad you found it effective. Hope you enjoy the content! 🙏
@VRDivision
@VRDivision 6 месяцев назад
dude I love how you explain things, great job!
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you so much for your kind words! I'm really glad you appreciate the way I explain things.
@BrainsCloud
@BrainsCloud 7 месяцев назад
Thanks, Ali. I have a question, can we do another event dispatcher in widget, which calls after all enemies are dead, and bind the door to this event dispatcher in the level blueprint?
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey there, the main problem with that approach is that the door will now only open if the level has the widget, and the door needs to get a reference to the widget to bind to it's published event, so that is quite messy and causes a lot of unwanted dependencies
@sirwalden
@sirwalden 6 месяцев назад
Best channel on youtube for UE5! Thanks for great content!
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Thank you so much for your kind words! I'm glad you're finding the content valuable. Your support means a lot! 🙏
@palvelusmusic
@palvelusmusic 6 месяцев назад
Oh would you look at that! Recently i wanted to use something like this, i was sure that the dispatchers did something like this, but I just didn't know how to actually use them. Thanks! Amazing tutorial ❤
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Hey, I'm glad the tutorial helped you out! Dispatchers can be tricky at first, but once you get the hang of them, they're super useful. Good luck with your project! 😊
@sadravin1
@sadravin1 7 месяцев назад
Another thing that bugs me is, why are you using a loop? You don't need one at all. You are using an integer to count right? If you use the broadcast option, just have the listener trigger a -1 to that integer for each time it is notified of a death. No need to check the enemy game objects for anything. Your effectively counting twice and ignoring the integer in the end. The only reason I can think to do this is when 2 mobs die at the same time, it may only trigger once as the listener can't distinguish between how many are yelling at it. If that's your issue, then that is one more reason to not use this method.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey there! Thanks for your feedback and suggestion, check my other comment if you need more info ;)
@spyxx
@spyxx 7 месяцев назад
Clear communication and explanation.. Great job Ali.. keep going man
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Thanks so much 😊🙏 I'll definitely keep em coming
@TheKr0ckeR
@TheKr0ckeR 2 месяца назад
I am very glad to find your channel!
@AliElZoheiry
@AliElZoheiry 2 месяца назад
Thank you so much for your kind words! I'm thrilled to have you as a part of the community! 😊
@prototypega8257
@prototypega8257 6 месяцев назад
From my point of view you create still Problams if you handle Communications like this. "On begin Overlap" or "On Button Pressed" for Example are Event Dispatcher used in the correct Position. As a Feedback from Component to its Parrent Actor. An AI Character for Example should Feedback its Death to the Game State for Respown Options and AI handle, more over the Game State holdes all Player States to Split the Exp, Loot Kills and Assits or what ever.The Events Triggered in Game State to Update the Stats and Save game in Gamemode also Update all Playercontroller UI.
@AliElZoheiry
@AliElZoheiry 6 месяцев назад
Hey there! Thanks for your feedback, and what you're describing is actually a different design pattern called the "Mediator pattern", and you are correct that it is the next evolution for this solution. That's exactly why the next video in this series was about the mediator pattern, and I implemented an Event Manager in the game state, similar to what you're describing. But to teach these concepts in a digestible way, I take them step by step instead of teaching multiple patterns in a single video
@PedroOliveira-sl6nw
@PedroOliveira-sl6nw 7 месяцев назад
I so needed to watch this yesterday. My work today needed this.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
There is always time to refactor ;)
@FTWSamFisher
@FTWSamFisher 7 месяцев назад
Havent done much in unreal but i did learn this in Dreams xD. Have some way of organizing data outside the objects so they are not dependent on each other.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey there! Thanks for your comment. It's great to hear that you're learning and exploring different platforms. Organization and decoupling of data are essential for creating scalable and flexible projects, regardless of the development environment. Keep up the learning and experimenting!
@threedking
@threedking 7 месяцев назад
Great! Few tips to upgrade it: You have to bind to all enemies(iterate through) on constract of every you subsr. Its mean that you write same code a lot of times, that pretty WET, not DRY iykwim. And you can do it only with your enemy class, that is pretty hard ref too. And seems you binded on construct, it cant react on new spawned bots during the game. So it's better to have some common object, maybe in game instance(not in level BP, couse it's logic wouldn't go in other level), to deal with current num of enemies(better if they will bind/unbind themselfs on BeginPlay and on Destroyed, so you no need to iterate throu and it will work with spawned bots) and "publish" info about changes. Just realized that It's more about mediator pattern)
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey there! Thanks for the tips, what you're describing is indeed the observer pattern using an event bus, which doesn't have native support in blueprints unfortunately. But I will actually be covering my own custom implementation of something similar once I go over the component design pattern, since they are connected, but I of course wanted to explain the "basic" implantation first
@beidero
@beidero 7 месяцев назад
Personally I would prefer to make some sort of event manager object, call that from the enemies and emit the event from there. That way you don't have to subscribe to every enemy, in case you spawn more or so while the game is running. But that might just be personal preference.
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey Beidero, Indeed an event manager or "event bus" is the ideal solution, and I am working towards that in the series, but before I go into that I have to explain a couple of other patterns, mainly the component design pattern. You are already a step ahead, stay tuned for that change ;)
@eFko_
@eFko_ 7 месяцев назад
Great video! Would have helped me a lot when I made my first UE game into a game jam. Where basically there was a door system and security guards that had access cards. The player was able to find and use the card, but unfortunately a few hours before the end of the competition I broke the whole thing down by having all the doors open when one guard walked through or then not close behind him or when they walked in the door at the same time it made a mess and so on.. :D (Because I trusted myself enough, so I didn't use any version control) Thanks for the helpful stuff!
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey, thank you for sharing your experience! Sounds like a challenging game jam situation, but it's all part of the learning process. Happy that I could be helpful 🙏
@seancraig1591
@seancraig1591 7 месяцев назад
You've got the right idea but I think you're execution is poor. You've added the event dispatchers to the actors, which means that anything that wants to subscribe to the event has to find EVERY actor that implements that event and subscribe to it. You've also subscribed to the events on startup. If an enemy is spawned at some point later and dies, no-one will know about it. The way you've implemented it means that each subscriber has to know what is implementing the event. The whole idea of the observer pattern is that the publisher and subscriber are independant of each other - each without knowledge of the other or even if the other exists. You also added a hard reference to a Door in the Level Blueprint. This creates a dependency between the two. The Door should be a blueprint, then create a child blueprint from that (if you want doors with different behaviour) and in that subscribe to the 'enemy died' event. The event dispatchers should be on a singleton, like the Game Mode for example. That way each 'system' only has to subscribe once (to the event on the Game Mode) and it doesn't matter how many actors implement the event or even if/when they're spawned. This essentially makes the Game Mode an 'event manager'. How will this scale? What happens if you add another 10 events? Another 10 doors? Implementing it this way would cause a lot of duplicate code and dependencies. Sorry, Ali but I don't think this is a good way to do it.
@Lingsvn
@Lingsvn 7 месяцев назад
Your comment should be at the top
@AliElZoheiry
@AliElZoheiry 7 месяцев назад
Hey there Sean, thank you for your feedback, I really appreciate it. What you're describing is the "Observer pattern" using an "event bus", which is built into a singleton class that any actor has access to and can subscribe to. This would indeed avoid hard references. It's amazing that you already have this knowledge, but as a teacher, it's important to walk the student through all the steps needed to get there, which means I first have to describe the Component design pattern and the singleton pattern, once combined, create an observer pattern with the event bus, utilizing all we have learned. If I start teaching the end goal right away, it will be very complex and confusing. I appreciate your feedback though, keep it coming please!
Далее
Why I’m switching from Unity to Unreal Engine
9:02
We finally APPROVED @ZachChoi
00:31
Просмотров 2,2 млн
Why I Started Game Dev In My Late 30s
7:32
Просмотров 21 тыс.
Why Solo Developers Should Use Unreal
9:51
Просмотров 384 тыс.
The Right Way to Spawn Objects in Unreal Engine | UE5
18:03
I Made a Game With Only FREE Assets In Unreal Engine 5
11:45
10 Unreal Engine 5 PLUGINS I can't live without!
9:37
Просмотров 546 тыс.