Hi there
I’m a newcomer to Unreal Engine. I come from an angular / vue / java / k8s background with the occasional dabbling in Unity and its C# flavor.
I’m now doing a tiny (in terms of requirements) game in ue, and after some progress, I have some thoughts and ideas about architecture and wanted to challange that, so here I am.
Since it’s a “simple” one-level game, and since I have no experience, I’ve opted for a blueprint approach with the option to do come cpp if it’s actually necessary. I have no cpp experience at all and iteration speed seems great with BP.
After some initial progress, I noticed a trend of mine to go for an event based architecture, with the occasional direct interface calls. This felt natural to me, as I can keep blueprints and responsibilities separate this way and coupling somewhat low.
For example I have a “CinematicsManager” blueprint that listens to certain event dispatchers disables split screen, plays cutscenes, re-enables split screen and notifies whomever is interested when the cutscene is done.
Since the play through the level can be thought of as a state machine, or a pre-determined series of quests, I’m planning to maintain that state also in a dedicated blueprint that listens to whatever events needed and emits to whomever necessary (e.g. cutscene manager).
And so on.
While this seems somewhat concise and clean for now, from experience I know that such an approach, if done to the extreme, can lead to dev confusion, since it becomes less and less clear which event triggers what and you get event-spaghetti.
So my first question would be what your thoughts and experiences on this are, if I’m on the right track but should keep stuff in mind, or I should opt for something else entirely.
My second question: Since Listeners on Event dispatchers need a reference to that actor, I have now a bunch of empty blueprint actors in the level that are just there, so I can pass in references over the editor where needed. This is somewhat similar to how I did it in Unity, but I wonder if that’s good practice in Unreal too, or if I’m biased here.