Amazing! Very good explanation of the interface feature. I'm just thinking now how to trigger the interface for specific "groups". Lets say only the BPs with the Tut_Shoot event get fired, if they have the group/tag "light" to only change all lights instead of e.g. rotating a cube as well or so.
@nfrancisj2122
Ай бұрын
gameplay tags, but you can really just filter it any way you want. Id, string, distance, class.
@ryanjdevlin87
6 ай бұрын
Return a soft reference of the actor with the interface, then load the soft reference to the class u want and then your able to interact with it like you cast to it but without any hard refs :) I use this method to communicate with my AI, this way u can get and set any var on them or run any event /function while not cluttering the interface and having every AI's textures animations and meshs in memory all the time.
@erksp7961
2 ай бұрын
Excellent introduction!
@Madlion
6 ай бұрын
This may seem like magic to those inexperienced in programming, but interfaces have existed in programming languages since long. I would not recommend this technique at all because it is prone to abuse and is very slow if you need to query actors every time... What i recommend as a better approach is to look at lyra's message subsystem plugin. There you don't need to implement any interfaces but only need to subscribe to messages which can have payload of any kind of struct, which the plugin automatically generally serializes and send around using gameplay tags. In face if you want to develop proper and serious game then Lyra provides a very strong foundation for many aspects of game development with focus on modularity, scalability, extensibility etc... It also showcases many new features of unreal from editor tools to geometry script and more
@ryanjdevlin87
6 ай бұрын
Thats just fancy event dispatchers and gameplay tags ... lyra is over complicated bloat in most cases for the types of games most solo devs usually make. Unless your a full studio or making the next "day before" lmfao. Dont over complicate your project with code you dont understand by adding system's built and designed to be implemented by dozens of people that are also mostly for multiplayer usage. Essentially I wasted 6 months tearing lyra apart only to realize its completely unnecessary for anything but AAA games. Save yourself the time if your not making a AAA game, trust me.
@Madlion
6 ай бұрын
@@ryanjdevlin87 ure very wrong, im using lyra in fact its small, theres a whole community of indie solo folks doing lyra. People who think lyra is for full studio have no clue how to make games lol.
@ryanjdevlin87
6 ай бұрын
so u gonna use lyra for a 2D game or a platformer? if your a solo dev using lyra your making a game that mostly likely is above the scope of a solo dev. The way things are done there can be achieved on much simpler and smaller scales without half the work. Making every ability its own asset is tedious and the same result can be achieved in half the time with half the code if you can keep track of it which you should be able to since your the only one working on your project unlike lyra which was designed for teams. Please don't get me wrong though I think what epic did with lyra is actually great its just not for every game and its definitely not for small solo projects just starting out . If you wanna use lyra for your 5th or 10th game go ahead. Just dont over complicate your learning process at the start with a system not meant for solo devs like I did and lose 6 months of dev time learning a system your not going to need or use.
@Madlion
6 ай бұрын
@@ryanjdevlin87 from ur words i can see u have no proper gamedev experience. Yes i would use it for all my games, its too amazing to not use. If i ever decide not to use it, i would be implementing similar lightweight systems anyway. The way it split everything into modular asset is why i will use it 100% for everything
@ryanjdevlin87
6 ай бұрын
whatever you say bud, I dont wanna open 6 files to check where 1 thing is. To each there own have fun man@@Madlion
@AiAngel
7 ай бұрын
YES, love interfaces
@NilsGallist
7 ай бұрын
As with all, there are pros and cons. But I use them for the majority of the time as well.
@MonderMurshed
6 ай бұрын
Blueprint interface is a king thank you!
@RoryMcC42
7 ай бұрын
Great video, thanks
@gabrielecella
4 ай бұрын
thx
@UnrealEngineEnthusiast-eb5ei
4 ай бұрын
Great Intro ! lol
@MichaelKocha
6 ай бұрын
I can't see a reason to ever really communicate with the level blueprint. Anyone worth their salt in Unreal is very likely not even using the level blueprint beyond maybe some basic initialization stuff. I feel like a light switch, a door or dealing damage would have been a much better way to teach this method. Something more practical. That said, I am glad people are teaching interfaces now and not just casting to every possible actor in the level, so good on you for that! Now if we can just get away from teaching people to put their logic in the level blueprint. lol
@NilsGallist
6 ай бұрын
Haha, on board with you. I work in a digital theater context /virtual production. I rarely have to deal with more than one level or even persistent information at all. Mostly it's "MAKE IT FLOAT WHEN DP PRESSES THIS BUTTON", "Can this turn green when actor says the line?". "Can this change be done for the next take in 10 minutes?". So for quick iterations and stuff that doesn't depend on being performant for a lot of users. Chugging stuff into the level Blueprint is time efficient. Not clean, or performant, but quick for me who has to make changes on the spot haha.
@MichaelKocha
6 ай бұрын
@@NilsGallist Oh! You know, I always forget that people are using Unreal for things beyond games. Lol that's a very good point and a great use for the level blueprint. I'll lower my nose back down now. Lol Also what an awesome job. How did you land that? I bet there's a ton of variety in your work every day.
@l_t_m_f
6 ай бұрын
I used to agree but since I began to understand the Level Blueprint is just a Level Scripting Actor I think the Level Blueprint can definitively be used well especially in RPGs. Where you don't need to reuse maps with different mechanics on them. For scripted content it is a great tool.
@MichaelKocha
6 ай бұрын
@@l_t_m_f personally, I would rather have an actor handle scripted events just in case I ever need that functionality anywhere else, or need to abstract it for multiple events with exposed variables. I've used the level blueprint a few times here and there to create widgets or to spawn players or other initialization sorts of things. But the problem with the level blueprint is really just that most new devs get told to do all their logic in there because of how easy it is to get references to anything in the level. And that sort of misunderstanding of how references should be obtained can be detrimental to your progress in learning Blueprint. Like most things in game development, used properly it's very handy. But most tutorials don't use it properly.
@kirill2525
4 ай бұрын
@@NilsGallist welp I was trying to use this for an actual game project. guess this would be an awful idea. you should have probably mentions that this isn't recommended for game design. also I never even got a message option, only cast to, but I am not using a level blueprint for this
@fahrlehrerfabian8282
6 ай бұрын
king
@NilsGallist
7 ай бұрын
Let me know, what do you think about Blueprint Interfaces?
@MonderMurshed
6 ай бұрын
Hey i have a simple question, i got how u can interface between actors but how to communicate with third person character or third person map ? because i can't get actor reference by them how can i communicate with them , and i don't wanna use "get all actors with interface" node, how can i solve this problem brother?.
@nfrancisj2122
Ай бұрын
GetPlayerCharacter, GetGamemode, GetPlayerController. He doesn't explain the mechanics well. Under the hood you are using Class Inheritance. Interface is installed on the Base Class of those I mentioned.
@l_t_m_f
6 ай бұрын
The idea of using interface is correct but the implementation you did is really really bad... You should put a warning annotation or something to let people know they should never do this. The bullet should have a on hit event which checks Other Actor pin for if it implements the interface. It's like 2 nodes. No loop. Anyway, nice try but this is disinformative in a way... I know you had good intentions.
@NilsGallist
6 ай бұрын
Hey, yes. As multiple people have pointed out, you are correct. I thought, my little side node of the importance of filters would be enough. However, it seems like I misread the room... Thank you tho, for your engagement and your comment. I will try to be more concious about how I present certain topics in the future.
@zinetx
7 ай бұрын
This seems super heavy & unperformant.
@MichaelKocha
6 ай бұрын
So... ideally you would never do "get all actors" to do something like this. Interfaces are fantastic for things like "Interacting". You can have a door, a lever, a button, an NPC all with an "interactable" interface and they can all set up an "interact" event differently to do their relevant actions. Then you'd have your player character send out a sphere trace or something similar to see what it hits when pressing the interact key, then whatever actor returns, call that "interact" message. If it hits something that can't be interacted with, nothing will happen. If it hits something that has the interface, it'll trigger it's intended action. Sorry for the novel, but interfaces are far better than they may seem in this video.
@NilsGallist
6 ай бұрын
Hey guys. I do see, that my example of getting "all actors with Interface" is a suboptimal way in a broader environment. Please note that this way was only chosen to have a quick 3 node solution to showcase the potential of this system. Thank you for your engagement, and @MichaelKocha, thanks for your clarification!
@MichaelKocha
6 ай бұрын
@@NilsGallist I see the benefit in the simplicity, but sometimes more robust systems like this require more robust explanations to be used properly. Either way, it's a good starting point for devs to learn from. I'm just afraid it might be a bit misleading in the execution, as @zinetx seems to have discovered.
Пікірлер: 38