Feature Suggestion: Hitbox

Are you experiencing a problem? Maybe you can't get your scripts to do what you need, or are frustrated by a feature you just can't seem to get working? Let us know about it here and we will try our best to help you out!
CeeJay
Posts: 209
Joined: Sat Jan 26, 2013 9:56 am
Gender: None specified

Feature Suggestion: Hitbox

Postby CeeJay » Sat Feb 17, 2018 6:08 am

Not sure where to stick this but I'll put it here seeing as the feature suggestion section is locked.

How about adding something like HITBOX_RADIUS and HITBOX_HEIGHT for THINGS ? If present, it won't affect the creatures height and width but only its actual hitbox (where you need to hit it to make a dent). If it is omitted, the RADIUS and HEIGHT will be used in its place instead, like normal.

This would open up a few possibilities, such as large armored creatures with small weak spots. Also, for Wolf3D this would allow enemies to be 64x64 in size (keeping the "blocky" nature of the original game) but with more appropiate hitboxes.

Just a thought.

User avatar
Marscaleb
Posts: 87
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

Re: Feature Suggestion: Hitbox

Postby Marscaleb » Wed Feb 21, 2018 9:19 am

I've thought from time to time that it would be nice if you could set up weak-spots. Mostly just so you could do head-shots, maybe "limbs" and "torso" regions too. It would be great if it responded to angles too, so you could have enemies with shields.
It would be a more complicated system, but if you were to go down this path, why not set that up instead? You could define "hit-regions" and then establish the effects they have with various weapons.

The way I see this working is you define a hit-region for the game to check. You define that hit-region's height, radius, height from the ground, and the angles where it is viable. Then specify the effects that region has according to what kind of weapons. (So so can have headshots or weakpoints only work with certain kinds of weapons, eg, can't get a headshot with an explosion.) You could list multiple hit-regions for the game to check for (I would assume the game would check them in the sequence you give them, so if there is any overlap you can make sure that certain things are checked first. The game would go through each of the character's hit-regions in sequence until it finds something it actually connects with.)
At the end of the list there would be a "default" region. (This would be assumed so if nothing is listed it doesn't cause an error.) The default region doesn't specify any radius or height or angles, but you can add it to just override the default reaction to getting hit with a weapon. So for example if they are armored except for that weak spot the default section could be set to deflect all shots. Although as I think about it further, that might be superfluous because you could just set up another hit-region at the end of the list that covers all angles and sizes if you wanted to do that. Eh, either way.

You'd want to be able to make (certain) weapons deal a damage modifier, or a set amount of damage, play a particular sound effect, (possibly have a generic "deflect" option that automatically deals no damage and plays a deflect sound,) pass through as if nothing was there, or trigger something in an external script within the character or the weapon. Ideally you should be able to set all of those to happen at once, so you can stack effects if needed. Oh and maybe have the weapon react as if it hit a wall, so if you have a grenade it can bounce off.

It's a more complicated system to be sure, but it would add a lot of flexibility. It would be fantastic for boss battles.

User avatar
Coraline
Site Admin
Posts: 747
Joined: Fri Jun 08, 2012 11:22 am
Gender: Female
Contact:

Re: Feature Suggestion: Hitbox

Postby Coraline » Wed Feb 21, 2018 4:23 pm

\(סּںסּَ` )/ۜ

CeeJay
Posts: 209
Joined: Sat Jan 26, 2013 9:56 am
Gender: None specified

Re: Feature Suggestion: Hitbox

Postby CeeJay » Thu Feb 22, 2018 8:59 am

Yes, I know about the WEAKNESS feature.

What I am talking about is different. You have the height and width of the creature which could be anything, with what I am suggesting you make the creature's damage area independant from the height/width of the creature (normally it is the same) with the new command.

User avatar
Marscaleb
Posts: 87
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

Re: Feature Suggestion: Hitbox

Postby Marscaleb » Mon Mar 05, 2018 1:35 pm



Return to “Support and Help”

Who is online

Users browsing this forum: No registered users and 3 guests