Comments (10)
A mistake, for sure! I imagine the extra tile never caused any issues, being empty.
from tiled.dart.
0.7.3 is now released!
from tiled.dart.
It definitely looks like an error on our side (https://doc.mapeditor.org/en/stable/reference/tmx-map-format/#tmx-objectgroup). Do you want to put up a PR that fixes it? :)
from tiled.dart.
@spydon sure thing, will submit one shortly. I didn't see a contributing guide - any process I need to adhere to for the PR, or for something this simple can I just submit the change if all tests pass?
from tiled.dart.
@spydon sure thing, will submit one shortly. I didn't see a contributing guide - any process I need to adhere to for the PR, or for something this simple can I just submit the change if all tests pass?
The latter. :)
from tiled.dart.
@spydon I submitted a PR and included a new test case for this scenario: #32
While testing, I noticed something interesting. It seems like whenever Tiles are being parsed from a TileSet, an extra tile is always added.
The parsed result is initialized as a new TileSet before returning, (https://github.com/flame-engine/tiled.dart/blob/main/lib/src/tileset/tileset.dart line 141).
In the TileSet initialization code, _generateTiles is called which iterates from 0 to numTiles, inclusive, and thus appends an extra Tile that was not included in the input file (https://github.com/flame-engine/tiled.dart/blob/main/lib/src/tileset/tileset.dart line 219):
for (var i = 0; i <= tileCount; ++i) {
if (t.localId == i) {
tiles.add(t);
if (iterator.moveNext()) {
t = iterator.current;
}
} else {
tiles.add(Tile(localId: i));
}
}
I was curious what the reason was for the extra Tile. Should we simply ignore it?
from tiled.dart.
Fixed by #32
from tiled.dart.
@spydon @luanpotter, forgot to update the package version in the PR. Are you able to bump the version so I can pull the latest package, or is there a release process for publishing?
Hoping to use this fix in a project I'm working on!
from tiled.dart.
@spydon @luanpotter, forgot to update the package version in the PR. Are you able to bump the version so I can pull the latest package, or is there a release process for publishing?
Hoping to use this fix in a project I'm working on!
I can do a release later today hopefully (you don't bump the version in the separate PRs, it's a separate process).
from tiled.dart.
Awesome, thank you!
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
- 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
- Json tile map parsing null HOT 4
- [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.