bevy_tiled icon indicating copy to clipboard operation
bevy_tiled copied to clipboard

Image collection tilesets

Open DavidMikeSimon opened this issue 3 years ago • 7 comments

This PR adds support for image collection tilesets, i.e. tilesets that assign an individual image file to each tile, for use in object layers.

image

I recommend reviewing with the "hide whitespace changes" option enabled, since there's some re-indentation of blocks that makes some parts seem like bigger changes than they really are.

I'm pretty unfamiliar with Bevy, so please let me know if there's something I'm missing, or something I could be doing in a more idiomatic way!

There are still some unresolved issues:

  • There is z-fighting between objects that have the same position, even if they are on different layers. To see what I mean, enable the other background layers in images-map.tmx and run the images_main example again.
  • Loading the individual images seems a little slower than I'd expect.
  • Before an individual tile image is loaded, sometimes the object will be rendered as an unrelated tile (!!), if the map has both regular tile layers and object layers.
  • I haven't even tried object scaling or rotation yet.
  • When I add debugging statements in try_from_bytes, I notice that Bevy seems to be repeatedly re-reading the map, even though it has not changed.

DavidMikeSimon avatar Jun 25 '21 16:06 DavidMikeSimon

@bjorn How's this look to you? Anything you'd like me to change to make it more merge-able?

DavidMikeSimon avatar Jun 29 '21 20:06 DavidMikeSimon

@DavidMikeSimon Sorry I still know too little about Rust and Bevy to judge how merge-able this change is. I do hope to improve on that with time. :-)

bjorn avatar Jun 29 '21 21:06 bjorn

@bjorn No worries, and thank you for the helpful comments!

@dmtaub Heya, are you the right person to ask about next steps for this PR?

DavidMikeSimon avatar Jun 29 '21 21:06 DavidMikeSimon

@StarArawn Any feedback on this?

DavidMikeSimon avatar Jul 03 '21 20:07 DavidMikeSimon

I would love for this to get merged, any chance that is happening? :-)

sharpner avatar Dec 09 '21 16:12 sharpner

Due to time I've pretty much abandoned this project. If someone would like to be the new maintainer feel free to DM me on discord my user name is StarToaster. As of bevy 0.6 this library will no longer work, and I don't have any plans to update or upgrade it at the moment. If I had the time I would do the following:

  1. Remove the existing bevy_tiled renderer.
  2. Re-write all of the code to use bevy_ecs_tilemap, and expose bevy_ecs_tilemap types.

There is an example of how to render a tiled map using bevy_ecs_tilemap which can be found here: https://github.com/StarArawn/bevy_ecs_tilemap/tree/main/examples/tiled

Why switch to using bevy_ecs_tilemap? It has support for square, hex, and complex isometric tile maps. This library only has square and basic isometric support. Also the renderer is quite robust and is already working with bevy 0.6.

StarArawn avatar Dec 09 '21 17:12 StarArawn

thanks for the update and the heads up!

sharpner avatar Dec 14 '21 12:12 sharpner