August 29, 2017 at 1:17 pm #10105
<p id=”tw-target-text” class=”tw-data-text tw-ta tw-text-small crayon-selected” dir=”ltr” data-placeholder=”Tradução”><span lang=”en”>Another step completed.</span></p>
You can now load a map composed of multiple images and any number of layers. In this map I use 4 layers and 4 different images in the same project.
When it is “usable”, I will send the download link. Remembering that I am only doing this for study purposes. I indicate the version of Playniax.
Attachments:August 30, 2017 at 4:35 am #10110
I was able to interpret the basics of the Tiled system. Below is the code and below an example use.
Remembering that I am developing these classes for my personal use, I only share those who like information and learn new things.
The code still needs a lot of change and there are unnecessary things in it…
August 30, 2017 at 4:44 am #10111
- All files, including the images used on the map, must all be in the same folder.
- Does not load any additional information, such as: custom properties, objects, animations… Only layers without any custom configuration.
I’m not able to post the codes here, so the download link is going.September 3, 2017 at 10:17 am #10237
I’m still working on the Tiled Editor’s map interpreter. In this version, you can read custom properties of the map and each layer individually.
Note: You can only read values of the following types: Bool, Float, Int and String (for now).
A highlight for type Bool: Using the Map class, I could not read the correct Bool type, which always returns False. Then, I saved as Int (0 = False, 1 = True). Outside the Map, saving in any variable, the Bool value is correct. If anyone has a solution, I’ll make the correction.
Otherwise, the class is fully usable. Now I will worlk on the objects and the object layer, and the on the animations of the tiles.October 21, 2017 at 9:22 am #11259
How are you going with this?
Using the Map class, I could not read the correct Bool type, which always returns False
What was the issue?October 22, 2017 at 7:07 pm #11292
I can not return a value of type Bool inside a JsonArray, but outside it everything happens. I’ve worked around this problem, reading the String and storing its value in a variable of type Int. Ex: if the String is False, it returns 0, if not, it returns 1. Then, in the end, it ended up being a type variable Int (which does not change at all at the time of use).
The library already imports the almost complete map, including: tile layer, objects (which can contain: lines, polygons …). Missing part of the animations and some extras.
I spent that time without pounding it, but now I’m back and I’m going to redo so I can make the necessary optimizations. There is a high memory consumption depending on the size of the images and the amount of Tiles per layer.
Soon, I will send the link of the “final” version here in the forum.
You must be logged in to reply to this topic.