Skip to content

GSoC 2017: Reusable Object Templates

Mohamed Thabet edited this page Aug 27, 2017 · 5 revisions

Summary

This project aims to create a template system in Tiled, Any created object can be saved as a template. These templates can be instantiated elsewhere as objects that inherit the template’s properties.

Code

These are the pull requests created and merged during the project period

Project Overview

The project required creating a new way for Tiled to store templates. Templates are stored as template groups, Template Group Format .tgx, standing for tempalte group XML. Which stored the format, you can read more about it here.

Consequently, The map reader and writer were updated to be able to read the new file format so that templates are displayed properly. The templates dock was created to list the available templates and allow browsing, previewing and editing. Here is a demonstration of instantiating templates, by using the templates dock

Creating Template Instances

And this is a demonstration of changing the template and having all instances updated

Editing Templates

Other links

Introduction and discussion about the project on the forum.

Detailed description of the project as well as a the description of all the features is available at the official documentation.

Future Work

The core functionality of the project is done but there are still many improvements that could be added:

  • Resetting overridden properties.
  • Locking template properties.
  • Handling wrong file paths.
  • Managing template groups, e.g. removing a template or a template group.