joshuajbouw / bevy_tilemap

Tilemap with chunks for the Bevy game engine.
MIT License
177 stars 46 forks source link

Update to Bevy 0.6 #189

Open joshuajbouw opened 2 years ago

joshuajbouw commented 2 years ago

What problem does this solve or what need does it fill?

The library needs to be updated. On master this is partially done, but there have been further changes since.

Describe the solution would you like?

Update to Bevy 0.6.

Describe the alternative(s) you've considered?

N/a

Additional context

Bevy 0.6 has been long in the making and contains a plethora of improvements which the tilemap and users would like to use right away.

BrettWitty commented 2 years ago

I've had a look at brute-force moving bevy_tilemap to bevy v0.6. There were a number of items that changed name or library path because of the new bevy_render. That was straightforward, assuming similarly-named things are the same.

More surgery was required to replace PipelineDescriptor to RenderPipelineDescriptor. Also Extent3d no longer has a new() function.

My two (currently) remaining problems are:

  1. A reference to the Draw component for Chunk which no longer exists.
  2. In chunk/render/mod.rs in add_tilemap_graph you use PipelineDescriptors (now RenderPipelineDescriptors) as assets, but they don't have an impl for TypeUuid. This would need to be rectified by bevy, or we access them differently (maybe as Resources?)

I don't know if more problems will arise if I can get cargo check to get past these.

BrettWitty commented 2 years ago

I suspect your custom rendering pass doesn't work with the new bevy render system. I'm not yet brave enough to mess with that.

joshuajbouw commented 2 years ago

I got a call scheduled with cart to figure this out. Its uh... Yeah... totally different. Need to learn a lot of new concepts :S. Severe lack of resources for it too.

However, with that being said, I think what is possible is that I am able to use the normal Sprite renderer now, as it does support some custom Rust logic.

BrettWitty commented 2 years ago

With Sprite rendering now being batched to an extent and the potential for automatic frustum culling, do you think there is still an advantage to the chunking systems?

joshuajbouw commented 2 years ago

Yes, absolutely. However, it is transitioning from more from an apparent direct need to simply providing resources for a tilemap, which is still needed. If this library was just about sprite batching, that would be a different story.