• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Dynamics: Velocity, Forces, and Knockback (+ Interactive simulation!)

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
Preface

I am writing this article for three purposes: to define several terms in a consistent way; to unify several areas of research; and to present a cool simulation of dynamics in Brawl. Some of this material is new, but some of it isn't. However, here I combine it into a coherent model.

Furthermore, I have observed that a lot of mysticism surrounds "momentum cancelling", and it really shouldn't. With a complete understanding of dynamics in Brawl, all of the phenomena of "momentum cancelling" are really quite easy to understand, and nothing in "momentum cancelling" constitutes an exception of the general model I present here.

As advertised, I've also made an interactive simulation which allows you to view how a character responds to having an arbitrary launch force applied to it.

To those of you who want to play with the simulator first, it can be found at the following location, but reading the article is strongly recommended:

http://colin.shoddybattle.com:81/brawl/

Definitions

To talk about the dynamics of Brawl, we need a few terms. Most of these terms are already in common use, but they are used in varying ways.

Velocity (v): The velocity (unit: length per frame) of a character is the number of units that they will move in the present frame. Velocity consists of both a horizontal and a vertical component. The momentum of a character is the same thing as the velocity because there is no concept of "mass" in Brawl.

Speed: One component of a character's velocity is a speed.

Force (F): A force (unit: velocity per frame) is the amount by which the character's velocity will change due to the force in the present frame. Unlike real life physics, a force of the same size will change every character's velocity by the same amount because there is no "mass" in Brawl. As a result, acceleration is another name for force in Brawl.

Gravity (Fg): The force of gravity changes a character's vertical speed each frame by a certain value. Each character experiences a different force of gravity. The force of gravity experienced by a specific character is his fall acceleration.

Fall speed (f): The part of a character's vertical speed contributed by the force of gravity. Once a character's fall speed reaches his top fall speed, he no longer experiences the force of gravity.

Drift: The analogy to gravity for the horizontal direction is the force of drift. Using air control (i.e. holding left or right) causes the character to experience the force of drift.

Drift speed: The drift speed is the analogy of fall speed for the horizontal direction. Characters also have a top drift speed.

Knockback: Knockback is not a quantity. It is a state into which characters enter, which has certain properties. One property of knockback is that the character is considered to be "falling", regardless of which direction they are actually heading. A character entering knockback also causes him to experience hitstun.

Knockback resistance force (Fr): Characters in knockback experience a force which is applied opposite to the direction at which the character was initially launched. This knockback resistance force is what causes knockback to end. Once the character is no longer in knockback, this force ceases to be applied. The magnitude of this force is the same for all characters.

Launch force (Fl): Generally being hit by a move causes a character to be launched. The force that is applied for one frame to launch the character is the launch force. It is exactly this quantity to which the "max launch speed" value in the results screen corresponds.

Launch resistance (r): The most important quantity used to calculate the launch force for different characters is a character's launch resistance.

Hitstun: The phase of knockback during which the character cannot double jump, use a special move, or use air control is called hitstun. The number of frames of hitstun is directly proportional to the magnitude of the force with which the character was launched.

Obsolete Terms

Weight: This term is problematic. In real life physics, the weight of an object is the force of gravity it experiences, which is a character's fall acceleration in Brawl. However, the smash community has a long tradition of using "weight" not to refer to fall acceleration but to refer instead to launch resistance. As a result, the term is hopeless and should not be used.

Dynamics of a Hit

This section is quite technical, but it is the main point of the article.

When a character is hit by some move, a launch force is applied to him in the present frame (and only the present frame). The magnitude of this launch force is calculated via a two step equation. (For simplicity, fixed launch force moves are excluded.) Here, launch force is denoted by F[l].

Step 1. k := b + dg/r

Step 2.
If k > 2550: F[l] := k + (a[y] - 1)c
If k < 2550: F[l] := k

where k is a dummy variable, b is the base launch speed of the move, d is the damage after the hit, g is the launch speed growth of the move, r is the character's launch resistance, a[y] is the character's vertical acceleration, and c is the vertical strength of the move.

For most moves, the character enters knockback as soon as this force is applied. The exception is nondamaging moves. The dynamics of nondamaging moves are very simple to explain. Nondamaging moves, such as the wind hitbox of Game & Watch's up air, apply a completely ordinary launch force. However, they do not cause the character to enter knockback. As such, they are pretty much the same as the force a character experiences when he jumps.

Here we discuss hits that induce knockback.

The frame that this launch force is applied (frame 0), the character's "launch velocity" (denoted v[l]) will be exactly the launch force force, namely

v[l] = F[l] if frame = 0

