• 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!

What is Lag Cancelling?

ant-d

Smash Lord
Joined
Jun 3, 2005
Messages
1,314
Location
London, England
This is not a guide, just my thoughts.
As you know, the game is made from code. Every part of the game has a value. These parts are called addresses. There is an address and value for Z-cancelling.

I know the address for Z-cancelling, I can watch the values change.

This address does not behave as others do.

The Address

There are two addresses which deal with Z-cancelling. They are right next to each other. When a battle begins the second of these addresses counts forward starting from 00. It continues to count until the character dies or an aerial A attack is performed.
If an aerial attack is performed the value immediately resets to 00 and stops counting.
Now the first address comes into play.

The first address switches on, changes to 1, or 01 to be exact. If the character lands and doesn't Z-cancel the addresses do not change. The first remains 01, the second remains 00.

Pressing Z or R

If one presses Z or R at any time*, the two values reset and the second begins to count again.
I used to think that the first address means "If aerial attack Then 01". However, if this is true then changing the value to 00 should result in all attacks being Z-cancelled, since the game should think no aerial attacks are being performed.

This is not the case, setting this value to 00 doesn't result in all aerials being Z-cancelled.
Changing only the second value to 00 also does not achieve this result. Changing both values to 00 does achieve this result, its impossible not to Z-cancel.

So, this means there must be a relationship between the two addresses.

Teching
The same addresses for Z-cancelling also governs teching. With the values set to 00 the character will always tech.

The only problem is, I can not reach a conclusion as to why pressing R or Z cancels lag from aerial A attacks. I just cannot see the reasoning in the code. All other things, you can see why and how it has an effect on something else. :psycho:

What is Lag Cancelling?
 

Thino

Smash Master
Joined
Apr 7, 2006
Messages
4,845
Location
Mountain View, CA
the first address seems to act as a "AerialIsPerformed" flag but i cant understand the purpose of the counter O_o
count until an A-aerial or the chacters lose a stock?? sometimes i dont know what programmers smoke
 

ant-d

Smash Lord
Joined
Jun 3, 2005
Messages
1,314
Location
London, England
The first address isn't 'aerial A performed'. If the aerial A wasn't performed how can I get lag from it?

The counter stops when an aerial A is performed and starts whenever R or Z is pressed.
 

cmasterchoe

Smash Journeyman
Joined
Oct 31, 2006
Messages
238
Location
Silver Spring, MD
You know that the Apocalypse is near when Ant-d asks Us the question...

When a battle begins the second of these addresses counts forward starting from 00. It continues to count until the character dies or an aerial A attack is performed.
When you say the second address starts counting, does it count as a result of some action? Or does it merely increase at a consistent rate before a character dies/aerials?
 

okaygo

Smash Journeyman
Joined
Mar 22, 2007
Messages
244
When you say 'Aerial A' do you mean Up A, Down A?
Anyways, from what it sounds like this is going on:

if (address_one[x] == 0x00)
{
aerial_attack = true;
reset_counters();
}

if (address_two[x] >= VALUE || address_two[x] == 0x00)
{
if (touching_ground(hit_box) && falling())
{
perform_tech(direction);
start_counter();
}
else
{
perform_shield();
reset_counters();
}
}
 

ant-d

Smash Lord
Joined
Jun 3, 2005
Messages
1,314
Location
London, England
It just increases automatically +1 every frame as the battle begins.

If you do an aerial attack it resets to 00. Then it will not start again until Z or R is pressed.

Look at it as: when Z or R is pressed the counter resets and begins counting. I think it's irrelevant that the counter begins when the battle starts.

edit: yes, up and down. Just not aerial B.

BTW, when the character is hit, the first address = 01. This is why it cannot be aerial attack as Thino suggested.
 

Thino

Smash Master
Joined
Apr 7, 2006
Messages
4,845
Location
Mountain View, CA
first off ,when does the second address start counting again after an A-aerial?
secondly, when an A-aerial isnt Z-cancelled the 1st address is 01 , the 2nd one is 00 , doesnt it mean lag occurs/tech is flubbed when one of the two addresses is different from zero?
 

okaygo

Smash Journeyman
Joined
Mar 22, 2007
Messages
244
Then its obvious that address one is a flag for character locked in motion. The setting to 0x00 of address two is use of the R Trigger, and the correlation is this

if R Trigger, character locked in motion flag is 0, set value 2 to 0, if 0 && 0 -> perform action.

Edit:

Address 1: Character locked in motion => 0x00, 0x01
Address 2: Frame time between trigger => 0x00 - X

Cause Address 1: 0x01 when being knocked down, or using an aerial A moveset.
Reaction Address 1: None

Timer Address 2: X++; Each frame between R/Z trigger.
Reaction Address 2:
Set Address 1 0x00
Set Address 2 0x00
If Address 1 is 0x00 and char is on ground, shield.
If Address 1 is 0x00 and char is falling, and on ground, tech.
Start Timer.
 

ant-d

Smash Lord
Joined
Jun 3, 2005
Messages
1,314
Location
London, England
Thino: The counter ONLY begins counting when Z/R is pressed. Obviously excluding the auto-start at the beginning of a battle.

