Blueprint system

The blueprint system is designed to provide developers with a quick and easy way to make a “blueprint”(a standardized setup of properties and attribute values) for an entity. These blueprints can be used for base entities in the level editor that can then further edit their values to be more customized for the particular level. They can also be used by the “FactoryManager” in the engine to create entities strait from the blueprint using the “createEntityFromBlueprint” function.


The blueprint system works in three steps of files building on each other the format we use for this is XML. The first one is the “PropertyAndAttributeDefinitions” file:


This file, as the name suggests contains the definitions of properties and their attributes. A property is defined by a name that mus correspond to a name of a property class in the engine and a “derivedFrom” variable that represents the class that the property is derived from. Inside the property tags are attribute definitions, each “<var/>” tag represents an attribute definition. These definitions consists of a name which is the name you wish to give your property, a type that represents the type of variable it will be and a value that will be the default value for the property.

The next step is the blueprint file:


This file is where you define the actual blueprints, this is done by first adding the “BluePrint” tags with the parameter name this will represent the name of blueprint. Inside these tags the developer can add the properties that they desire the entity that will be created from the blueprint to have by adding the property tags with a name parameter(note that you do not need to specify the “derivedFrom” parameter here since it is already defined in the previous step). If the developer then desires to alter one of the properties attributes value they can add a “<var/>” tag inside the property tags with the name and value parameters(note that the type parameter is left out, since it is already defined in the previous step).

These properties can then be loaded in to the level editor where the developer can redefine all the previously mentioned values of the blueprints and save them to a level file:


Here is an example of what one of these files may look like. Here you can see two entities defined by “<Entity></Entity>” tags these tags contain the name of the Entity(defined by the developer in the level editor) and what blueprint it was originally defined by. Inside are all the redefined values of attributes in the same way as described in step two, you may also see a couple of new tags “<collider/>” These define a collision box added to the entity in the level editor.

Be Sociable, Share!

Leave a Reply

Your email address will not be published. Required fields are marked *