However, while the character is in knockback, he experiences a knockback resistance force. Hence, after q frames, the launch velocity will be

v[l] = max{F[l] - F[r]q, 0}

where F[r] is the knockback resistance force. However, v[l] is not the character's actual velocity because we also need to consider gravity. If no fast falling is involved, after q frames, the character's fall speed, f, will be

f = min{F[g] q, f[top]}

where F[g] is the force of gravity and f[top] is the character's top fall speed. Hence the net vertical velocity, v[y], will be

v[y] = v[l]{y} - f

where v[l]{y} is the vertical component of the launch velocity and f is the fall speed. The vertical component of the launch velocity is just v[l] sin(θ) where θ is the launch angle. The horizontal direction is similar, but the launch speed is unopposed there. So we can write down both components of a character's velocity after q frames.

v[x](q) = cos(θ) max{F[l] - F[r] q, 0}
v[y](q) = sin(θ) max{F[l] - F[r] q, 0} - min{F[g] q, f[top]}

To find the position, s, after q frames, we just sum v from 1 to q.

s[x] = v[x](1) + v[x](2) + ... + v[x](q)
s[y] = v[y](1) + v[x](2) + ... + v[y](q)

To find the farthest extent the character reaches, we would just look for the maximum position value.

"Momentum Cancelling"

The main premise of momentum cancelling is to end hitstun earlier than it would normally end. This can be accomplished either with the use of an aerial or an air dodge; however, you can fast fall at any point during an aerial, so it is the case we will discuss.

First, it should not be a surprise that you can fast fall while apparently rising because while in knockback, a character is always considered to be "falling". The reason this helps you live longer is that it allows your fall speed, f, to reach a higher value. So, v[y] will decrease more rapidly, which obviously causes the vertical position, s[y], to be smaller than it was before.

The second "momentum cancelling" strategy is, after having left hitstun, using a double jump or special. The mechanics for this will depend on each particular double jump or special, but in general, using a double jump works the same way it works anywhere else, i.e., it applies a jump force to the character.

Regardless of whether you break out of hitstun early, after the point when hitstun would naturally end, you can induce a drift force by using air control (holding toward the stage). This does not help as much as the other "momentum cancelling" strategies, but since hitstun often ends before knockback, it can help a bit. This works analogously to fall speed, and so the equation for v[x](q) becomes

v[x](q) = cos(θ) max{F[l] - F[r] q, 0} - max{min{F[d] (q - q0), d[top]}, 0}

where q0 is the frame upon which you start using air control, F[d] is the drift force, and d[top] is the top drift speed. Obviously this will result in a smaller total horizontal distance travelled, similar to fast falling.

Simulation

I made a Java applet interactive simulation that allows you the view the effect of applying an arbitrary launch force to a chosen character:

http://colin.shoddybattle.com:81/brawl/

A link to the source code is also available on the page.

The GUI of the simulator should be fairly self-explanatory. Note that the "launch force" field corresponds exactly to the values you get on the results screen under "max launch speed".

One note: at this time, the values given by the simulator are not exact because my values for fall speeds and such were a bit mediocre, but they should be close enough to give you a very good idea what is going on.

References

- Brawl Mechanics: Damage & Knockback Formulae by Amazing Ampharos and me. The present article should be taken to supersede the "Knockback" section.
- leafgreen's post on knockback, in which he came up with the idea used in this artlce.

Also a special thanks to leafgreen386 for testing a couple of things for me.


Colin.
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
Oops... this was supposed to be posted in Brawl Tactical. If a mod sees this can you please move it to Brawl Tactical?
 

Adapt

Smash Lord
Joined
May 7, 2008
Messages
1,489
Location
NS, Canada
Could you explain the knockback resistance force better? I have always wondered why the launch trajectory travels in an arc until a certain point... and then drops like a stone. It's really stupid since brawl is supposed to have a proper physics engine
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
Well, you are launched with a certain launch force which is applied for only one frame, so you can think of it as setting your speed to your max launch speed. Then each frame your launch speed, which is kept separate from your total speed, is decreased by a bit because of the knockback resistance force. Once your launch speed is zero, the knockback resistance force stops being applied. Your fall speed is having an effect this whole time, but once your launch speed is zero, it's the only thing having an effect, so as you said, you "drop like a stone".

It doesn't make any sense in real life physics, but it's just how it is in the game. :p
 

Mr. Escalator

G&W Guru
Joined
Apr 11, 2008
Messages
2,103
Location
Hudson, NH
NNID
MrEscalator
<3 Colin
I read the draft of it, but the applet is new to me. It's fun messing around with the angles, and such.
 

feardragon64

