Have you read the original GOF book? It's a good read. The big thing they focused on was trying to give names to patterns, and once named they could be studied. We could cite books all day, but books aren't software and it's important to remember that. These books are about the study of software, and the discoveries and conclusions their authors made.
The GOF book was notable because it triggered the identification and naming of patterns. Before then since the mid 1970s people focused on algorithms and data structures. Those still exist, but the book encouraged a specific focus on the larger organizational and behavioral patterns. It wasn't new in 1995, people had been doing it before, but it was a catalyst for an additional focus in study.
The GOF book didn't have a “Component” but did have a “Composite”. Many game engines have adopted that as part of their “component” objects. The intent is the same as the one covered by GOF, “lets client treat individual objects as compositions of objects uniformly”.
The big benefit is that you can dump all of the things into a container and it doesn't matter what the things are, all of them share the same interface and can be used interchangeably.
- In Unity that's usually a MonoBehaviour object and the assorted derived types, and the uniform interfaces like Start(), Update(), FixedUpdate(), LateUpdate() plus a ton of event handlers OnXxx, like OnGUI(), OnEnable(), OnDisable(), OnCollisionEnter(), OnCollisionExit(), and many more.
- In Unreal that's usually one of two types, either an Actor object (usually given the “A” prefix") the assorted derived types like APawn, ACharacter, or a Component. Actors have a uniform interface with functions like BeginPlay(), Tick(), or GetComponents(). Components have a set of standard functions and a bunch of event handlers, but can range in functionality from AI to physics to lighting to cameras to models to many other functions.
In all cases, these are objects that are interchangeable and can be stored in a container. That's the key concept. You can have a container of MonoBehavior objects and neither know nor care what they are since they all implement the same interface. You can have a container of AActor objects, or UObject objects, you don't need to know nor care what they are since they all implement the same interface.
The GOF Builder pattern lets you create things without knowing the details of how they're built. The book's intent describes it as: “Separate the construction of a complex object from its representation so that the same construction process can create different representations”.
The benefit here is uniformity. It doesn't matter what the thing is, you can build them.
- For Unity, no matter the object you can call Instantiate() and you've made a new one.
- For Unreal, no matter the object you can use NewObject() and you've made a new one.
It doesn't matter what the object is, the Builder can build it. You might be using another fully-created object, a prefab, a blueprint, a class name, or something else, you do some work to get a data blob that can be created, call create, and you've got one.
Using other tools the Builder method might take a data structure describing the thing to be created, it might be a few parameters describing the thing, or it might be a small enough functionality that no additional parameters are needed for the Builder object to know what it needs to create and return to the caller. The software pattern is that the caller doesn't need to know the internal details of how other objects are created, it can call the Builder object with a blob of data saying what it wants, and the builder can do all the work and give back a new object.
Your “Director” isn't a GOF pattern, although I've seen many variations on it over the years. It might be a Command pattern, where a thing is directing flow. It might be a Mediator pattern, encapsulating how a bunch of objects interact with each other.
Usually the pattern in games is a Command pattern loop where everything follows a Chain of Responsibility pattern. The thread loops on it's commands, calling various Update() or Tick() methods. Each of those methods follow the Command pattern, doing their processing and dispatching their instructions to other objects. Those are typically commands or events, that follow a chain of responsibility until the thing happens.
For example, the “Director” here may be the a Command pattern loop to update the physics system periodically. That system has a collection of interested physics objects, and each one of them is processed with exactly the same Command. That is, each one follows the Composite pattern so they can fit in a container, and also follows the Command pattern. Exactly the same function or set of functions can be called on all the objects, regardless of if the object's final representation is a player pawn, a vehicle, or a tree, all the system knows is that it follows the interface and can accept the command. The command will likely also trigger events, maybe an event that it has entered a trigger volume. In that case, the object (whatever it is, maybe a player, vehicle, tree) receives the event and processes it. As the Chain of Responsibility pattern, if the Tree implementation doesn't handle it, the parent class is given the opportunity, perhaps it's an EnvironmentalObject in this code. If it doesn't have a handler, it passes up a step to the WorldObject in this code base, if that doesn't handle it then maybe the base object is given an opportunity, and if that doesn't handle it, the command gets discarded or is considered processed even though no actual processing was done on it.
Overall, the patterns are useful names to understand how pieces of software work together.
Unfortunately it is easy for programmers, especially beginner programmers, to think of these patterns in isolation. "This is a Command, that is a Mediator, this is an Observer, and they are nothing more." In reality it is a bundle of data and functions that can simultaneously follow commands, issue commands, observe and respond to other objects, and manage the state of elements. The same with other principles, “This is object oriented, that is data oriented, those are event oriented, and they are nothing more." In reality they can be many things all at once. This can be an object built with object-oriented principles, organized in a data-oriented way, which implements its actions in response to events.
They are useful topics to think about, but beware that you don't get so bogged down in thinking about the patterns that you forget first and foremost they're ways that things do stuff. How they do stuff is interesting, most things do more than one kind of stuff, and in the real world most complex things do many kinds of stuff simultaneously.