How do I import a .tmx from Tiled?

1 favourites
  • 4 posts
From the Asset Store
Piano tiles
$9.99 USD
Template for a piano tiles game, fully documented in comments and video
  • When I hit the button in the timemap bar to "Load tilemap from .tmx file" (I've created one in Tiled), then in the dialog box's first field I select my .tmx file, I get the error:

    Missing image on tileset

    Construct 3 requires an image to be defined in the tileset

    Anyone know what this is having a problem with?

    Perhaps part of the issue is that I'm getting confused by the terminology. In Tiled, I created a map (a set of tiles arranged to make a playable game space) and that's what's saved as the .tmx. In order to make that, I made a tileset (saved as a .tsx) that has all the tiles I'm building with in it. In Construct, I create a tilemap object. Is the "tilemap" the equivalent of the map in Tiled, or the tileset? Best I can tell, the tilemap is the map, and the tilemap source image is the tileset? Does that sound right? Figured if I'm mixed up here, it might help me understand what's not working.

  • Did you solve this problem? I also had the same issue (using .tmx from Tiled.)

    Previously had no issues with Construct 2.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Solved for my case.

    It looks like C3 now looks for the <image> tag in the .tmx file, even if it may not be used right now? To add this, I clicked on 'Embed Tileset' in Tiled (small icon below the tileset window/tab in Tiled) and exported to *.tmx again. It now works to import *.tmx to C3 with this change. I imagine the <image> tag is not being used, because the C3 UI requires that you also load the tileset *.png image along with the *.tmx file when loading into a Tilemap.

    Here's the .tmx file with 'Embed Tileset' active in Tiled, note the <image source = ...> tag is now included. My previous *.tmx version without 'Embed Tileset' active did not include the <image> tag.

    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE map SYSTEM "http://mapeditor.org/dtd/1.0/map.dtd">

    <map version="1.0" tiledversion="1.0.3" orientation="orthogonal" renderorder="right-down" width="24" height="40" tilewidth="32" tileheight="32" nextobjectid="1">

    <tileset firstgid="1" name="GrassTilemap" tilewidth="32" tileheight="32" tilecount="48" columns="4">

    <image source="../Tilemaps/EpicGrassTileMap/GrassTilemap.png" width="128" height="384"/>

    </tileset>

    <layer name="Tile Layer 1" width="24" height="40">

    <data encoding="base64" compression="zlib">

    eJztzjEKwCAMQFFdPISbS8FawfufrhEUOihViNv/8BCERI0hIiIiIo2iuBX3BHG1s8rCbs5XSTyf+75nJvwYzZeFvZ2fWJnd4ZrRveYb2v8GcM4L9kEGOg==

    </data>

    </layer>

    </map>

  • Thanks for your help, Mikal! That worked!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)