Smash Champion
Joined
Apr 9, 2008
Messages
2,154
Location
San Francisco
This is very interesting. So does the simulation assume a constant drift toward the stage until the hitstun state ends?

Another question: what is the difference between max x position and max distance? I tried doing the following:
Use bowser and kirby with a launch force of 5000 and an angel of 45 degrees. The max x position for the both of them ends as 75080 but the max distance differs. Bowser's max difference is 89,241 and Kirby's is 92,686. Could you clarify that for me? Thanks.

And really good job. This is great work!
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
The simulation doesn't apply any drift because I don't have values for drift. Just for clarification though: you can only apply drift after hitstun ends.

Max distance is the maximum sqrt(x^2+y^2) value, which may not be the same thing as the sqrt((max x)^2+(max y)^2) since the max x and y could occur at different points.
 

feardragon64

Smash Champion
Joined
Apr 9, 2008
Messages
2,154
Location
San Francisco
Alright fair enough. A few more questions:

1) In the character class you have constants for fall acceleration and top fall speed hard coded when initializing instances of the class for all the characters. Where did you get these values?

2) Are velocities no longer calculated when the hitstun state ends?

3) This doesn't have much to do with the actual goal of this but I was just wondering if you could tell me what you were doing with this line in the Dynamics.java file:
Character lucas = Character.getCharacter("Dedede");
X_X I thought at first it had to do with initializing the character variable but you never modify it later in main. Not only that, but the initialization has absolutely nothing to do with lucas or DDD....I'm sorry I'm just really confused X_X

Thanks in advance.
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
1) The top fall speed values are from Doval's list of fall speeds converted to the game's units. The fall acceleration values are from analysing launch speeds. (The only reason Doval's post wasn't linked in the first post is that I kind of forgot where it was.)

2) Not sure what you mean by this. A character always has a velocity associated with him. It's recalculated every frame based on the forces being applied to the character.

3) That method was just a test. You can delete it and the program will run the same.
 

feardragon64

Smash Champion
Joined
Apr 9, 2008
Messages
2,154
Location
San Francisco
2) Not sure what you mean by this. A character always has a velocity associated with him. It's recalculated every frame based on the forces being applied to the character.
Sorry, I'm a bit more tired than I'm usually for lack of sleep. Anyways, wasn't thinking straight and forgot about the top fall speeds. Nevermind. Thanks for answering the questions though.
 

Veril

Frame Savant
Joined
Jun 20, 2008
Messages
3,062
Location
Kent Lakes, New York
this is a fantastic thread. Very informative and extremely well detailed.

The launch resistance for each character would be really good to know. Is it the weight 1 and 2 of the other knockback thread?
 

Adapt

