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

Hits and Stats: base system #7

Closed
2 tasks done
dreammelter opened this issue Oct 4, 2023 · 6 comments
Closed
2 tasks done

Hits and Stats: base system #7

dreammelter opened this issue Oct 4, 2023 · 6 comments
Labels
enhancement New feature or request research Further information is needed
Milestone

Comments

@dreammelter
Copy link
Owner

dreammelter commented Oct 4, 2023

Implement the base of the Hitbox and Stat Gauge components.
"Medium" size as I think I might have to do some extra research or fiddling.

Here's what the hitbox should do:

  • detect when its parent is hit
  • send any information (collisions, damage, object IDs, whathaveyou) to other components. (mostly the stat gauge)

A stat gauge should:

@dreammelter dreammelter added enhancement New feature or request research Further information is needed labels Oct 4, 2023
@dreammelter dreammelter added this to the Round 2 milestone Oct 4, 2023
@dreammelter
Copy link
Owner Author

Since CharacterBody2D is a physical node, it does detect collisions... but might have to sort thru detailed info of all the recent collisions for sliding characters. (At which point: just adding an area seems pretty straight forward...)

I'll play with some methods for Character Body first.

@dreammelter
Copy link
Owner Author

Dictionaries don't export to the editor like I thought they would... nor do they update from a resource like I thought, either.... which ruins the simplest approach to this. It's gonna take more than the @export annotation to make it adjustable, and that'd blow it out of proportion for class.

I need to see if there are any other quirks I should be aware of when it comes to dictionaries in Godot.

@dreammelter
Copy link
Owner Author

dreammelter commented Oct 11, 2023

OK so maybe the Stats Guage I was thinking of is solely a UI thing. All character entities/nodes can technically manage their own collection of stats as it sees fit and tell its listeners what's up... gonna move those tasks into a different issue. (Either add it to an existing step or make a new one.) → #13

Let's not over-engineer this 👍

A stat property on the character will technically:

  • manage its assigned stat (increments/decrements based on events)
  • share stat info w/ the UI and other components (via a signal)

@dreammelter
Copy link
Owner Author

dreammelter commented Oct 12, 2023

Should probably note the hitbox's parent would do all the reporting to sibling components cuz it already knows who they are/has access... the hitbox just needs to send the info it gathers to it. (via the "on enter" signals)

dreammelter added a commit that referenced this issue Oct 12, 2023
@dreammelter
Copy link
Owner Author

dreammelter commented Oct 13, 2023

Everything was fine until the Player stopped detecting collisions with the enemies... might have to switch back to a Rigid Body?

#31

@dreammelter
Copy link
Owner Author

Since we have a Hitbox, I'm going to use the Hitbox. The player character is still set to log collisions from move_and_slide so we'll see if anything else fails to detect.

Rigid bodies would be fun but frankly... physics has drained me enough again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request research Further information is needed
Projects
Status: ✅ Done
Development

No branches or pull requests

1 participant