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

Break player down into components #49

Open
ac-arcana opened this issue Feb 11, 2024 · 3 comments
Open

Break player down into components #49

ac-arcana opened this issue Feb 11, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@ac-arcana
Copy link
Collaborator

The player class is pretty large, and includes a lot of concerns. Perhaps player movement, player look, and damage receiver could all be separate components.

@Phazorknight
Copy link
Owner

Yup, definitely a goal of mine to chip away into improving how this is currently set up.

@ac-arcana
Copy link
Collaborator Author

Class names on player and any components that are broken off from it too, please.

@aronand
Copy link
Contributor

aronand commented Apr 24, 2024

I've had a look at the code and at least two things that could be done come to mind:

  1. Separate attribute management to its own node
  2. Implement a state machine to handle movement

Out of these two, the latter would definitely have a bigger impact on the code.

The first one might be more complex than initially seems. I quickly gave it a try some days ago, but recall running into issues with some level of coupling when trying to move attributes under this new node. Initially remembered it being due to attributes being coupled to the player, but that actually isn't the case now that I checked the code.

@Phazorknight Phazorknight added the enhancement New feature or request label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants