fishfolk / punchy

A 2.5D side-scroller beatemup, made in Bevy

Home Page:https://fishfolk.github.io/punchy/player/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Items carrying visualization

64kramsystem opened this issue · comments

Description

After merging #126, basic support for items will be in place, which implements the functional part, but not the visual one.

The visual part must therefore be added. This is a matter of design first, since there isn't a single way to implement it.

At a minimum (which I think it'd be a good starting point, as in "better than nothing" 😂), we could display a bottle in the HUD, when the player has a bottle.

Alternatives & Prior Art

No response

I'm marking this as small. It's not well-defined in general terms, but the MVP version is.

Yeah, it seems like showing the item in the HUD right here would be a pretty nice first pass. Eventually we probably want to show the fish holding the items:

image

I'd like to take on this task, I have some ideas and some changes I would like to make but first I'd like some input on it.
What I'm thinking of is creating an Inventory component that holds items (probably non-stackable) using an Item struct (old ItemBundle), therefore it's a good idea for the Item to not be a component but a simple struct and create a new one called DroppedComponent that holds a dropped Item.
This way the items can only be accessed via the wrapper component and logic can be treated separately instead of checking whether the entity holding the item has a transform or not.

If you think is not a good approach or is just unnecessary work I can just store entities in the inventory, and keep the transform logic.

I think that using a component to store item inventory is probably a good idea. I see you opened #206 which I'll try to review as soon as I get the chance. 👍