We saw in the last chapter how using a Dynamic Factory can help us decouple our high-level modules, such as the M5StageManager or M5ObjectManager from the implementation details of our derived M5Stage or M5Component classes. We did this by pushing those dependencies into derived builder classes that would be used by a Dynamic Factory. This allowed us the freedom to change our derived stage and component classes without needing to modify our higher level modules. C++ template classes made using the Dynamic Factory very easy, since we were not required to create a derived class builder for every stage and component.
However, we are required to create a builder for each M5Object type we want, since they will contain a set of components that are unique to each object. Unfortunately, these builders may require frequent changes as we playtest, balance, and modify our game design...