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

Unify leafwing and native input plugins #935

Merged
merged 24 commits into from
Mar 3, 2025
Merged

Conversation

cBournhonesque
Copy link
Owner

@cBournhonesque cBournhonesque commented Mar 1, 2025

  • unify input plugins so that native inputs can benefit from leafwing ideas:
    • be able to rebroadcast inputs to other clients
    • be able to attach an ActionState on an entity as a component
    • be able to use MapEntities on native inputs
    • be compatible with input-delay!
  • native inputs have 2 big advantages over leafwing:
    • can store any kind of arbitrary data
    • can apply MapEntities (for example 'click on Entity')

Migration

  • Because of specialization; all native inputs must now implement MapEntities

  • NativeInputs will be accessible in the ActionState component instead of InputManager

  • a component InputMarker must be inserted to mark an entity as being 'controlled' by the local client

  • now the host-server local client can have input delay!

    Examples:

    • Avian3d: works, but constant rollbacks
    • avian_physics: works
    • client_replication: works
    • delta_compression: compiles but broken, but maybe for reasons unrelated to inputs?
    • distributed_authority: broken for host-server, but maybe for reasons unrelated to inputs?
    • fps: works
    • interest_management: works
    • lobby: works
    • priority: works
    • replication groups: works
    • simple box: works
    • spaceships: works

@cBournhonesque cBournhonesque added the A-Input Related to handling user inputs label Mar 1, 2025
@cBournhonesque cBournhonesque merged commit 4164799 into main Mar 3, 2025
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Input Related to handling user inputs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant