Can you upload the link to the post cause I’m facing the same issue.
In all likelihood you are:
-
missing an asset (the image in question)
-
your asset(s) are in the wrong place.
My suggestion:
Since you have the code, find the scritp and line in that script that is complaining (given in the error message). Then start adding print statements and dumping out parameters (before the error) till you find the path of the ‘missing’ image.
Tip: When first learning this. Make a level with a single image/object.
Once you’ve got that rendering then start making more complex stuff.
This approach reduces the ambiguity of what is going on.
Well, I did get a warning too…
com/ponywolf/ponytiled.lua:153: Failed to find image 'Lava Cave Scene/lavacave/png/seperate/128/tileset/Tile (36).png'
But the image is no longer at that location and is in the same folder with all of my other images.
If the image is not in the right place that is the issue.
However, that is a super weird name for a image. I don’t personally:
- include spaces
- use special charaters (, [, [, ),], }, etc…
Also, that path is super-deep. :huh:
PS - I didn’t understand this sentence:
But the image is no longer at that location and is in the same folder with all of my other images.
Either the image is there or it isn’t.
I bought the images online and they immediately come named in this manner. And, none of the other images are having any problems.
Ok, I replaced the old one with a new scene. There is no crash, but I don’t see anything except for darkness.
I get an error in my logs saying:
Tile layer encoding/compression not supported. Choose CSV or XML in map options.
However, the PonyWolf example was also exported as a lua file, so I don’t know why this is appearing.
I think you are making this too complicated.
Learn to use Tiled with a few images first.
I’d make a few basic examples with prototype images (just a few). Then, when I understand how the tiled loader works I’d increase the complexity.
Next, organize your images and name them in a clear and meaningful way.
- no spaces
- consistent use of cases in file and folder names (use camelCase or snake_case, but_Not_Both)
- no special characters
- limited depth folder structures
- …
We’ve had the discussion about running too fast and I think you’re doing it now.
updated post above
crawl…walk…run…ride a bike…drive a car…fly a plane
Ok, now I don’t think I can get any simpler. It’s just one image, no custom properties, nothing.
I am getting no error messages, no warnings in the log, just a black screen. Why…?
I tried printing out their coordinates then resetting them, and still nothing.
Yes, I did try readjusting the position as necessary for it to appear properly in the center, but it is not appearing whatsoever.
Also:
The path for the tile images is only one folder deep.
Images properly renamed without spaces and parenthesis.
Could the problem be with the size of my tile export? I know it probably won’t fit on the screen, I just want to be able to see something.
Ok… I resized it so that’s not the problem. <_<
You haven’t supplied the images location in a second (missing) parameter here:
local map = tiled.new(mapData)
If you omit it, Ponytiled would look in some default folder - probably the one in that error message. So just add the folder with your tile images and it should load the map:
local map = tiled.new(mapData, "folder/images")
Nope, still nothing. And as I said in this attempt the error messages were gone.
And now I know that it is not because of the version of Corona’s build. I tried it out with another one… At least now I know how nice 3103 is.
Check the tile layer format of your map (Map -> Map Properties). It shouldn’t be one of the Base64* options.
If it still doesn’t work, either post screenshots of your folder structure + the latest code where you load the map, or just spend some more time digging. Studying the Sticker Knight example is not a bad idea either.
I selected CSV and XML, but nothing is appearing. I just find it strange that the toy block sample I used to model it, was working perfectly, while this one is not. As for the file structure, the screenshot is down below.
And here is my updated code:
local tiled = require "com.ponywolf.ponytiled" local mapData = require "demo" local physics = require "physics" physics.start() local map = tiled.new(mapData, "lavacavestuff") map.x, map.y = map.x - map.designedWidth / 2, map.y - map.designedHeight / 2 if map then print(map.x, map.y) end
PS, Thanks for all your help so far, @gsimeonov. (and @roaminggamer)
Checklist:
- Is there a demo.lua file in the root project folder?
- Is that “lavacavestuff” folder placed directly inside the project root folder (that screenshot doesn’t tell much)?
- It’s not clear what that “designedWidth” thing is. The map should appear at the center without setting its x and y explicitly.
- Is the map included in a group and are you sure you haven’t slapped something on top of it?
Hi @gsimeonov, @roaminggamer PMed (Personally Messaged) me a couple of examples fixing my solution, thank you for all the help thus far.
Error fixed!
Solution: Understanding it was not an error.
Helo sdk tester,
I have the same issue : " ERROR: Tile layer encoding/compression not supported. Choose CSV or XML in map options. "
how did you resolve this ?
Please continue this conversation about the compression error here:
https://forums.coronalabs.com/topic/71281-tiled-question-encodingcompression-not-supported/
I’m not going to lock this thread for continued conversation about the OP’s original question. But for answers to @yvandotet, please use the other feed.
Rob