Tiled

This topic contains 20 replies, has 5 voices, and was last updated by  juliocmfj 1 month ago.

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #10105

    juliocmfj
    Participant

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

    #10110

    juliocmfj
    Participant

    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…

    Comments:

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

    juliocmfj
    Participant

    I’m not able to post the codes here, so the download link is going.

    https://drive.google.com/open?id=0B2lZ_pN3kwOJZTFvbFVsTEtqa0U

    #10237

    juliocmfj
    Participant

    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.

    https://drive.google.com/open?id=0B2lZ_pN3kwOJZlF2YU5qd29QdTQ

    #11259

    therevills
    Participant

    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?

    #11292

    juliocmfj
    Participant

    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.