Skip to content

Contributing to Tiled

Thorbjørn Lindeijer edited this page Feb 6, 2023 · 31 revisions

If you already know a bit of C++, contributing to the Qt version of Tiled is not hard! All you need to do is learn how to use the Git version control system and the Qt application framework. But you can do either as you go along.

Checking Out the Source Using Git

Install Git

Installing Git is going to be a bit different depending on your operating system. If you go to the Git download page, you should be able to find the appropriate link.

Checking out Tiled

While you can use the Git gui to check out the repository, I'm only going to show you the way of the command line here. The Git repository is located here on github.com. You'll find Tiled at https://github.com/bjorn/tiled.

To make a local copy of this repository, use the command advertised there:

git clone git://github.com/bjorn/tiled.git
cd tiled
git log

As the last command shows, this not only gives you a local copy of the source code, but also includes all the development history, allowing you to browse the history quickly and find out what happened until now.

Getting Started with Development

Install a C++ compiler

  • On Linux, make sure g++ is installed.
  • On Windows, I'd recommend getting the Qt package that includes MinGW.
  • On MacOS X, I believe you need to install Xcode.

Install Qt and zlib

Get Qt from https://www.qt.io/download-qt-installer. The default package ships with Qt Creator, which provides an easy way to compile & run Tiled, as well as being a powerful IDE for making changes to Tiled.

Tiled also depends on zlib for supporting compression. On Debian and Ubuntu, zlib can be installed as follows:

sudo apt-get install zlib1g-dev

On Windows there is no need to install zlib because Tiled can rely on the functions exported from the Qt Core library.

Compile and Run

Once you have everything installed, you should be able to just open tiled.qbs in Qt Creator. If Qt Creator did not auto-detect your Qt libraries, set those up in the preferences (see Tools -> Options -> Kits -> Qt Versions, and then set up a Kit for it and select this kit in the 'Projects' mode). You can press the Run button to have it compile and run the application.

If you prefer to stick with the command line, please see the instructions in the README.

Contributing to Tiled

The main purpose of this page, as the title indicates, was to get you contributing patches back to Tiled. There used to be a short introduction to git command line here, but I don't think that's very helpful anymore. Please read the following page to learn about opening pull requests on GitHub:

https://opensource.guide/how-to-contribute/#opening-a-pull-request