YesNoOk
avatar

Various considerations regarding hit interaction. (Read 17309 times)

Started by Bastard Mami, August 19, 2011, 04:52:16 pm
Share this topic:
Various considerations regarding hit interaction.
#1  August 19, 2011, 04:52:16 pm
  • ******
  • [E]
    • Mexico
as some of you might know, I am wornkng on a full game (link to guild subforum is in my signature).

Some of the things I want to have are better interaction on this/grabs and projectiles, since it's gonna be a full game ic an do away with a lot of simple tricks that would work horribly in normal mugen to implement stuff, such as having var 0 = player type, so it can be checked if it's a normal player, an ai helper, a projectile, etc ...

that being said i will get started talking about hit priorities, it does not look like i will hvae to change too much stuff in there.

about hit priorities of physical attacks I plan to/already use the following principles .

1) clns2 and clsn don't perfectly overlap; to give attacks more priority I just make the clsn 2 area smaller than the clsn 2 for specific attacks, it's more noticeable on weapons where the part that are further from the hand have no clsn2 whiel the parts closer to the hand do.anti air specific moves also have less clsns in the higher parts of the sprites so they have a higher chance of beating aerial moves, while specific air to ground moves hit lower and have less clsn2 in their lower pixels.
as far as ground to ground goes some standing attacks have smaller clsn2s in the lower pixels so they can be used to punish crouching attacks.

all of this pretty much follows kof's logic, this rewards positioning more than anything so properly aimed attack can beat higher priority attacks or at least trade hit, while the same attack badly positioned will get beaten by the same other attack; if I kept myself away from only use priority as ebyte reccomends because the priority system does not reward position.

that being said, i don't plan to only use this, as I still want to have priority being a factor, even if small mostly to avoid some abuse on positioning, such as always doing a specific jump in which has great air to ground priority or going for low attacks most of the time because they easily beat dps and most other moves. here's where point 2 comes in.

2) priority, yeah, just mugen's , priority is only used when attacks clash and a higher priority attack will always win; I plan to use this only on very specific character attacks so they are easy to find out, but will try to be more imaginative and not use it only on dps. Generally speaking less than 10% of a character's attacks will have above normal priority, while another 10% will have below normal (this is to punish easy to abuse attacks).

3) timing; I use two concept that were taught to me by tenshin back in the year 2k, null first frame of attack and cooling frames;
null first frame of attack is having the very first frame of an attack not hit, it's easy to implement in mugen as I can simple have the clsn1s not be present for the very first tick (since I am not being accurate to anything, i don't need to concern myself with other ways of implementing it) and will be done purely in the air file the way this works is that if both players use the same attack at very close timing but not in the same tick the first attack will beat the second one (unless properly zoomed), this is where basic attacks will lose a lot compared to special attacks as most special attacks will almost never use this.
cooling frames; it's like null first frame of attack, but in reverse, after the attack has been on for a while, the clsn1 stop being active and the character can get hit in the extended limb by an attack that ahs the same priority and get beaten (because it has no active clsn1 anymore) again this is  easily achieved in air file editing; i sue it mostly to prevent (again) low attack from dominating the game.

4) attack clash; if both characters happen to trade hits, even with all the previous conditions in play, instead of having them both get hit, both player will just hitpause then regain full control; I might change this to something more akin to paper/scissors rule, afaik, some games only allow you to attack, not regain full control, and the attacks you can do are limited.

so combining those concept i plan to balance out all attacks in my game, there will also be attacks that overpiorityze throws and/or are able to hit projectiles but I will amke separate throw and projectile topics.
Re: Various considerations regarding hit interaction.
#2  August 19, 2011, 07:21:45 pm
  • avatar
  • *****
  • Nothing ever ends
    • Portugal
    • www.justnopoint.com/loona
1) clns2 and clsn don't perfectly overlap; to give attacks more priority I just make the clsn 2 area smaller than the clsn 2 for specific attacks

I take it the3rd "clsn2" is actually a "clsn1".

Quote
all of this pretty much follows kof's logic, this rewards positioning more than anything so properly aimed attack can beat higher priority attacks or at least trade hit, while the same attack badly positioned will get beaten by the same other attack; if I kept myself away from only use priority as ebyte reccomends because the priority system does not reward position.

I haven't messed with hit parameters in years, but is it possible to apply math expressions to the priority values?

