The message system we decided on for the engine where every message is a separate class that inherits from an abstract base class we found to be a rather simple and practical way of handling messages. However it did require a lot of monotonous busywork since you had to define a new class for every new message, to try and make this process a lot faster and more user friendly we designed a small companion program for the engine that we call the “ExternalCompiler”. This program utilizes an XML document for the definitions of the messages, this is an example of how that may look:
The information that is given here (the message name, the variables that the message will contain and a tag that is not displayed in this image that represents an include that the message is dependent on) is then used by the “ExternalCompiler” to write c++ code that correctly represents the desired messages in the engine.
This is how the external compiler currently looks. When using it the user specifies a Resource Directory where the previously mentioned XML files are situated, then they specify an output directory where the generated c++ files will be placed and lastly they specify the file names of the XML files in the large text area as a comma separated string. This as you probably realize is not the most well thought out design possible for an application like this, we are looking to re design it to be more user friendly in the future but for now it does the job we need it to and our focus is elsewhere.