craftworkgames / MonoGame.Extended

Extensions to make MonoGame more awesome
http://www.monogameextended.net/
Other
1.44k stars 325 forks source link

Using "Collection of images" tileset in Tiled map causes all tiles to be placed by it to use the image of the first tile? #965

Open skeets23 opened 1 week ago

skeets23 commented 1 week ago

I created a "Collection of Images" tileset and used it to place multiple different images as tiles on my map.

For example, I placed image A, B, and C on the map. In the tiled editor, this is working fine.

A is large, 676x900 B is smaller, about 100x200 C is just 16x16

When the map renders in my game, it's rendering image A in all 3 places (although, the width and height match the image that is supposed to be there)

So where B is supposed to be on the map, a 100x200 version of A appears instead.

Since the size is correct, it does seem like MonoGame.Extended is recognizing that it's a different tile, but it's failing to get the correct image reference.

I know this tileset type was not supported in the past, but it looks like this pull request claimed to have added the feature?

https://github.com/craftworkgames/MonoGame.Extended/pull/827

I'm using:

MonoGame 3.8.2.1105 MonoGame.Extended 4.0.3

UPDATE: I discovered it actually uses the first used tile for all locations. So if I erase tile A, it uses tile B for all instances of B and C.

Also, there appears to be a small bar appearing in the bottom left of the tile when the image for the tile is very large (676 x 900). The bar is not present in the original image or in the Tiled editor. Not sure if this is related.