Extensibility Model

By
Dave
Project
Published
22 Apr 2012 11:56
Last Modified
20 Jan 2013 10:23

I wanted to provide an easy way to extend the application with additional bodies, textures etc. I had previously used a single configuration file for visual elements, so while it was possible to configure existing or add additional elements it required a configuration change.

I wanted to support a "drag-and-drop" approach, so that additional items could be added, or existing items updated, just by copying files to a directory. This has the additional benefit of allowing the app to "ship" with minimal data (hence size) and be easily updated.

I'm using an XML-based configuration to define star systems. New files added to an "extras" folder can add or amend as many nodes of the XML configuraiton as they wish. In this way, one or more new/existing objects can be added/amended per file, with additional (e.g. texture) data, being referenced by a relative path. The application will recursively search for multiple .xml files, only following a particular branch of subdirectories until an .xml file is found.

I'm currently defining a set of sample extras to serve as examples.