Using Tiled/Corona/Dusk can't find tileset.png even with right path

So I am trying to use Tiled to make map to my game, but when I try to apply the map to my code nothing happens on simulator. All I get is an error in debug: Tileset image (path\sewertileset.png) not found

Weird thing is that the path is correct. I have 2 hdds so I made the same path to the other one just in case but nothing.

Here is the code:

local physics = require “physics”

local tiledMap = require(“Dusk.Dusk”)

physics.start()

physics.setGravity( 0, 10 )

physics.setDrawMode(“hybrid”)

map = tiledMap.buildMap(“testing.json”)

map.x = display.contentCenterX

map.y = display.contentCenterY

I believe your problem is that the tileset is not in your project folder. If you just exported the sewers sample map from Tiled and loaded it into Dusk, Tiled will try to reference the tileset in a completely different folder. Corona doesn’t fully support this, so I didn’t allow this in Dusk. You’ll need to first copy the tileset into your project’s folder somewhere (anywhere, as long as it’s in either the same folder as main.lua or a subfolder of it), then manually change the tileset location in the map data, because, as far as I know, Tiled doesn’t let you swap tileset image paths on the fly.

  • Caleb

thx got that worked out!

I believe your problem is that the tileset is not in your project folder. If you just exported the sewers sample map from Tiled and loaded it into Dusk, Tiled will try to reference the tileset in a completely different folder. Corona doesn’t fully support this, so I didn’t allow this in Dusk. You’ll need to first copy the tileset into your project’s folder somewhere (anywhere, as long as it’s in either the same folder as main.lua or a subfolder of it), then manually change the tileset location in the map data, because, as far as I know, Tiled doesn’t let you swap tileset image paths on the fly.

  • Caleb

thx got that worked out!