TMX (and TSX) are a format for storing tile maps based on XML created by Tiled, a 2D levels editor for video games.


The task was to create an essential TMX viewer to display a map using the QGraphicsScene. The project’s emphasis is to document and set up the development environment that requires the Tiled library. This library uses the old QBS build tool (deprecated since 2019), and pre-built binaries are not available for Windows and are not compatible with Qt6.


We implemented the viewer following the example (tmwviewer) available with the Tiled code source. We added zoom with wheel-mouse and pan with left click following C++20 standard. We created a “*.pro” file thoroughly documented, allowing the compilation for Qt5 and Qt6 for Windows, macOS, and Linux. A script to compile the Tiled library using QBS (by command line or the QtCreator) was also provided to set up the development environment.