Advanced-Tiled-Loader icon indicating copy to clipboard operation
Advanced-Tiled-Loader copied to clipboard

Loader.path and relative images path on .tmx not working

Open vitto opened this issue 10 years ago • 1 comments

I'm trying to load a .tmx file with this files structure:

gfx/locations/walls.png
stages/locations/LocationName.tmx
stages/Stage.lua

Inside the .tmx files the images point to gfx/locations/:

<image source="../../gfx/stages/temple-maya/walls.png" ...

Basically, Stage.lua uses ATL to load the .tmx file and this is the script I use

ATL.Loader.path = 'stages/locations/'
local map = ATL.Loader.load(name)
map.useSpriteBatch = true

LOVE now throws this error:

Error:
... Could not open file stages//..gfx/stages/temple-maya/walls.png.
Does not exists.

It seems that ALT have some problem parsing on relative paths if I don't want to keep different assets and code resources in the same location, does exists a way to fix it?

vitto avatar Jan 04 '15 13:01 vitto

I haven't had a problem with relative paths before but ATL has been out of development for a while so it is probably very error prone now. Are you sure the image source in your tmx file is correct? It doesn't match up with what you listed as your directory structure.

Kadoba avatar Jan 05 '15 03:01 Kadoba