GithubHelp home page GithubHelp logo

Add layer index to TMX-file. about tiled HOT 3 CLOSED

mapeditor avatar mapeditor commented on May 4, 2024
Add layer index to TMX-file.

from tiled.

Comments (3)

bjorn avatar bjorn commented on May 4, 2024

I think all that would do is for people to start worrying that the layers may not always be stored in-order or that gaps may exist in the layer stack. So, why?

from tiled.

patriksvensson avatar patriksvensson commented on May 4, 2024

The main reason for asking this is that it makes it easier to parse the TMX-file. In my case I'm not retrieving nodes in the XML with an XPath expression (like map/layer|map/objectgroup) but parsing the different types of layers in order (tile layers then object groups). I could change this logic, but I thought it would be a good suggestion of not relying on the order things are written in the XML, but explicitly telling the order.

from tiled.

bjorn avatar bjorn commented on May 4, 2024

Even if you first parse all tile layers and then all objects groups, you apparently iterated all of them at some point in order to determine which layers are there, and I don't see the problem with assigning them indexes in that moment.

Since this information is clearly redundant, I would prefer to leave it out.

from tiled.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.