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

Breakable boxes which can contain other items

zicklag opened this issue · comments

I'll claim this, I have some idea of how to do it, gonna follow how the bottle and health were made.

I'm not sure how the boxes would function in-game, here's some options that I thought:

Throwable boxes that break on the ground, (maybe enemies or players) that drop the item where it broke.
Simple item that just drops the item on the ground when used, like the health.
Box that breaks when a enemy and/or player hits it, and drops the item where it was.

Which route should I take?

The final design for these items would be something like this.
A crate, entity spawned with Damageable and Health components.
It should be able to contain another item.
It should be able to be broken by attacks after a certain amount of damage is taken.
It should be able to be picked up and carried above the head of the player, preventing them from performing other attacks while held.
It should be able to be thrown, when it hits something it should deal damage and knockback, and it should then break, exposing its contained item.

I think to start with, this issue should just tackle the first bits of that. A crate which can contain an item and be damaged by attacks, when its health is depleted it should break and allow the player to access the item inside.

@odecay I think this can be closed

I agree, we can open specific issues for future improvements. 👍