Coder Social home page Coder Social logo

Comments (4)

jtmcdole avatar jtmcdole commented on May 23, 2024 1

There's very limited documentation or testing of the parser code. Flame-engine only deals with XML files, so this looks like an oversite.

Tiled Map Editor does document this field as being either a list of ints or base64 encoded for JSON. There is no example of this in their codebase (or I'm just bad at search this early in the morning) but the XML format has the documentation for why there's a compression/encoding field. In JSON format:

Array of unsigned int (GIDs) or base64-encoded data. tilelayer only.

and

The data of a tile layer can be stored as a native JSON array or as base64-encoded and optionally compressed binary data, the same as done in the TMX format. The tiles are referenced using Global Tile IDs.

Further down in this code we call "parseLayerData" - but since this will ALWAYS be null for json, it'll never actually attempt to parse it.

This file needs a little love and testing.

from tiled.dart.

spydon avatar spydon commented on May 23, 2024

No idea, can you check who wrote that line and we can tag them? :)

from tiled.dart.

natebot13 avatar natebot13 commented on May 23, 2024

@luanpotter The blame gods have mentioned your name.

from tiled.dart.

luanpotter avatar luanpotter commented on May 23, 2024

Probably an oversight on my part. I think i didn't have many/any JSON examples and thought that field was not set for the JSON format. Def open to PRs!

from tiled.dart.

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.