So, I'm using this to load Tiled maps: https://love2d.org/wiki/TiledMapLoader
But the result is always messy... Is that code incompatible with the actual version of Tiled?
This is what i see on Tiled:
This is what i see in-game:
The only thing i modified on the code was adding a mapPixel function to interpret the blue from the sprites as transparency, this was working pretty well on another map, but on that one it's also messy, i don't know why...
Here is my slightly modified tmx loader: http://pastebin.com/fcAWFNTa
Thanks in advance.
Loading Tiled maps
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Loading Tiled maps
Last edited by Eventide on Thu Jul 30, 2015 8:12 am, edited 1 time in total.
Re: Loading Tiled maps
Meanwhile the thread wasn't approved i found a better library: https://github.com/karai17/Simple-Tiled-Implementation
But it doesn't even load, it outputs the error attempt to concatenate field "image"(a nil value) on map.lua:112.
I've received a similar error with the library said on my first post and I've fixed it by adding "/data/" to every asset loaded, I didn't figured out how to do this with STI, but I've tried to change my map file directly, and it didn't worked, the "/data/" on the output string was duplicated.
EDIT:
Error output:
My main.lua file: http://pastebin.com/PjB86a2q
My map file: https://gist.github.com/anonymous/04f10315b3fd143d080a
Maps are stored on data\maps
Spritesheets are stored on data\graphics\map
STI is stored on libs\sti
But it doesn't even load, it outputs the error attempt to concatenate field "image"(a nil value) on map.lua:112.
I've received a similar error with the library said on my first post and I've fixed it by adding "/data/" to every asset loaded, I didn't figured out how to do this with STI, but I've tried to change my map file directly, and it didn't worked, the "/data/" on the output string was duplicated.
EDIT:
Error output:
My main.lua file: http://pastebin.com/PjB86a2q
My map file: https://gist.github.com/anonymous/04f10315b3fd143d080a
Maps are stored on data\maps
Spritesheets are stored on data\graphics\map
STI is stored on libs\sti
Re: Loading Tiled maps
Problem is solved.
Re: Loading Tiled maps
Maybe you could post the fix here for people who have the same issue.
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Bing [Bot] and 4 guests