Smash Lord
Joined
May 7, 2008
Messages
1,489
Location
NS, Canada
The simulation doesn't apply any drift because I don't have values for drift. Just for clarification though: you can only apply drift after hitstun ends.
When does hitstun end (without doing an aerial/air dodge) on the curve that you laid out?
(I realize it should be different for all moves, but perhaps there is a trend and I don't see a mention of it)
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
this is a fantastic thread. Very informative and extremely well detailed.

The launch resistance for each character would be really good to know. Is it the weight 1 and 2 of the other knockback thread?
Launch resistance is what we were formerly calling "weight1". Fall acceleration is one unit more than what we were formerly calling "weight2".

When does hitstun end (without doing an aerial/air dodge) on the curve that you laid out?
(I realize it should be different for all moves, but perhaps there is a trend and I don't see a mention of it)
Well, the number of frames of hitstun is directly proportional to the magnitude of the launch force but it's been called into question lately if the constant of proportionality is the same for all characters, so this issue is not entirely resolved. Roughly speaking though it will end sometime before you start free falling.
 

Galanoth7395

Smash Apprentice
Joined
Oct 28, 2008
Messages
140
Location
Southwest Louisiana
Wow. The smash lab is amazing!!!!

One problem: how am I supposed to figure out the Launch Force/Angle for a move? Is there a thread(s) about it somewhere?
 

petre

Smash Lord
Joined
Jan 17, 2007
Messages
1,920
Location
closest to Sterling Heights, MI on your wii foreca
One problem: how am I supposed to figure out the Launch Force/Angle for a move? Is there a thread(s) about it somewhere?
right here....

Launch force (Fl): Generally being hit by a move causes a character to be launched. The force that is applied for one frame to launch the character is the launch force. It is exactly this quantity to which the "max launch speed" value in the results screen corresponds.
angle i think you pretty much have to guess, also considering that it changes depending on DI.
 

Tristan_win

Not dead.
Joined
Aug 7, 2006
Messages
3,845
Location
Currently Japan
This is blowing my mind but I don't know how exactly to use this.

I'm sorry, I'm not trying to be rude but could you please explain to me how this can be used to help.
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
If we get around to working out the size of each stage in the game's units it can be used to predict the percent a move will kill each member of the cast from an arbitrary position on the stage, among other practical applications.

It's also cool.
 

Tristan_win

Not dead.
Joined
Aug 7, 2006
Messages
3,845
Location
Currently Japan
If we get around to working out the size of each stage in the game's units it can be used to predict the percent a move will kill each member of the cast from an arbitrary position on the stage, among other practical applications.

It's also cool.
Oh yeah, it's hella cool no doubt about that.

Also that additional info would be cool as well since right now I'm testing sheik tipper usmash killing percentage on every character, on ever stage, and with di.

Knowing such things like what % the tipper would kill at on stages like luigi Manor that doesn't have any easy to set up tipper platforms would make it greatly easier.
 

Fizzi

Smash Ace
Joined
Feb 14, 2008
Messages
802
Location
Brooklyn, NY
Slippi.gg
FIZZI#36
Once you are out of hitstun, you can induce a drift force by using air control (holding toward the stage).
This part is wrong. I don't know exactly when you can start inducing a drift force, but it is not immediately after you leave hitstun. This is why it is necessary to jump or use a special, which we determined a while ago in the momentum canceling thread.

I made a short video displaying why I think I'm right (no disrespect, just making sure the smash lab has things right). In the video, I will use snake's fsmash in training mode on a meta knight at 90% on a large stage, twice. The first time I will start attempting to induce a drift force immediately after knockback starts, this means the drift force will be applied at the earliest possible time. The second time, I will do the same except I will spam metaknights uair, which takes him out of hitstun quite early. I chose MK because his uair is extremely fast and if I could induce a drift force instantly after I escape hitstun, a change in distance would be extremely noticable.

Here is the video, take notice of how meta knight lands in the same place in both cases:
http://www.youtube.com/watch?v=3iIgWsuOezY

The flight path is the same in both attempts.
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
You seem to be right.

I wonder if perhaps it's just when the launch speed is fully depleted that you can start drifting.
 

Fizzi

Smash Ace
Joined
Feb 14, 2008
Messages
802
Location
Brooklyn, NY
Slippi.gg
FIZZI#36
You seem to be right.

I wonder if perhaps it's just when the launch speed is fully depleted that you can start drifting.
I think that would make more sense. I'm not sure if you gain the ability to apply a drift force when you jump (which would cause a greater gain in distance between you and the blast zone), or if all jumping does is increase the angle, making you stay further from the horizontal blast zone (much like what you attempt to do with DI).

The effect of specials seem to be cut and dry. Some specials don't have overwhelming momentum bounces and can allow you to regain your horizontal movement, Wario's bike is a good example of this. Other specials allow you to brake like G&W's bucket.
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
It's varied what specials do.

Some specials just alter one component of your speed - Fox's shine for example sets your fall speed to zero, so you actually go higher while in knockback, since the fall speed isn't reducing the launch speed anymore. Other specials alter the speed value directly - Game & Watch's bucket for example presumably just sets your speed to zero.
 

Fizzi

Smash Ace
Joined
Feb 14, 2008
Messages
802
Location
Brooklyn, NY
Slippi.gg
FIZZI#36
It's varied what specials do.

Some specials just alter one component of your speed - Fox's shine for example sets your fall speed to zero, so you actually go higher while in knockback, since the fall speed isn't reducing the launch speed anymore. Other specials alter the speed value directly - Game & Watch's bucket for example presumably just sets your speed to zero.
That makes sense. But it's not just fall speed that is normally made zero right? For example if I dash with fox, jump, and shine, my horizontal momentum will also be stopped by the shine. Also, why do some b-moves have more "deadly" bounces than others? For example, if you try using DK's side-b to momentum cancel, DK will have a very very deadly bounce (actually quite humorous). Fox's shine however, is not as devasting.
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
The shine sets both your drift speed and fall speed to zero. Since there's no drift happening in knockback that just doesn't matter.

I don't know the mechanics of every special (that includes Donkey Kong's forward special), and investigating each of them is probably its own project. I doubt any of them have special mechanics when used in knockback though.
 

leafgreen386

Dirty camper
Joined
Mar 20, 2006
Messages
3,577
Location
Playing melee and smash ultimate
angle i think you pretty much have to guess, also considering that it changes depending on DI.
For someone who has the homebrew channel (like me), determining launch angle is as simple as booting the game up with a zero gravity hack enabled. For regular brawlers, gravity messes with this greatly. Any move that isn't a spike has a positive launch angle, even though it looks like some moves send you downward the entire time due to gravity (ie. fox's shine, lucas's psi magnet, and ganon's ftilt all have positive launch angles).
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
EDIT: Ok, I just tested using a code that is only the modifier portion. I cranked up the hitstun to a ridiculously high value and found that although I could break out of the hitstun, I could not drift until when the hitstun would naturally end. Jumping, fast falling, or using a special did not rectify this after breaking out of hitstun, either. So there you have it. You can't use air control until hitstun naturally ends, regardless of if you break out of it early or not.
I've updated the original post to account for this.
 

