Background
I'm currently working on a top-down 2D game, roughly similar to something like Zelda for the SNES.
Certain game entities such as the player or a typical enemy will consist of multiple collision boxes. For example:
- The main collision box which determines collisions with the map (i.e. walls). It also determines where the entity can be hurt.
- The attack collision box which, if overlapping a main collision box, causes the owner of that collision box to take damage.
The attack collision box should only be active when the entity is actually attacking.
One Solution
The first potential solution that comes to mind is the one used in fighting games where every frame of animation has its own set of collision boxes. This can obviously work, but it feels like it may be too over-engineered for what I need.
The Actual Question
Other than the solution above, is there a standard or common approach for attack collision boxes? Or is having collision boxes tied to animation the standard way of doing things?
I would like to emphasize the term "standard". It would be great to know how games like The Legend of Zelda, Secret of Mana, and Castlevania handle it.