Quote:
The former is stand alone the latter must interact with other entities
This is the weak point of components based system
The code gets ugly and consequentely also the game logic sucks ,in my opinion


Imho this is the strongest point of components as long as your components feature events:
Let's have a character. This character has a component named "Activator". It can trigger events on "Trigger" components. A "Trigger" component has an event named "OnTrigger". Now any object that is interactable features a "Trigger" component, no matter what the object is. Maybe an NPC, a door, an lightswitch, whatever...
Every of those triggerable objects just gets it's own "Trigger" component and registers the event "OnTrigger". In Unity terms it would be like this:

Code:
void Start()
{
    // Assume this object HAS a Trigger attached.
    this.GetComponent<Trigger>().OnTrigger += Trigger_OnTrigger;
}

void Trigger_OnTrigger(object sender, TriggerEventArgs e)
{
    // Prints the activator that triggered the trigger.
    Debug.Write(e.Activator);
}



So we don't have to subclass a "Triggerable" class to get the features shared...
Now image the same thing with subclasses. Easy going, right?
Yes, as long as we only have one shared feature.

Next thing: Having an object with the components "Trigger" "Hurtable" "Talkable"
How do you want to realise a Door and an NPC now? Both a triggerable, but only the NPC is hurtable and "talkable". Okay so far so good, also doable with classes. But now make a crate, that is only hurtable (on order to destroy it).
Now it gets complicated and to keep inheritance low you start to have a lot of duplicated code....

Just my two cents on this topic

Quote:
Getting back ( once again ) to UE4

I've taken a closer look to sivans code and it seems to me that UE4 uses a component system as well (CapsuleComponent, CameraBoom, FollowCamera, InputComponent, ...).
Looks pretty similar to Unity, you have an init phase (Constructor vs. Start), different events (SetupPlayerInputComponent vs. OnGUI) and for sure an update "loop" as well. (N.A. vs Update).
Only thing that differs is that you can build Prefabs in UE4 as a base class where you take a Prefab-Object in Unity....

So imho the engine designes are really close together...

[Please note all of the above are assumptions derived from the code sivan posted, i may be completly wrong]


Visit my site: www.masterq32.de