Fizzi

Smash Ace
Joined
Feb 14, 2008
Messages
802
Location
Brooklyn, NY
Slippi.gg
FIZZI#36
EDIT: Ok, I just tested using a code that is only the modifier portion. I cranked up the hitstun to a ridiculously high value and found that although I could break out of the hitstun, I could not drift until when the hitstun would naturally end. Jumping, fast falling, or using a special did not rectify this after breaking out of hitstun, either. So there you have it. You can't use air control until hitstun naturally ends, regardless of if you break out of it early or not.
So if you break out of hitstun early by using an aerial, then jump, does that allow you to immediately use air control? Whereas if you had not jumped, you would have to wait until hitstun would naturally end. In other words, do you still have to wait the time it would take for hitstun to naturally end to apply a drift force when you aerial -> jump?
 

leafgreen386

Dirty camper
Joined
Mar 20, 2006
Messages
3,577
Location
Playing melee and smash ultimate
So if you break out of hitstun early by using an aerial, then jump, does that allow you to immediately use air control? Whereas if you had not jumped, you would have to wait until hitstun would naturally end. In other words, do you still have to wait the time it would take for hitstun to naturally end to apply a drift force when you aerial -> jump?
I thought I was fairly clear before, but w/e. Nothing will allow you to use air control before hitstun naturally ends. You can regain your ability to execute actions by performing an airdodge or aerial, but nothing, and I mean nothing (this includes jumping, fast falling, or executing a special) will enable you to perform air control before hitstun would naturally end.
 

camzaman

Smash Journeyman
Joined
May 12, 2006
Messages
410
Location
SoCal
So many Ness mains have all this technical knowledge, you would think they could use it to help Ness place betting in tournies (good job Colin this is sweet).
 

Fizzi

Smash Ace
Joined
Feb 14, 2008
Messages
802
Location
Brooklyn, NY
Slippi.gg
FIZZI#36
I thought I was fairly clear before, but w/e. Nothing will allow you to use air control before hitstun naturally ends. You can regain your ability to execute actions by performing an airdodge or aerial, but nothing, and I mean nothing (this includes jumping, fast falling, or executing a special) will enable you to perform air control before hitstun would naturally end.
Apologies, I just re-read the part of your post I quoted. I missed the part where you explained that, I had just woken up johns. Anyways, thanks for clarifying anyways.
 

Rawr_

Smash Apprentice
Joined
Sep 24, 2008
Messages
94
Location
Los Alamitos, CA
Those are some intense numbers. What is the value for specific moves? like marth's fsmash or something. This is fantastic work, though.
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
Those are some intense numbers. What is the value for specific moves? like marth's fsmash or something. This is fantastic work, though.
Each specific move has a launch speed growth (g), a base launch speed (b), and a vertical strength (c). You can work them out using this script if you like and then calculate launch forces using the formula in the article.
 

Mr. Escalator

G&W Guru
Joined
Apr 11, 2008
Messages
2,103
Location
Hudson, NH
NNID
MrEscalator
Colin, could you give an example of working out a launch force of a real move?
It would make it easier for me to compare the effect of a move on two different characters.
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
I got tired of looking up numbers in a table, so I made a new page that lets you work out the launch force of an arbitrary move on a arbitrary character at any arbitrary percent:

http://colin.shoddybattle.com:81/brawl/forcecalc.htm

So now you can first use this to work out the constants for your favourite move, then use the launch force calculator to work out the launch force under under circumstance, then use the simulator to see it in action.
 

joenopride

Smash Journeyman
Joined
Mar 20, 2006
Messages
230
Location
Regina, Sask, Canada
I am loving all of these scripts your making. The physics of how the game works is fascinating. Thanks so much.

Quick question on the simulation: are the boundaries right now arbitrary, or do they give a general representation of when an attack would kill?
 

ColinJF

Smash Ace
Joined
Dec 21, 2007
Messages
712
The boundaries right now are entirely arbitrary.

I do intend on working out the size of at least one stage in the near future though.
 
Top Bottom