Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Generation I Glitch Discussion

Explanation of the surfing glitch? - Page 1

Explanation of the surfing glitch?

Posted by: bbbbbbbbba
Date: 2014-03-01 13:28:08
The surfing glitch page says:

"However, if START is pressed mid-step, the START menu pops up without giving the game time to change the player's direction if the game is saved. "

This sounds plausible at first, but when I really think about it, it doesn't make much sense. After all, it is not saving but loading that resets the player's direction, so how is it possible that the game "has no time" to change that direction because START is pressed too fast?

I think I need a more accurate explanation for this…

Re: Explanation of the surfing glitch?

Posted by: pokechu22
Date: 2014-03-08 15:51:03
I just did some testing on it.  It seems that it actually is correct, despite the fact that it doesn't make any sense.

It probably has the same cause as the Amazing Man glitch (http://glitchcity.info/wiki/index.php/Amazing_Man; I don't know how to substitute links): the game doesn't update the sprite's facing direction fast enough.  And it must keep the facing direction set, though why it would do so I do not know. 

Though the game DOES do weird things with sprites; I've experienced female symbol's glitched up sprites (including moving my own) be able to talk even when not next to each other tile-based.

(As in, both are off the tile grid at random positions, but next to each other, and thus capable of talking)

Re: Explanation of the surfing glitch?

Posted by: bbbbbbbbba
Date: 2014-03-19 13:54:23
What I believe is that, it is not accurate to say thay the game did not have time to reset the direction; instead, it is that you can trick the game into *changing it back*.

I think the trick works as follows: for some reason, when the player saves the game, the game saves the direction the player was holding. When that save is loaded, the player sprite's facing direction is set to down. However, the saved direction comes into effect for one sprite update, changing that direction before the sprite is drawn.

… Which means, this is actually not a "frame window" glitch. FYI, I tested on a simulator: I face the water, hold the direction so I keep "bumping into" water for a few seconds, press start without releasing the direction (the direction can be released after the start menu it out), and save the game. It works just as fine.

Re: Explanation of the surfing glitch?

Posted by: pokechu22
Date: 2014-03-19 16:03:06

What I believe is that, it is not accurate to say thay the game did not have time to reset the direction; instead, it is that you can trick the game into *changing it back*.

I think the trick works as follows: for some reason, when the player saves the game, the game saves the direction the player was holding. When that save is loaded, the player sprite's facing direction is set to down. However, the saved direction comes into effect for one sprite update, changing that direction before the sprite is drawn.

… Which means, this is actually not a "frame window" glitch. FYI, I tested on a simulator: I face the water, hold the direction so I keep "bumping into" water for a few seconds, press start without releasing the direction (the direction can be released after the start menu it out), and save the game. It works just as fine.


So the act of pausing while moving causes the game to save your move direction partially?  And, could this hypothetically be used to go thru walls a second time, by turning to face up, and then trying to dismount?

Re: Explanation of the surfing glitch?

Posted by: bbbbbbbbba
Date: 2014-03-20 11:55:52


What I believe is that, it is not accurate to say thay the game did not have time to reset the direction; instead, it is that you can trick the game into *changing it back*.

I think the trick works as follows: for some reason, when the player saves the game, the game saves the direction the player was holding. When that save is loaded, the player sprite's facing direction is set to down. However, the saved direction comes into effect for one sprite update, changing that direction before the sprite is drawn.

… Which means, this is actually not a "frame window" glitch. FYI, I tested on a simulator: I face the water, hold the direction so I keep "bumping into" water for a few seconds, press start without releasing the direction (the direction can be released after the start menu it out), and save the game. It works just as fine.


So the act of pausing while moving causes the game to save your move direction partially?  And, could this hypothetically be used to go thru walls a second time, by turning to face up, and then trying to dismount?


Nive try, but I doubt it will work. The problem is, there is no way you can change the saved direction to up without actually moving up.

Incidentally, I thought about it again, and I see why people are regarding this as a "frame window" glitch: even if you release a direction, the "saved last direction" is not reset after the move is finished, leaving a one-frame window to press start and save. This won't help with your hypothetical "dismounting glitch" though, because you have to move in that direction one step in the first place.

Re: Explanation of the surfing glitch?

Posted by: pokechu22
Date: 2014-03-20 17:04:31



What I believe is that, it is not accurate to say thay the game did not have time to reset the direction; instead, it is that you can trick the game into *changing it back*.

I think the trick works as follows: for some reason, when the player saves the game, the game saves the direction the player was holding. When that save is loaded, the player sprite's facing direction is set to down. However, the saved direction comes into effect for one sprite update, changing that direction before the sprite is drawn.

… Which means, this is actually not a "frame window" glitch. FYI, I tested on a simulator: I face the water, hold the direction so I keep "bumping into" water for a few seconds, press start without releasing the direction (the direction can be released after the start menu it out), and save the game. It works just as fine.


So the act of pausing while moving causes the game to save your move direction partially?  And, could this hypothetically be used to go thru walls a second time, by turning to face up, and then trying to dismount?


Nive try, but I doubt it will work. The problem is, there is no way you can change the saved direction to up without actually moving up.

Incidentally, I thought about it again, and I see why people are regarding this as a "frame window" glitch: even if you release a direction, the "saved last direction" is not reset after the move is finished, leaving a one-frame window to press start and save. This won't help with your hypothetical "dismounting glitch" though, because you have to move in that direction one step in the first place.


Well, you can turn around…  I'd have to test it.  And it would be even more of a frame window glitch.  Hm.

Re: Explanation of the surfing glitch?

Posted by: bbbbbbbbba
Date: 2014-03-21 13:03:10




What I believe is that, it is not accurate to say thay the game did not have time to reset the direction; instead, it is that you can trick the game into *changing it back*.

I think the trick works as follows: for some reason, when the player saves the game, the game saves the direction the player was holding. When that save is loaded, the player sprite's facing direction is set to down. However, the saved direction comes into effect for one sprite update, changing that direction before the sprite is drawn.

… Which means, this is actually not a "frame window" glitch. FYI, I tested on a simulator: I face the water, hold the direction so I keep "bumping into" water for a few seconds, press start without releasing the direction (the direction can be released after the start menu it out), and save the game. It works just as fine.


So the act of pausing while moving causes the game to save your move direction partially?  And, could this hypothetically be used to go thru walls a second time, by turning to face up, and then trying to dismount?


Nive try, but I doubt it will work. The problem is, there is no way you can change the saved direction to up without actually moving up.

Incidentally, I thought about it again, and I see why people are regarding this as a "frame window" glitch: even if you release a direction, the "saved last direction" is not reset after the move is finished, leaving a one-frame window to press start and save. This won't help with your hypothetical "dismounting glitch" though, because you have to move in that direction one step in the first place.


Well, you can turn around…  I'd have to test it.  And it would be even more of a frame window glitch.  Hm.


Ouch, I forgot this.

… But I tried and it still didn't work. Then I looked into the code and saw the (somehow silly) reason: when I try to dismount, the game have to check if I'm going to bump into an NPC. For some reason, the function to do this also "fixes" the direction, so I don't go down but go up.

I guess … only the programmers themselves know why they are using two variables to represent the player's direction, and when the variables would disagree. (Well, for the last part, even the programmers themselves were confused, or there won't be the surfing glitch.)

Re: Explanation of the surfing glitch?

Posted by: camper
Date: 2014-03-21 14:01:41
The programmers often use two variables to represent the same thing. Otherwise there won't be hybrid Pokemon.