YesNoOk
avatar

Formula to calculate damage? - some possible factor to consider (Read 3408 times)

Started by Loona, July 20, 2009, 09:01:06 pm
Share this topic:
Formula to calculate damage? - some possible factor to consider
#1  July 20, 2009, 09:01:06 pm
  • avatar
  • *****
  • Nothing ever ends
    • Portugal
    • www.justnopoint.com/loona
There's a lot of talk about balance between different characters in a game, but perhaps it would be a good idea to develop some measure of balance within a character's own moves.

The idea is to balance the damage consider as many other factors in a move as possible, perhaps coming up with with some calculation which, not necessarily reaching a perfect equation for an attack's damage, help somehow to measure it's likeliness to actually hit, and from there come up with a reasonable number to use as its damage.

For a simple example, let's take your average jab. Some relevant factors in getting the move to hit:
C1 - its attack area / Clsn1
C2 - the area of the character (fully) vulnerable during the attack / clsn2
C3 - the intersection of the above two
T - full duration of the attack animation
T1 - duration of the actual attacking frames (while clsn1 and hitdefs are active)
T2 - sum of the durations of the animations before and after the actual attacking frames
L - repeatability (you can start the same attack right after you've finished - an option you wouldn't have with a super or other moves that require certain circumstances, like being airborne); in this case it's zero. The "L" is for "lag".

