This topic contains 20 replies, has 5 voices, and was last updated by  juliocmfj 7 months, 4 weeks ago.

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
  • #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.



    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…


    • 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.




    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.




    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?



    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.

Viewing 6 posts - 16 through 21 (of 21 total)

You must be logged in to reply to this topic.