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

Update to Bevy 0.13 #106

Merged
merged 2 commits into from
Feb 25, 2024
Merged

Update to Bevy 0.13 #106

merged 2 commits into from
Feb 25, 2024

Conversation

bushrat011899
Copy link
Contributor

Objective

Solution

  • Bumped Bevy version to 0.13
  • Updated Input references to ButtonInput
  • Updated KeyCode values to prepend Key (e.g., KeyCode::W -> KeyCode::KeyW)
  • Replaced Cube and Plane meshes with their new math primitives as recommended for depreciation reasons
  • Explicitly converted Color into a StandardMaterial rather than relying on implicit into()
  • Updated AddRollbackCommandExtension to match new lifetime generics for EntityCommands
  • Implemented EntityMapper (which is now a trait instead of a type) for RollbackEntityMap, which will return the provided entity if it is not contained in the mapping. This ensures entities which are not tracked by the rollback map are not modified.
  • Replaced the inner HashMap of the RollbackEntityMap with an EntityHashMap, which is an optimised type provided by Bevy.
  • Updated the Component and Resource entity mapper plugins to use the new EntityMapper implementation provided by RollbackEntityMap. This removes a significant TODO on their implementations where if a mapping was done over a non-rollback entity, the mapping had to be undone.
  • Ran fmt and clippy and ensured clean output.

Tests and the synctest example work as expected. I haven't had a chance to verify this against a real multiplayer application, so if anyone has the free time to test this branch out, please do!

@alepez alepez mentioned this pull request Feb 19, 2024
6 tasks
Copy link
Collaborator

@johanhelsing johanhelsing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!

Nice to see so many red lines 🧹

I haven't tested in any of my projects. Still lagging a bit behind and haven't even finished the 0.12 migration for cargo space.

I have enough time, I'll check with extreme bevy tomorrow. Otherwise, I think we should just go ahead. If anything shows up later we could always do a patch release.

examples/box_game/box_game.rs Show resolved Hide resolved
src/snapshot/component_map.rs Show resolved Hide resolved
@johanhelsing
Copy link
Collaborator

Tested with matchbox and extreme_bevy now. Everything works like a charm :)

@johanhelsing
Copy link
Collaborator

Okay, we just need to fix the conflict, then we can merge this :)

@bushrat011899
Copy link
Contributor Author

Done! Should be ready to go

@johanhelsing johanhelsing merged commit 9b1d286 into gschup:main Feb 25, 2024
1 check passed
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.

Update to Bevy 0.13
3 participants