yes and no... its not being updated on every tick.. its being fetched on every tick with a memory pointer therefore it is not free operation but GETTERS is a simple operation. its super low performance. if you would +1 before displaying - that would be a math operation and local variable memory change and therefore it would be performance wise bad.. the biggest "cost" to your getter in widget was float to text conversion. not float fetch on tick. And I disagree on "no one covers it in tutorials" as I made extensive tutorial on good practices for interactions between actors. so interfaces and dispatchers. Just to be clear - what you are teaching here is BEST PRACTICES. and it's a 10/10 :D But I'm a picky little goblin that likes to do "ugh actually!" and so I did.
Finally a blueprint interface tutorial that actually shows how pass variables between blueprints! This is exactly what I've been searching for for the past few weeks as I've been learning UE5. Thanks so much! Liked and Subscribed
Very nice to see someone with a "best practice" video. I have to say at first interfaces had my mind in a knot but now I understand them much better they are my favorite tool. Imagine my excitement to discover they are also implementable in C++. (note I didn't say blueprint interfaces are implementable from C++, just C++ by using multiple inheritance.)
I'd like to push back on your view of casting in Unreal because it fundamentally gets new devs to over-complicate their system designs. Casting is NOT bad and you shouldn't avoid it at all costs. Casting is in the engine for a reason and it has a ton of uses that you're throwing out if you try to avoid it. Casting is only a problem if you're casting to something that wouldn't otherwise be loaded into memory already. Even then, its only an issue if you have a chain where that object you're casting to has other hard references and casts. In your UI example, your player HUD would reasonably always be loaded and in memory along with your player. Casting to the HUD on BeginPlay and saving it as a variable that you can then update directly is much better than using the Get Widgets Of Class node every time you want to make a change. I completely agree on the binding part of your video, but please don't avoid casting and make communication more complicated than it should be. Hopefully that helps!
You are right! Also half of this video was focused to just show how blueprint interfaces work and whats logic behind it, but I agree with what you say ofcourse that is indeed true!
I saw this comment and I will do another "Well actually"... Casting is not really an issue if you're casting to core C++ classes in the engine or casting to core c++ classes in your main game - those that are compiled into the final build of the EXE. as all classes templates are being pulled into memory on the start of the games exe (so all mechanics in c++ are being available to memory instantly, but not all resources that are in anyway visual). What that means is that when you for example cast to character - you are comparing your class header to a default object template in memory already - so it's a pretty straightforward operation (by the way in blueprints we have access to "get class defaults" but in c++ we have actually option into reference a default COPY of an object and its values after its constructor resolved. So for example, you can get its Scale value when in class defaults it's unavailable). HOWEVER - if you cast to a BP class even though blueprints are nativized by default now, it still creates a default copy of the cast class, constructs it, runs its constructor and then compares the header and signature. So a cast to something very complicated like " fluid ninja actor" or some super complex auto-vine system - will be more memory-heavy. it's less impactful on computation. now - if you cast on tick to something heavy, you get a lot of garbage for the garbage collector therefore you can brick your performance on less memory available platforms like mobile or switch (with its ridiculous 4 GB of shared GPU and RAM).
I started in on UE5 and game dev via tuts about 3 months ago and coming from a programing background I'd been wondering about this a lot. Had just started researching this stuff and your video was great and timely. Thanks man!
I feel like that in this specific case using an event dispatcher seems a lot faster, less fiddly and generally easier. Having an object send the signal to whom-it-may-concern(subscriber list); player handlers and/or player-stats handlers seems more suited keeping track of that. I probably would only really use interfaces for things like interacting and weapon related things: things that need to interact more "specifically" and less "broadly". Anyone who is interested into reading more into that; I suggest the book - Game programing patterns by Bob Nystrom.
I totally forgot about this book which someone recommended like years ago. I never got a chance to read cuz life. But I guess it's a good time to start now.
Thank you so much! As a new developer, I am always on the lookout for better code practices. I've seen a lot of devs that seem to advertise 'dirty' code. They always say casting is bad but they're gonna do it anyway. Makes no sense to me.. and it's really good to be able to recognize bad practices when I see them. Every now and then I stumble over a dev willing to show the *right* way to do it, and that is gold. So, ty! New sub. I will be binge watching your other stuff soon.
I always use property binding instead of function binding. I have not delved into the UE source code to be absolutely sure, but it seems that the UPropertyBinding class takes an FScriptDelegate in its Bind() method. So, I think it's some implementation of the observer pattern, which means that it is not called each frame, but only when the value of the bound variable actually changes. I would be surprised if they haven't done it this way, because that would not make any sense to me. This is much easier to work with as you don't need to care about actually updating the widget, but only about the respective value.
Thanks you for sharing this! I've seen this happen in most if not all most popular UE tutorials, that's why what I've done, and I recommend doing, is to just watch the tutorials for reference and try to apply it yourself the "proper" way. Of course if youre a beginner just follow the tutorials, you'll learn and the "dirty" code is fine if it works.
Great video! Thank you sooo much for this one. Please provide us with more videos like this because it's really essential for creating highly performant code/blueprints in game development.
i’m in the process of switching from unity to unreal, and have been getting very frustrated with all the tutorials. This is the first tutorial I have seen that actually makes sense. Other tutorials like doing health bars and having it zero to one to me is wrong it should be 0 to 100 on a slider, but I couldn’t find a tutorial to do it. I have a long way to go to get good at blueprints after being so used to unities visual programming. Thank you.
its the most effecient to go 0-1. You can create your custom framework, but if you really want to optimize you convert the MaxHP into 1 and MinHP into 0, no matter if the number is supposed to be 100 or 200 or 900 but yes, a lot of tutorials are worthless, the worst i have seen so far was a guy that started with EventTick, put a Sequencer afterwards,immediately followed by Delay of 5seconds... from what i gathered, EventTick should be used only on physic calculation or updating anything graphics related. Delay have ultra specific uses and should not be used in 99% of cases
Thank you for the video. I've been a software engineer for the last 30 years but UE5 is new. That said, a lot of people say use Event Dispatchers, but when I tried I still had to have a reference to the thing that is dispatching so an Interface is what I used. I've watched a few tuts on Event Dispatchers and I still need a reference. If I'm making a character that is spawned in after the game start then I'd have to use a cast to get the thing that is sending the message in order to subscribe. Maybe I have it all wrong?
Happely stumbled on this! Knew I should have been using Interfaces for a while but always was seeing ways to do things without them. Thanks for the clear demo! Suscribed!👏
yeah, don't use binding events if you really really don't have to. UI only needs to be updated when it needs to . I don't use binding events at all. No casting either. Interface is the way to go. No hard referenes either.
Not always is casting bad for example when you have something loaded thru the whole game for example HUD or GAMEINSTANCE there will always be some examples but this comes with experience! Don't worry about it too much!
I just started as a beginner but ive been watching a few videos myself and have seen a lot of different approaches. How does this compare to dispatchers? My impression was by casting anything, you create a memory footprint dependency between those two actors and that can scale if it is not managed. is this more performant or more reliable at the cost of that memory footprint?
We only learn from Masters... as you are! Thank you for this approach! (i didn't learn anything in this video that I didn't already know... but that's cool to see good tutorials like yours ;) )
Great video, a practical example with a good explanation as to why you do what you do! Question! Very often I struggle to decide whether to use interface or event dispatchers as a solution to a problem, mostly I default to interfaces. I am afraid I'm missing some vital information that make this choice harder than it should be. Do you have a few pointers on how to choose between the two?
Many thanks and congratulations for this video! You help more than you imagine a young beginner developer like me, even after watching numerous videos and documentation on Blueprints, communication is a real subject. I'm really looking forward to seeing your next videos !! :) There's probably one thing that would be great to explain (because I see a lot of ways to use the Steam Advanced Session for lobby creation, etc.) but it doesn't have the following situation: I have a main menu and a main map I created the Session functions (Creation, search, join, destroy a session...) My problem is: Player (server) created a session, when another player (client) joins the session, if player (server) comes from the Destroy session during that same time, then the player who joins currently does not do so. cancel the download. A kind of infinite connection. How to have: If the player (server) has Destroy Session, then players currently connecting to the session will cancel the connection and return to the menu. For example in your "Pause menu" video, if the player (server) returns to the main menu, his session is destroyed but at that moment then a player (client) was connecting. And a real topic, which I can't find anywhere, would be to explain why certain video game projects last several years, what are the most common problems that slow down development. (Without taking into account time, money. Let's imagine instead that a developer has all his time, no money problems and works alone, his only constraint is knowledge). And so if an independent developer learns all areas, can he succeed in making an ambitious multiplayer video game? And last subject: Concerning optimization, how to know in advance the limits of video game development, for example, you must respect a number of assets, card size, number of blueprints or Interface. . Because if we prepare a complete gameDesign in the game and we realize 3 years after the start of development that there are technical constraints... I think you understand this :) Fingers crossed, in the meantime, thanks again, well done, this channel is incredible!
Great tutorial. Get all Widgets of Class can be expensive too though. Not as much as binding in the UI, but still more expensive. Best option is to get the UI Var from the player controller or character.
Some good stuff, but honestly for something static like this for money you should just manually set the text inside the char bp on add money, since you made the HUD in your char you could just promote to a variable and cut a lot of unneeded interfaces. Interfaces are great for things that you don't have any easy hard reference for or you want to call to many types of actors with the same call.
Its just an example and usually I put HUD inside of the playercontroller also I was just showcasing how you can use one with simple examples. Thanks for feedback tho appreciated!
I’ve been so appreciative of your videos. Love that you’re covering some better practices. Would you be able to make best practice video on folder structure, Unreal is really bad for moving things around and causing breakage. I’d love to create a third party folder for my Marketplace addons. Marketplace forcing us to load into Content folder makes it really hard to manage a clean structure.
@@RubaDev I was thinking along the lines of managing content within folders as project grows. It breaks a lot of things if you don’t have redirects set correctly, folders don’t completely move or delete. I find moving down the road with a project, I can’t easily restructure folders and things get out of control fast.
maybe they talk about ue3, ue5 i cant see any difference that matters atleast for most games, if you are not planing to create an MMO you are fine with blueprints
It is not recommended for multiplayer game as blueprint runs code way slower than C++ and now you can imagine if you have thousands of actions per second in multiplayer game you will have significantly lower performance as you would have with C++ basically C++ will fire off code way faster than blueprint will ever be able to, especially when it comes to multiplayer games you need to get performance where you can! Although for smaller games COOP or something like Horror/Puzzles you can use blueprints and you probably wont be "that much" affected! Hope it helps!
This isn't a necessary use of interface. There's nothing "wrong" with casting. In this particular example casting would be simpler. I'll use an interface if something needs to be modular, where a class may not exist or class may vary.
Is there any way to figure out where a BPI is called from without digging through every blueprint and finding ones that implement that BPI? Probably not? I've been using Unreal for months and haven't found a way to stack trace BPIs.
I feels like I already watched this like months ago or over a year. It's uncanny similar to the voice and speaking pattern as if I watched this specific video before.
Title is a bit click baity because stuff you show is pretty common in various tutorials, but you're right about this not being present in beginner tutorials. It's not a bad thing though. "Clean Code" and "Good Practices" are concepts you should know about when your work matters. When you're starting, optimization and complicated systems are not your goal. You get to that in time, but you got to start somehere with something simple, binding and casting is simpler than interfaces and net of events, and it also is a perfectly viable solution to many problems. You're telling people why you shouldn't use those, but you're omitting situations they're useful for. There are various levels of complexity in UE systems, and you're not on the top. I could just as well tell you your practices are not the best because widgets should be handled with a HUD class and updated with a viewmodel so text is bound to the field notify and changes only when the variable changes without extra event net, and the health should not be a character's variable but a decoupled component. But it doesn't matter by itself. What you should or shouldn't use depends on the context, and when you're learning, you need the basics. Btw, i don't have a beef with you telling people about those concepts, it's great, just keep in mind these things are in the engine for a reason and you're not telling the whole story.
@RubaDev depends on who you watch. Bigger channels that often have very poor blueprint etiquette (not gonna name drop but you can probably guess a few) usually don't use them. However I have seen plenty of tutorials utilizing blueprint interfaces lately, definitely usually from smaller channels though.
Sir, if you are talking about real programming and says how the viewers should do the things, you are living in the only one universe where the cube is knowing that it should increase players money 😅 In fact, the cube should have a cost field and the field should be taken by the pick up event, which will increase players money for the cost of the cube.
Amen! I love Blueprints on the visual side of the game engine. Materials, artwork, VFX. The game logic really falls hard on me. I’m a Frontend Developer by trade. I struggle hard to build the game mechanics from Blueprints. PHP, JavaScript, Typescript are all bastardized languages, not leaving me much room to stuff C++ into my brain. 😂😂
yes and no... its not being updated on every tick.. its being fetched on every tick with a memory pointer therefore it is not free operation but GETTERS is a simple operation. its super low performance. if you would +1 before displaying - that would be a math operation and local variable memory change and therefore it would be performance wise bad.. the biggest "cost" to your getter in widget was float to text conversion. not float fetch on tick.
And I disagree on "no one covers it in tutorials" as I made extensive tutorial on good practices for interactions between actors. so interfaces and dispatchers.
Just to be clear - what you are teaching here is BEST PRACTICES. and it's a 10/10 :D But I'm a picky little goblin that likes to do "ugh actually!" and so I did.
Thank you for clearing that one out. Pinned!
Finally a blueprint interface tutorial that actually shows how pass variables between blueprints! This is exactly what I've been searching for for the past few weeks as I've been learning UE5. Thanks so much! Liked and Subscribed
Very nice to see someone with a "best practice" video. I have to say at first interfaces had my mind in a knot but now I understand them much better they are my favorite tool. Imagine my excitement to discover they are also implementable in C++. (note I didn't say blueprint interfaces are implementable from C++, just C++ by using multiple inheritance.)
I'd like to push back on your view of casting in Unreal because it fundamentally gets new devs to over-complicate their system designs. Casting is NOT bad and you shouldn't avoid it at all costs. Casting is in the engine for a reason and it has a ton of uses that you're throwing out if you try to avoid it. Casting is only a problem if you're casting to something that wouldn't otherwise be loaded into memory already. Even then, its only an issue if you have a chain where that object you're casting to has other hard references and casts.
In your UI example, your player HUD would reasonably always be loaded and in memory along with your player. Casting to the HUD on BeginPlay and saving it as a variable that you can then update directly is much better than using the Get Widgets Of Class node every time you want to make a change.
I completely agree on the binding part of your video, but please don't avoid casting and make communication more complicated than it should be. Hopefully that helps!
You are right! Also half of this video was focused to just show how blueprint interfaces work and whats logic behind it, but I agree with what you say ofcourse that is indeed true!
I saw this comment and I will do another "Well actually"...
Casting is not really an issue if you're casting to core C++ classes in the engine or casting to core c++ classes in your main game - those that are compiled into the final build of the EXE. as all classes templates are being pulled into memory on the start of the games exe (so all mechanics in c++ are being available to memory instantly, but not all resources that are in anyway visual). What that means is that when you for example cast to character - you are comparing your class header to a default object template in memory already - so it's a pretty straightforward operation (by the way in blueprints we have access to "get class defaults" but in c++ we have actually option into reference a default COPY of an object and its values after its constructor resolved. So for example, you can get its Scale value when in class defaults it's unavailable).
HOWEVER - if you cast to a BP class even though blueprints are nativized by default now, it still creates a default copy of the cast class, constructs it, runs its constructor and then compares the header and signature. So a cast to something very complicated like " fluid ninja actor" or some super complex auto-vine system - will be more memory-heavy. it's less impactful on computation. now - if you cast on tick to something heavy, you get a lot of garbage for the garbage collector therefore you can brick your performance on less memory available platforms like mobile or switch (with its ridiculous 4 GB of shared GPU and RAM).
I started in on UE5 and game dev via tuts about 3 months ago and coming from a programing background I'd been wondering about this a lot. Had just started researching this stuff and your video was great and timely. Thanks man!
I feel like that in this specific case using an event dispatcher seems a lot faster, less fiddly and generally easier. Having an object send the signal to whom-it-may-concern(subscriber list); player handlers and/or player-stats handlers seems more suited keeping track of that.
I probably would only really use interfaces for things like interacting and weapon related things: things that need to interact more "specifically" and less "broadly".
Anyone who is interested into reading more into that; I suggest the book - Game programing patterns by Bob Nystrom.
Yes thats correct! I just wanted to show how blueprint interfaces work!
I totally forgot about this book which someone recommended like years ago. I never got a chance to read cuz life. But I guess it's a good time to start now.
@@RubaDev Can you teach us how to use dispatchers effectively?
Just started about a month ago and you are making this so easy for beginners to understand efficiency. Thank you.
Thank you so much! As a new developer, I am always on the lookout for better code practices. I've seen a lot of devs that seem to advertise 'dirty' code. They always say casting is bad but they're gonna do it anyway. Makes no sense to me.. and it's really good to be able to recognize bad practices when I see them.
Every now and then I stumble over a dev willing to show the *right* way to do it, and that is gold.
So, ty! New sub. I will be binge watching your other stuff soon.
Awesome video again! I'm starting with UE5 in the past 2 weeks and I learned a lot from you so far!
Thank you very much comments like those keep me going !
I always use property binding instead of function binding. I have not delved into the UE source code to be absolutely sure, but it seems that the UPropertyBinding class takes an FScriptDelegate in its Bind() method. So, I think it's some implementation of the observer pattern, which means that it is not called each frame, but only when the value of the bound variable actually changes. I would be surprised if they haven't done it this way, because that would not make any sense to me.
This is much easier to work with as you don't need to care about actually updating the widget, but only about the respective value.
Thanks you for sharing this! I've seen this happen in most if not all most popular UE tutorials, that's why what I've done, and I recommend doing, is to just watch the tutorials for reference and try to apply it yourself the "proper" way. Of course if youre a beginner just follow the tutorials, you'll learn and the "dirty" code is fine if it works.
Great video!
Thank you sooo much for this one.
Please provide us with more videos like this because it's really essential for creating highly performant code/blueprints in game development.
I will work hard to produce more quality content thank you for kind comment!
Thx❤ i dislike casting. This is a nice solution
Thank you! Yup this solution is best practice that you can do in your blueprints!
Best explanation of interfaces by far. Great job man.
Thank you very much, glad I could help!
i’m in the process of switching from unity to unreal, and have been getting very frustrated with all the tutorials. This is the first tutorial I have seen that actually makes sense. Other tutorials like doing health bars and having it zero to one to me is wrong it should be 0 to 100 on a slider, but I couldn’t find a tutorial to do it. I have a long way to go to get good at blueprints after being so used to unities visual programming. Thank you.
its the most effecient to go 0-1. You can create your custom framework, but if you really want to optimize you convert the MaxHP into 1 and MinHP into 0, no matter if the number is supposed to be 100 or 200 or 900
but yes, a lot of tutorials are worthless, the worst i have seen so far was a guy that started with EventTick, put a Sequencer afterwards,immediately followed by Delay of 5seconds...
from what i gathered, EventTick should be used only on physic calculation or updating anything graphics related. Delay have ultra specific uses and should not be used in 99% of cases
Thank you for the video. I've been a software engineer for the last 30 years but UE5 is new. That said, a lot of people say use Event Dispatchers, but when I tried I still had to have a reference to the thing that is dispatching so an Interface is what I used. I've watched a few tuts on Event Dispatchers and I still need a reference. If I'm making a character that is spawned in after the game start then I'd have to use a cast to get the thing that is sending the message in order to subscribe. Maybe I have it all wrong?
Happely stumbled on this! Knew I should have been using Interfaces for a while but always was seeing ways to do things without them. Thanks for the clear demo! Suscribed!👏
yeah, don't use binding events if you really really don't have to. UI only needs to be updated when it needs to . I don't use binding events at all. No casting either. Interface is the way to go. No hard referenes either.
I'm very new to Blueprint so this is great to know - I always had a bad feeling about casting!
Not always is casting bad for example when you have something loaded thru the whole game for example HUD or GAMEINSTANCE there will always be some examples but this comes with experience! Don't worry about it too much!
Very nice tutorial. But doesn't the BeginOverlap Event also create a check on every tick? 🤔
I just started as a beginner but ive been watching a few videos myself and have seen a lot of different approaches.
How does this compare to dispatchers? My impression was by casting anything, you create a memory footprint dependency between those two actors and that can scale if it is not managed.
is this more performant or more reliable at the cost of that memory footprint?
Great channel, specially when you try teach the right way, cuz ticks are bad practice for sure, unless you are making something very simple
We only learn from Masters... as you are! Thank you for this approach! (i didn't learn anything in this video that I didn't already know... but that's cool to see good tutorials like yours ;) )
Thank you very much friend!
Great video, a practical example with a good explanation as to why you do what you do! Question! Very often I struggle to decide whether to use interface or event dispatchers as a solution to a problem, mostly I default to interfaces. I am afraid I'm missing some vital information that make this choice harder than it should be. Do you have a few pointers on how to choose between the two?
THANK YOU ! Good practice videos are such a blessing ! thank you for showing this !
Thank you! I'm glad you found it helpful!
Many thanks and congratulations for this video! You help more than you imagine a young beginner developer like me, even after watching numerous videos and documentation on Blueprints, communication is a real subject. I'm really looking forward to seeing your next videos !! :)
There's probably one thing that would be great to explain (because I see a lot of ways to use the Steam Advanced Session for lobby creation, etc.) but it doesn't have the following situation:
I have a main menu and a main map
I created the Session functions (Creation, search, join, destroy a session...)
My problem is: Player (server) created a session, when another player (client) joins the session, if player (server) comes from the Destroy session during that same time, then the player who joins currently does not do so. cancel the download. A kind of infinite connection.
How to have:
If the player (server) has Destroy Session, then players currently connecting to the session will cancel the connection and return to the menu.
For example in your "Pause menu" video, if the player (server) returns to the main menu, his session is destroyed but at that moment then a player (client) was connecting.
And a real topic, which I can't find anywhere, would be to explain why certain video game projects last several years, what are the most common problems that slow down development. (Without taking into account time, money. Let's imagine instead that a developer has all his time, no money problems and works alone, his only constraint is knowledge).
And so if an independent developer learns all areas, can he succeed in making an ambitious multiplayer video game?
And last subject: Concerning optimization, how to know in advance the limits of video game development, for example, you must respect a number of assets, card size, number of blueprints or Interface. .
Because if we prepare a complete gameDesign in the game and we realize 3 years after the start of development that there are technical constraints...
I think you understand this :)
Fingers crossed, in the meantime, thanks again, well done, this channel is incredible!
Thank you for your feedback. I read thru this and I can agree some of those topics should be covered I'll work on it in the future! Stay updated!
@@RubaDev Thank you :) Good vibes
Great tutorial. Get all Widgets of Class can be expensive too though. Not as much as binding in the UI, but still more expensive. Best option is to get the UI Var from the player controller or character.
Some good stuff, but honestly for something static like this for money you should just manually set the text inside the char bp on add money, since you made the HUD in your char you could just promote to a variable and cut a lot of unneeded interfaces. Interfaces are great for things that you don't have any easy hard reference for or you want to call to many types of actors with the same call.
Its just an example and usually I put HUD inside of the playercontroller also I was just showcasing how you can use one with simple examples. Thanks for feedback tho appreciated!
I’ve been so appreciative of your videos. Love that you’re covering some better practices.
Would you be able to make best practice video on folder structure, Unreal is really bad for moving things around and causing breakage.
I’d love to create a third party folder for my Marketplace addons. Marketplace forcing us to load into Content folder makes it really hard to manage a clean structure.
Hm are you thinking video where I cover where should you organize your stuff like naming conventions?
@@RubaDev I was thinking along the lines of managing content within folders as project grows.
It breaks a lot of things if you don’t have redirects set correctly, folders don’t completely move or delete. I find moving down the road with a project, I can’t easily restructure folders and things get out of control fast.
Thank you for making this tutorial. Made me one of your 3.1k subscribers :D
thanks bud
it was in time
Can you please explain why the use of blueprint is not recommended for multiplayer game, everyone says is bad performance, and why you require C++ ?
maybe they talk about ue3, ue5 i cant see any difference that matters atleast for most games, if you are not planing to create an MMO you are fine with blueprints
It is not recommended for multiplayer game as blueprint runs code way slower than C++ and now you can imagine if you have thousands of actions per second in multiplayer game you will have significantly lower performance as you would have with C++ basically C++ will fire off code way faster than blueprint will ever be able to, especially when it comes to multiplayer games you need to get performance where you can! Although for smaller games COOP or something like Horror/Puzzles you can use blueprints and you probably wont be "that much" affected! Hope it helps!
Yes I agree, or some competitive shooters don't!
@@RubaDev yes it helps a lot. I am aiming for a 20 vs 20 , so i will need c++
@@RubaDev well PUBG is using blueprints^^
so its wrong to say that, maybe in ue3 it was bad
This isn't a necessary use of interface. There's nothing "wrong" with casting. In this particular example casting would be simpler.
I'll use an interface if something needs to be modular, where a class may not exist or class may vary.
Is there any way to figure out where a BPI is called from without digging through every blueprint and finding ones that implement that BPI? Probably not? I've been using Unreal for months and haven't found a way to stack trace BPIs.
thank you!
Thanks for honest help. First I’ve found.
No problem! I am happy to help!
Maybe create Content warning in ue5
Use Event dispachers insted, not interfaces
gg keep it up! Thanks for teaching us the right way instead of casting.
U DESERVE 1Million subs
Fingers crossed! Thank you very much!
I feels like I already watched this like months ago or over a year. It's uncanny similar to the voice and speaking pattern as if I watched this specific video before.
Its all about use case scenario.
Exactly!
Why not use Event Dispatchers???? The player shouldnt care about updating the UI and thats what event dispatchers are for
This video made me subscribe
Thank you very much I'm glad you liked it!
As a new person I have a hard time understanding what’s actually happening in blue prints.
💯 ty
No problem!
Title is a bit click baity because stuff you show is pretty common in various tutorials, but you're right about this not being present in beginner tutorials. It's not a bad thing though. "Clean Code" and "Good Practices" are concepts you should know about when your work matters. When you're starting, optimization and complicated systems are not your goal. You get to that in time, but you got to start somehere with something simple, binding and casting is simpler than interfaces and net of events, and it also is a perfectly viable solution to many problems. You're telling people why you shouldn't use those, but you're omitting situations they're useful for. There are various levels of complexity in UE systems, and you're not on the top. I could just as well tell you your practices are not the best because widgets should be handled with a HUD class and updated with a viewmodel so text is bound to the field notify and changes only when the variable changes without extra event net, and the health should not be a character's variable but a decoupled component. But it doesn't matter by itself. What you should or shouldn't use depends on the context, and when you're learning, you need the basics.
Btw, i don't have a beef with you telling people about those concepts, it's great, just keep in mind these things are in the engine for a reason and you're not telling the whole story.
Brilliant!
Excellent
nice!
good tutorial however blueprint interfaces are indeed taught, often and by literally every unreal engine tutorial maker.
🤔 I actually rarely see them in tutorials.
@RubaDev depends on who you watch. Bigger channels that often have very poor blueprint etiquette (not gonna name drop but you can probably guess a few) usually don't use them. However I have seen plenty of tutorials utilizing blueprint interfaces lately, definitely usually from smaller channels though.
A good amount of the time they aren't
I know this wasn't the point of the video, but:
Using floating-point numbers for currency is a really bad idea.
RUclips tutorials are bad, but paid professional courses are good. But youtube tutorials are free so the bad knowledge passes on
Sir, if you are talking about real programming and says how the viewers should do the things, you are living in the only one universe where the cube is knowing that it should increase players money 😅
In fact, the cube should have a cost field and the field should be taken by the pick up event, which will increase players money for the cost of the cube.
Blueprints break many fundamental Software Engineering principles. What a pity, what a mess.
Amen! I love Blueprints on the visual side of the game engine. Materials, artwork, VFX.
The game logic really falls hard on me. I’m a Frontend Developer by trade. I struggle hard to build the game mechanics from Blueprints.
PHP, JavaScript, Typescript are all bastardized languages, not leaving me much room to stuff C++ into my brain. 😂😂
I agree blueprints can get really messy and I prefer C++ over blueprints for gameplay logic and mechanics!
@@fragileglass9622 Hahaha blueprints are trully a mess once project gets a bit larger..
Yesss... I find blueprints so messy and confusing compared to regular code.
@@RubaDev So please tell me can I use just blueprints for a moderate project ? ❤