No, the counter must be less than HEX: A (DEC: 10). The first value must be 0.

Locked in motion? The value remains the same after the aerial attack. When other attacks are performed the value remains the same. The 01 of the first address only changes to 0 when R or Z is pressed.
 

okaygo

Smash Journeyman
Joined
Mar 22, 2007
Messages
244
I wasn't given the values for checking if you can tech/shield, but my edit clearly validates your point. When you hit R/Z you reset the values, if both value 1 is 0x00, and value 2 is < 0x0A (you said this), then shield. To test this, set the value 2 to 0x00, do an aerial, then hit z in mid-air, you should z cancel. (granted value 1, and 2 stay 0x00)
 

ant-d

Smash Lord
Joined
Jun 3, 2005
Messages
1,314
Location
London, England
Yeah that is what I said. Hey I somewhat answered my own question.

Wait, or did my question even exist in the first place... I think I was looking for a philosophical answer rather than a scientific one.
 

okaygo

Smash Journeyman
Joined
Mar 22, 2007
Messages
244
So then what is your question, the direct correlation is that z cancelling was most likely a flaw overlooked due to teching, and because of its popularity it has stayed in the games.

They needed a flag to set to 0x01 to know if a player could tech, and by hitting R, you reset it. So it doesnt matter if you get hit again, the value just stays 0x01 and the rule only applys when something triggered it to be set to 0x01. They also used this in aerial attacks so you couldn't move right after being hit. However by hitting R/Z as you hit the ground, it registers it as a normal shield, which has a lower delay.

If you hit R/Z in the air, your counter still ticks which doesnt guarntee a tech/cancel. Even though your value is 0x00. And if you don't hit either of them, the address stays 0x01 because there isn't a need to switch back to 0x00. The shield set at 0x00 means nothing, as you have already hit the ground. It just means when you get back into aerial mode and hit R/Z the timer starts again to check for the cancel/tech. The timer is for frame checking...

If you want more help get on aim I'll be around for 15 minutes.
 

okaygo

Smash Journeyman
Joined
Mar 22, 2007
Messages
244
Hmm... knowing what you know, and knowing what I know... I bet we could make a Smash Brothers Bot, using memory reads/and writing a N64 Plugin to send data to the controller. It would work using relavent information, such as who is what character, and when to shield, and to perform actions. If you knew what memory addresses contained player locations, the project would be fun to do.
 

Thino

Smash Master
Joined
Apr 7, 2006
Messages
4,845
Location
Mountain View, CA
I've been thinking about it from the past 15 minutes , but I still cant think of a purpose for these two adresses <_<
 

okaygo

Smash Journeyman
Joined
Mar 22, 2007
Messages
244
I answered the question 3 times in different ways, and antd even confirmed my statement, I even supported why Z cancelling exists, What else is there to think about?
 

ant-d

Smash Lord
Joined
Jun 3, 2005
Messages
1,314
Location
London, England
The tech timing isn't less than 10 frames, the player has more time to tech than to Z-cancel.
You cannot tech with 'R' but can lag cancel using it. [edit]YOU CAN TECH WITH R![/edit]

It could be that it was not overlooked, but made more balanced by reducing the amount of time it has an effect.
 

okaygo

Smash Journeyman
Joined
Mar 22, 2007
Messages
244
So, your assuming R/Z perform the same functions... MAYBE just MAYBE they used TWO if statements... then by that nature canceling was intended.


Anyways,
I'm outtie, I provided a clear logical statement given the information, I didn't leave many gaps (I don't have the code), but if you think a little logically then it all falls into place.

Theres only 2 possibilites:

It's a bug, or it's not.

R/Z Both reset the trigger, because they both shield, but only Z-Techs, so then its most likely not a bug, but a skill to learn. I provided a clear example of implementation with what you gave me....

Peace! Hope this helped at all...

- okaygo
 

ant-d

Smash Lord
Joined
Jun 3, 2005
Messages
1,314
Location
London, England
I made a mistake about not teching with R. I tested when the character was able to attack. So 'R' would result in an aerial attack and not a tech.

My main feeling is that the timings are different. The tech timing is about HEX:14, DEC:20, if I remember correctly.

It seems the behaviour of a human to cut this timing in half and make it cancel only Aerial A lag. Rather than a non-modified glitch per se.
 

okaygo

Smash Journeyman
Joined
Mar 22, 2007
Messages
244
Of course it's hand picked, the game doesn't make up numbers... the coders did.

What are the numbers?
 

okaygo

Smash Journeyman
Joined
Mar 22, 2007
Messages
244
I'm pretty sure the difference of time comes in because of the time it takes you to hit the floor, and the execution of the command. If there is a difference, and its clear that it's a difference between tech and cancel times. Then it is at least logical to assume a semi-intentional implementation of canceling. We will never be sure that it was overlooked as a lag cancel, and was intended to be the time you can shield while hitting the floor. However having it follow into Melee shows that it might very well have been intentional, or liked enough to keep it in the game.
 
Top Bottom