Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.15 (sort of) #568

Closed
wants to merge 27 commits into from
Closed

0.15 (sort of) #568

wants to merge 27 commits into from

Conversation

bas-ie
Copy link
Contributor

@bas-ie bas-ie commented Oct 25, 2024

So this is what happens when you blithely decide that, since you're gonna need bevy_ecs_tilemap again soon, you may as well try to upgrade it for 0.15. Uh, yeah. Some of the rendering stuff is well over my head! 😅

This is not a working update, but I'm leaving it here in case you can cherry pick some of the simpler commits to save you some time. I'll keep trying in the meantime, I'm learning quite a bit from it... but please don't feel the need to spend any significant time reviewing it.

It does include fixes for the following:

@bas-ie bas-ie marked this pull request as draft October 25, 2024 04:17
tychedelia and others added 4 commits October 26, 2024 15:56
* MaterialTilemap -> TilemapMaterial
* MaterialTilemapBundle -> MaterialTilemap
* StandardTilemapBundle -> StandardTilemap
* TilemapBundle -> Tilemap
* Deprecate bundles
@ChristopherBiscardi
Copy link
Collaborator

thanks! your effort is much appreciated!

@bas-ie
Copy link
Contributor Author

bas-ie commented Oct 31, 2024

I am being very slow, but hopefully I can get it to the point where someone who knows about rendering can take over!

@bas-ie
Copy link
Contributor Author

bas-ie commented Nov 2, 2024

OK. I think that's all the low-hanging fruit. Now, how the hell do I get all this rendering working 🤔

@bas-ie
Copy link
Contributor Author

bas-ie commented Nov 2, 2024

@ChristopherBiscardi can I ask: does the rendering code need a bit of a re-think? Given the retained render world changes (Entity/MainEntity), the GpuMesh/RenderMesh changes (MeshAllocator etc).

The deeper I dig, the more I wonder if it needs an experienced hand to say, "yep, we still need this bit", or "no, all this can be simplified". I can keep plugging away at it, just wanted to check in first to be sure I'm actually spending time on the right things. For example, as @tychedelia points out,

TileMapId wraps an entity that is actually MainEntity in the render world

and I haven't really got the first idea how to solve that 🤔 General guidance and suggestions very welcome.

@bas-ie
Copy link
Contributor Author

bas-ie commented Nov 2, 2024

In the meantime, I'm going to start by working my way through the Extract part of the pipeline, since that seems likely to be affected by retained rendering world.

Edit: I note this code makes use of .insert_or_spawn_batch which seems like it might be deprecated.

@ChristopherBiscardi
Copy link
Collaborator

There will be some changes for the retained rendering world but I'd like to avoid large sweeping changes otherwise, at least for the migration to 0.15-compatible. We can revisit the implementation in a larger way after getting a 0.15-compatible version out. For example, things like taking advantage of Required Components would be a breaking change that I'd like to leave for after the 0.15-compatible release if possible to make it easier for users of the crate to upgrade Bevy.

Re: the .insert_or_spawn_batch you've linked an issue that wants to deprecate it but not an actual deprecation so while we can think about removing the usage its not something that should be the top priority until it actually is deprecated or removed (it doesn't look slated for 0.15 and it also is labelled contentious).

I'll have more time to spend on this later this week. I likely won't get to much this weekend.

@bas-ie
Copy link
Contributor Author

bas-ie commented Nov 6, 2024

Hrm, I could also take a peek at the minimum possible changeset, sans required components... but I think there are still gonna be rendering issues. I'll investigate.

@evilenzo
Copy link
Contributor

evilenzo commented Nov 6, 2024

Sorry, I'm not good at rendering at all but I also want to help you a little. Just made a little pr to @richchurcher fixing remaining issues in examples: bas-ie#2

Examples required components migration, part 3
@bas-ie
Copy link
Contributor Author

bas-ie commented Nov 8, 2024

Yeah, I've definitely arrived at my limit with the rendering stuff, it needs a more experienced hand! Once I see a few examples, I think I'll be able to approach it with more confidence.

Please feel free to close this or cherry-pick whatever you find useful.

@rparrett
Copy link
Collaborator

rparrett commented Nov 12, 2024

Here's one possibility for migrating bevyengine/bevy#14257: rparrett@2f66d8f

@ChristopherBiscardi does that seem like a reasonable strategy?

edit: that branch is now migrated chronologically up to just before the retained render world commit.
edit: it probably makes sense to skip ahead to 15756 if continuing from where I left off. I attempted the retained render world migration and I think I'm running into some sort of bug that would be clarified by that followup PR.

@rparrett
Copy link
Collaborator

rparrett commented Nov 20, 2024

The basic example now compiles / renders / doesn't panic in my branch, but it's messy and some of the migrations around render/main world entity refs seem kinda dubious. extract_removal is very broken, for instance.

Texture swapping in that example is broken, and some other examples are crashy, but everything compiles.

I did a good amount of cherry-picking from this branch, but left out the required components refactor.

@adrien-bon
Copy link
Contributor

Hi! Thanks for (mostly) fixing rendering!
I openned a PR on your branch: rparrett#5
It should fix render entities removal + tilemap change detection.

@bas-ie
Copy link
Contributor Author

bas-ie commented Dec 3, 2024

Closing in favour of #574!

@bas-ie bas-ie closed this Dec 3, 2024
@bas-ie bas-ie deleted the 0.15 branch December 3, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants