ID:1685599
 
(See the best response by Kaiochao.)
Problem description:
How are "hit boxes" usually handled in relation to programming with pixel based movement?
Ideally I'd like to make a 'zone' where if the player is attacking at the moment something is within the 'zone' area it is damaged.
Or even better something like Legend of Zelda : A link to the past, that level of control when it comes to collision detection.

I'm not really looking for a code based explanation, although that would be great, but some pointers in the right direction or some different aspects on how other people accomplish this so far would be nice.

This is what I do now :
for(var/mob/g in obounds(usr,12))
if(!g.dead)
if(StrikeRange(g))
g.TakeDmg(.,usr)

Where StrikeRange is what I'd like to replace with hit box coding.
Best response
Your hitbox detection should be where "obounds(usr,12)" is.

You should read more about obounds() and bounds(). They return a list of atoms in a certain rectangular region, which is the hitbox itself. You'll have to check the dir of the attacker and possibly the attacker's width and height, if you use obounds(), to offset and resize the box relative to the attacker's bounding box.

You shouldn't need to do anything more than loop through what's in the hitbox, like check if the target isn't in the hitbox.
That occurred to me, however the issue I'm having is calculating the pixel x and y to start the bounds box at.

Is there any particular way to do that?