Comments (4)
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.
No idea, can you check who wrote that line and we can tag them? :)
from tiled.dart.
@luanpotter The blame gods have mentioned your name.
from tiled.dart.
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)
- flutter_test from sdk is incompatible with flame >=0.24.0 HOT 4
- parser.dart not imported in v0.7.0 HOT 4
- How to get a Tile's x, y coordinates in 0.7.0? HOT 1
- Spacing field in tmx file is not working HOT 12
- Bit shifts processing tile flips break down around gid=>2^28 HOT 3
- ObjectGroup on tiles not getting parsed from .tsx file HOT 10
- Issue when parsing multiple external tilesets. HOT 10
- Bug in objectalignment parsing
- The Template cannot be properly parsed. HOT 1
- Make it easier and more efficient to access a property by name HOT 5
- Bump xml to latest (6.1.0) HOT 2
- Parse JSON produces no data inside layers
- FormatException when parsing a tmx file HOT 2
- Ability to access the image rect for tiles HOT 2
- [proposal] Omit empty TiledImage from TiledMap.tiledImages HOT 2
- Dart SDK compatibility HOT 15
- Test Function on custom TsxProvider`s HOT 1
- Map Export HOT 2
- Template parsing does not work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiled.dart.