Hi UE Community,
I recently started working with Unreal Engine 4 and am still in a phase where I am trying to figure out how things can or should be done in UE4. To get started, I am creating a top down space shooter (learning by doing ).
I already created something similar in C# (a space invaders clone) and used a component-based architecture (yeah I know, that’s overkill for such a simple game. It was about the learning experience ). I really like the benefit of being able to freely compose components on game entities to add behavior (like a health system/combat behavior, an RPG system with XP, etc.). I am at the point of implementing weapons and a health/shield system into my game and took a look at the Shooter Game example how it’s done there: They put everything into the Character class itself.
Would it be possible to create something like a custom Combat Component and add this component to my PlayerCharacter (and to enemies) to handle this stuff? I saw there’s an ActorComponent for logic stuff, would this be the right one?
I saw there’s a recent feature request hinting that all the possibilites aren’t quite there yet here: Feature suggestion: Complete Entity-Component-System for UE4. Though I have to admit I don’t know what the entity component-system in Unity looks like. I also saw a reddit post where someone asked a very similar thing, pointing out that Blueprintable Components seem to allow such a component-based architecture.
Or would you suggest sticking to the inheritance-based design the UE seems to advocate in the Shooter Game example?
Looking forward to hear some opinions and advice about the pros and cons of these approaches. Or if you think a fully component-based approach is even possible?