• Albert Bennett

Simply Put: COM

Updated: Mar 28, 2021

COM (Component, Object, Model) is a project architecture. It is used in projects where MVP's need to be created quickly. It is most commonly used in game engines. Simply put, an Object can have several Components attached to it. Each Component can be sent messages to preform actions based on event triggers. Such as run, jump, play animation, etc. Each Component is abstracted by an Interface, and is tasked with doing one specific thing, to maximize re-usability. Where as the model defines what the object requires and how it will be managed. An example of this can be seen below:

As you can see when an event gets triggered, a message is sent. When/ if it gets picked up by a GameObject the message gets processed using reflection. This is to call a specific abstraction, with the implemented method to preform the action. Normally this action requires some change of state for the GameObject. Normally it's the modification of the GameObject's matrix. An example of this is when the player wants the avatar to move. On the press of the left arrow key, an event gets fired from the games input manager. This is sent to the GameObjectManager which then relays it on to the avatar object. The object uses reflection to see that it has a Component called RunComponent with a method named Run. This Run method updates the avatars matrix, thus making the model attached to the GameObject's RenderComponent move.


Now, COM was originally used as a binary interface for object orientated programming languages. However, it is becoming obsolete with the introduction of .Net.

20 views0 comments

Recent Posts

See All