IIRC true expressions count as a 1 in Mugen math, while false count as 0, so in pseudo-code (I'm not checking proper Mugen parameter names for a quick reply), assuming for example you want a standing attack to have a little extra priority against an mid-air opponent (after all, one is grounded while the other exchanged movement control for the ability to be airborne for a while), you could have something like:

HitPriority = DefaultPriotity + (self.standing && !enemy.standing)

Or to help a character holding his ground (not moving horizontally or vertically) while using a hard attack beat an opponent's dashing attack (think a weak version of Makoto's Hayate), so that if it's like the latter character was charging into a wall and getting hurt for it:

HitPriority = DefaultPriotity + (self.standing && self.velx==0 && enemy.velx!=0)

(this one I could kinda imagine being tweaked for a damage formula to detect the direction of the opponent's movement and increase the damage he he's moving toward you, and reducing it if moving against...)


Anyway, something like this could help you reward not just position but broader notions of movement, if it works.

Quote
2) priority, yeah, just mugen's , priority is only used when attacks clash and a higher priority attack will always win; I plan to use this only on very specific character attacks so they are easy to find out, but will try to be more imaginative and not use it only on dps. Generally speaking less than 10% of a character's attacks will have above normal priority, while another 10% will have below normal (this is to punish easy to abuse attacks).

Again, if priority can be affected by expressions, you could toss in some other factors, like making the current power bar value affect priority, as in, full power bar -> extra priority for safer moves, or you could spend barfor a damaging move, but later moves aren't as safe:

HitPriority = DefaultPriority + floor(power/1000)


Quote
3) timing; I use two concept that were taught to me by tenshin back in the year 2k, null first frame of attack and cooling frames;
null first frame of attack is having the very first frame of an attack not hit, it's easy to implement in mugen as I can simple have the clsn1s not be present for the very first tick (since I am not being accurate to anything, i don't need to concern myself with other ways of implementing it) and will be done purely in the air file the way this works is that if both players use the same attack at very close timing but not in the same tick the first attack will beat the second one (unless properly zoomed), this is where basic attacks will lose a lot compared to special attacks as most special attacks will almost never use this.

I recall many years ago experimenting with a character that having the HitDef and Clsn1 active in the very first frame of a jab would make it too fast for the opponent to detect the attack and go into the blocking state, although that didn't happen if it was active in later frames.... maybe it was a programming problem in the character or an odd issue of an earlier Mugen version?...
Either way, it's kinda expected for any attack to need a little time for the actual attacking frames to come out (the character's gotta move his arm or leg into position for a moment, even if a very brief one).

Quote
cooling frames; it's like null first frame of attack, but in reverse, after the attack has been on for a while, the clsn1 stop being active and the character can get hit in the extended limb by an attack that ahs the same priority and get beaten (because it has no active clsn1 anymore) again this is  easily achieved in air file editing; i sue it mostly to prevent (again) low attack from dominating the game.

Maybe at least on the heavier attacks, the Clsn2 for the retracting limbs could become as big as the Clsn1 were for the active attacking frames according the the 1st principle you mentioned here, to sort of simulate momentum of a high-commitment attack you can't recover easily from?

Quote
4) attack clash; if both characters happen to trade hits, even with all the previous conditions in play, instead of having them both get hit, both player will just hitpause then regain full control; I might change this to something more akin to paper/scissors rule, afaik, some games only allow you to attack, not regain full control, and the attacks you can do are limited.

Maybe some rules of thumb like:

- attacks with similar priority/damage for grounded characters: clask with no damage taken, both maintain their distance
- dashing attack vs. grounded attack: dashing character stays in the stop where the clash happened, grounded character gets slightly pushed back
- one of the clashing attacks happens to be a kick: that character can't immediately kick using a different leg or move fo a brief amount of time to regain balance
- one of the clashing attacks is a punch: if it's a heavier attack, can't repeat that punch, but can use one that uses a different arm
- maybe some variation of this that makes some attack sub-optimal by itself in terms of speed or damage, but makes it easier to follow-up with a throw?...
Re: Various considerations regarding hit interaction.
#3  August 20, 2011, 12:02:54 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Mugen actually allows for quite a bit with it's priority system. You have priorities 1-7, but you also have Hit Miss and Dodge.

Hit vs Miss, Hit takes priority
Hit vs Dodge, No contact IIRC
Dodge vs Dodge, I have no idea actually
Hit vs Hit, Both hit.

Using those you could leave attacks to have the same priority, but still be capable of missing or failing a hit rather than raising the priority of another attack. For example, you want HP to have a 4, Hit, but you really don't want it beaten out by an LP with 4,Hit, so you use 4,Dodge, and they both miss.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Various considerations regarding hit interaction.
#4  August 22, 2011, 11:29:21 pm
  • ******
  • [E]
    • Mexico
