So this is just a small little post to get people's ideas on combat systems, specifically involving pixel movement. As for myself, the current idea I am running with is this:
I created a /hitbox datum with its parent_type set to /obj. I use the New() proc for this object to place it exactly where I want it, and in this case it is a 16x16 box. The icon is set to null. This box is named a hitbox because its purpose is to detect hits. So I place it where I want it when the player punches, and if the box is overlapping a mob, then it returns that you hit them.
My mob's bound_height is reduced to allow some realistic overlapping on dense objects, so this obviously creates a problem with the hitbox system. To account for this, I created another box that is set to the same bounds as the mob, except with the correct height. I made this box move exactly with the mob.
So in the end, the mob still acts normal while walking, and the hitboxes still function as they should. This was an idea that I came up with to make combat a bit more accurate.
Anybody else have any interesting ideas they have tried, or are just in their head?
Apr 8 2013, 2:16 pm