bevy_tiled
bevy_tiled copied to clipboard
Image collection tilesets
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.
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 theimages_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.
@bjorn How's this look to you? Anything you'd like me to change to make it more merge-able?
@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 No worries, and thank you for the helpful comments!
@dmtaub Heya, are you the right person to ask about next steps for this PR?
@StarArawn Any feedback on this?
I would love for this to get merged, any chance that is happening? :-)
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:
- Remove the existing
bevy_tiled
renderer. - 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.
thanks for the update and the heads up!