Mugen actually allows for quite a bit with it's priority system. You have priorities 1-7, but you also have Hit Miss and Dodge.

Hit vs Miss, Hit takes priority
Hit vs Dodge, No contact IIRC
Dodge vs Dodge, I have no idea actually
Hit vs Hit, Both hit.

Using those you could leave attacks to have the same priority, but still be capable of missing or failing a hit rather than raising the priority of another attack. For example, you want HP to have a 4, Hit, but you really don't want it beaten out by an LP with 4,Hit, so you use 4,Dodge, and they both miss.

humh.. that's useful info, I could use miss for attacks that I don't want to clash. I plan to only use 4 for most attacks, 3 for some jabs and other attacks that might become dominating and 5 for dps or other strong hits.

I will probably use those for hitting projectiles and stuff along with making the projectiles lower priority or something.

I take it the3rd "clsn2" is actually a "clsn1".

yeah, typo, warui warui.

I haven't messed with hit parameters in years, but is it possible to apply math expressions to the priority values?

IIRC true expressions count as a 1 in Mugen math, while false count as 0, so in pseudo-code (I'm not checking proper Mugen parameter names for a quick reply), assuming for example you want a standing attack to have a little extra priority against an mid-air opponent (after all, one is grounded while the other exchanged movement control for the ability to be airborne for a while), you could have something like:

HitPriority = DefaultPriotity + (self.standing && !enemy.standing)

Or to help a character holding his ground (not moving horizontally or vertically) while using a hard attack beat an opponent's dashing attack (think a weak version of Makoto's Hayate), so that if it's like the latter character was charging into a wall and getting hurt for it:

HitPriority = DefaultPriotity + (self.standing && self.velx==0 && enemy.velx!=0)

(this one I could kinda imagine being tweaked for a damage formula to detect the direction of the opponent's movement and increase the damage he he's moving toward you, and reducing it if moving against...)


Anyway, something like this could help you reward not just position but broader notions of movement, if it works.

I think that's a bit overkill, i mean, using expressions, mostly because stuff is already gettign standarized, that's useful on a more general mugen set up work, but for a full game I already know which attacks are sliding and which attacks are grounded adn can adjust the clsns/priorities accordingly.

Again, if priority can be affected by expressions, you could toss in some other factors, like making the current power bar value affect priority, as in, full power bar -> extra priority for safer moves, or you could spend barfor a damaging move, but later moves aren't as safe:

HitPriority = DefaultPriority + floor(power/1000)

I will probably do that only for specific characters that ahve suepr armour activated by power, or other power up condition.

I recall many years ago experimenting with a character that having the HitDef and Clsn1 active in the very first frame of a jab would make it too fast for the opponent to detect the attack and go into the blocking state, although that didn't happen if it was active in later frames.... maybe it was a programming problem in the character or an odd issue of an earlier Mugen version?...
Either way, it's kinda expected for any attack to need a little time for the actual attacking frames to come out (the character's gotta move his arm or leg into position for a moment, even if a very brief one).

Oh,I need to reexplain this, let's say an attack's is split in 3 times, first the preparation frames, which are the animations frames before the attack hits, then the hit frames, then the cool down frames; the concept is that once the character gets into the hit frames the first one who does hits the second one.


Maybe at least on the heavier attacks, the Clsn2 for the retracting limbs could become as big as the Clsn1 were for the active attacking frames according the the 1st principle you mentioned here, to sort of simulate momentum of a high-commitment attack you can't recover easily from?

yes, taht's it, capcom actually does taht a lot, even in the vs series and I like the concept and it's oen of the reason ic an't enjoy mugen conversions of capcom characters

attacks with similar priority/damage for grounded characters: clask with no damage taken, both maintain their distance
- dashing attack vs. grounded attack: dashing character stays in the stop where the clash happened, grounded character gets slightly pushed back
- one of the clashing attacks happens to be a kick: that character can't immediately kick using a different leg or move fo a brief amount of time to regain balance
- one of the clashing attacks is a punch: if it's a heavier attack, can't repeat that punch, but can use one that uses a different arm
- maybe some variation of this that makes some attack sub-optimal by itself in terms of speed or damage, but makes it easier to follow-up with a throw?...

Maybe, I like having the dashing character push te grounded one, but one can argue that the grounded one might as well stop the moving one and I don't wanna amke it too complex by taking the character's weight into consideration. I think i will go with a semi full control set up(only basic attacks, no specials), becuase I kinda dislike the fact of forcing a clash then just DP or DM and get a terrible advantage.