Tiled Map Editor compression help please
Posted: Sat Mar 26, 2016 3:52 am
I've been making maps in Tiled v0.15.2 and exporting them as .lua files so I can have them drawn at different times. The problem is, Tiled doesn't seem to support the compression for love2d any more. By that I mean how in every tutorial I see the layers[1].data table looks something like this:
But the only options is Tiled now are XML or CSV compression (these are the only ones that say like in the tutorials):
base64 uncompressed:
base64 gzip compressed:
and base64 zlib compressed:
How do I load my maps and draw them in these formats?
Code: Select all
data = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2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 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 1,
}
Code: Select all
encoding = "lua"
Code: Select all
data = {
618, 620, 621, 620, 621, 620, 621, 620, 621, 620, 621, 620, 621, 620, 621, 623,
652, 100, 100, 100, 100, 100, 100, 100, 267, 268, 269, 12, 195, 195, 196, 100,
652, 100, 87, 88, 89, 100, 100, 100, 299, 300, 9, 112, 195, 226, 226, 100,
652, 100, 119, 120, 121, 100, 100, 100, 100, 100, 195, 218, 219, 220, 260, 136,
652, 100, 100, 100, 100, 100, 100, 100, 265, 100, 195, 250, 251, 252, 385, 168,
652, 100, 100, 258, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 11, 100,
652, 100, 100, 258, 387, 258, 12, 138, 100, 100, 100, 100, 100, 100, 100, 100,
652, 100, 100, 258, 322, 258, 143, 144, 100, 100, 100, 100, 100, 100, 100, 100,
652, 100, 100, 100, 100, 100, 143, 144, 100, 100, 100, 100, 100, 100, 100, 100,
652, 100, 100, 100, 100, 100, 143, 144, 100, 100, 100, 100, 133, 166, 100, 100,
652, 100, 100, 100, 100, 100, 143, 144, 228, 100, 100, 100, 100, 42, 10, 100,
684, 100, 100, 100, 100, 100, 103, 104, 100, 100, 100, 100, 100, 100, 100, 100
}
Code: Select all
data = "agIAAGwCAABtAgAAbAIAAG0CAABsAgAAbQIAAGwCAABtAgAAbAIAAG0CAABsAgAAbQIAAGwCAABtAgAAbwIAAIwCAABkAAAAZAAAAGQAAABkAAAAZAAAAGQAAABkAAAACwEAAAwBAAANAQAADAAAAMMAAADDAAAAxAAAAGQAAACMAgAAZAAAAFcAAABYAAAAWQAAAGQAAABkAAAAZAAAACsBAAAsAQAACQAAAHAAAADDAAAA4gAAAOIAAABkAAAAjAIAAGQAAAB3AAAAeAAAAHkAAABkAAAAZAAAAGQAAABkAAAAZAAAAMMAAADaAAAA2wAAANwAAAAEAQAAiAAAAIwCAABkAAAAZAAAAGQAAABkAAAAZAAAAGQAAABk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