Consider also:
S - total screen area
M - total match length (assuming the timer isn't set to infinite)

Now, consider how much of the full screen the attacking area actually covers (very little), how much of the attack itself is vulnerable (in a normal jab, usually all of it - then again, some KoF clsns look a bit peculiar...), how much is left completely vulnerable.

Measuring these areas and establishing proportions between them, perhaps applying some heuristic value to them, could help reach some value for the damage of the actual move, which would likely benefit from a value to modify it and adjust the general damage scale. Maybe even 2 values, since so far I'm considering space and time as factors. I'll use A1 for adjustments to the spatial value, and A2 to the temporal values.

damage = D = (A1 x ((C1 + C3 - C2) / S ) ) + (A2 x ( T1 / T))

This is admittedly a very rough model which probably could benefit from some modifications, but it's just meant to provide an example...

Factors left out of the example are priority (I think I recall a post by [E] about how the concept might not actually apply in KoF - surely it could be a factor to consider here, but it's best left out for clarity's sake) and movement, since unlike some normals and specials, that isn't really a factor here.
Also left out of the example is the possibility of more complex moves which may involve several hits with differently shaped clsn1s and clsn2s throughout the duration. I figure it's better to start by keeping things simple.


An interesting example might be to apply something like this to, say Kung Fu Man's moves, or at least those of a character in an existing fighting game of venerable reputation to see if there's some distinguishable pattern one could seek to emulate and from then on apply to new attacks, making it simpler to create new things with some reasonable guideline that take into account move variety without having to measuring pixels in emulators and other such exercises in imitation.
Re: Formula to calculate damage? - some possible factor to consider
#2  July 20, 2009, 11:14:52 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
If you're going for accuracy, you're counting pixels. Or just taking down the artmoney value of life and extracting the damage, whatever.

I don't understand how you'd apply a numerical value to this stuff. I mean, attack covers 20 pixels in front of you, has a 30 tick start up outside of superpause is unblockable and costs 3 stocks. How do you really decide how much damage this should do outside of setting a value and altering it if it's too much. You can't apply an equation to everything simply because it's far too relative to the situation.


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: Formula to calculate damage? - some possible factor to consider
#3  July 20, 2009, 11:30:34 pm
  • ******
  • [E]
    • Mexico
overall character balance takes priority, the example that always is mentioned is whip's (previously only) dm, it does a lot of damage, can be easily comboed into, has a lot of priority, etc ... but whip overall would be a really weak character if it were not for her dm.
Re: Formula to calculate damage? - some possible factor to consider
#4  July 21, 2009, 12:11:03 am
  • ***
  • +1 to whoever added Godzilla to the main index.
Interesting concept, but shouldn't you also take into effect the properties of the attack, dizzies, burns, elecutions, etc. maybe even extend this to other properties.
i think we should call it an "engine" so we don't look like total idiots because otherwise we'd be arguing about a "game" and that would be somehow "dumber" than arguing about an "engine" on the "internet" for countless hours

Iced said:
I for one, do not enjoy round corners!  :bigcry:
But they hurt much less when we accidentally hit them!  :S
Re: Formula to calculate damage? - some possible factor to consider
#5  July 21, 2009, 12:30:04 am
  • *****
  • can see your halo
    • Germany
    • Skype - panchasell
    • www.mugenguild.com/
For a simple example, [...9 factors to take into consideration]

damage = D = (A1 x ((C1 + C3 - C2) / S ) ) + (A2 x ( T1 / T))

How does an advanced example of that look? :D


overall character balance takes priority

And should be damn hard to calculate formally.

The basics, a rough guideline that might be easier (relatively speaking...) to develop will not be worth much in MUGEN because it will not be applied by anyone, ever.

These shall be brain excersises and only become theoretical systems. Prophecy end. Continue.


MirageAtoli's Dizzy points and other non-MUGEN-standard features are a wall to overcome. Could you include amount n of bonus features that a character might have in a formula? As one special X factor or what? KFM would have X factor of 1, meaning nunthin special on most of his moves.

How to treat special combo setups (e.g. wall hits, launchers)?

Cross-up potential?

Unblockable. Unguardable. Ability to hit you on the floor. Where to start and where to end including factors?
"Several times now, Achamian thought he had glimpsed golden haloes about Kellhus's hands. He found himself envying those, such as Proyas, who claimed to see them all the time."
--R. Scott Bakker
The Thousandfold Thought (2006)
Re: Formula to calculate damage? - some possible factor to consider
#6  July 21, 2009, 01:51:22 am
  • ***
  • +1 to whoever added Godzilla to the main index.
The main thing I am wondering about is silly things like teleportation to a safe distance after an attack etc.

Ease of executing a command may also be worth considering, especially if this formula is about the likelihood of hitting the opponent.

Combos and Combo setups, I think would affect the L value.
i think we should call it an "engine" so we don't look like total idiots because otherwise we'd be arguing about a "game" and that would be somehow "dumber" than arguing about an "engine" on the "internet" for countless hours

Iced said:
I for one, do not enjoy round corners!  :bigcry:
But they hurt much less when we accidentally hit them!  :S
Last Edit: July 21, 2009, 02:08:06 am by MirageAtoli
Re: Formula to calculate damage? - some possible factor to consider
#7  July 21, 2009, 03:29:38 am
  • ******
    • Portugal
    • network.mugenguild.com/pots/
You know, the only way you could use damage to balance Mugen would be to make some characters deal more damage than others, not all going by the same rules. ;P There are more factors to consider other than attack properties.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.
Re: Formula to calculate damage? - some possible factor to consider
#8  July 21, 2009, 03:30:49 am
  • avatar
  • *****
  • Nothing ever ends
    • Portugal
    • www.justnopoint.com/loona
This isn't a metter of accuracy of counting pixels or accuracy, as it's more of a case of trying to figure out a reasonable formula for damage if you're making something sufficiently new - a mathematical rule of thumb, if you will.
If animating an original character or taking liberties with an existing one, it'd be handy to have something of that sort.

More factors can be considered, like cost in super bar (it's roughtly pondered if hardly fully covered by that R parameter I brought up in there - the time between repetitions would assume the minimum amount of time needed to fully fill up the power bar), but like I said, I want to start simple.

By default I'm not taking into account how easy or not it is to combo into a move, and in part the "pre-attack" delay covers it, and one pays for the extra damage off a different move in skill.
he ease of a move may be a factor, however - some heuristic based on the number and variety of buttons/directions can and probably should come into play - but not in a simple example like a jab, where a single button press counts as a cost of zero.

Dizzying properties might be a factor, but stuff like electrical or flaming effects wouldn't be that relevant - unless they involved opening up juggling properties.

A more encompassing vision of balance is of course more important, but this could still be handy if someone's trying to stardartize their own characters for personal use of a full-game project.


It's of course not actually necessary to go into big maths, but I still think it's worth it to give this sort of thing some though, something to help decide "how much damage should this attack give?".
Re: Formula to calculate damage? - some possible factor to consider
#9  July 21, 2009, 03:36:54 am
  • *****
  • Horrible
    • Sweden
    • http://network.mugenguild.com/anjel/
You're 10 years late.
My shitty mugen stuff:
Re: Formula to calculate damage? - some possible factor to consider
#10  July 25, 2009, 07:03:45 pm
  • *****
  • ロッキングガール
  • 「目指すはクールでロックなアイドル!」
    • twitter.com/c001357
youll have to take in every other characters' data too....
Re: Formula to calculate damage? - some possible factor to consider
#11  August 04, 2009, 10:14:24 pm
  • avatar
  • *****
  • Nothing ever ends
    • Portugal
    • www.justnopoint.com/loona
youll have to take in every other characters' data too....

Not necessarily - not anymore than people already consider every other Mugen creation out there when making their own. Might be handing for a personal standard or closed game though.

Just something meant to serve as a rought guideline of making something original, more or less, if you're not basing your data on a specific game/character data.