Glitch City

Glitch City (Japanese: バグった Bug City) is a generalized term used by players of the Pokémon games to refer to maps with invalid tile data.
==Generation I==
===Accessing Glitch City===
Glitch City can be accessed by executing a series of steps at the Kanto Safari Zone. Specifically, the player should enter a Safari Game, then immediately after entering, attempt to leave the Safari Zone. When the attendant asks if the player wants to leave early, the player should answer “no” and reenter the Safari Zone, rather than actually leave. The game should then be saved and reset. When the player now attempts to leave the Safari Zone again, the attendant will instead ask if the player would like to join a Safari Game, to which the player should answer “no” and leave through the south exit. After taking 500 steps at any location other than the Safari Zone, the Safari Zone's PA will ring, and the player will be warped into the Safari Zone gate. By leaving the gate through the south exit, the player will enter Glitch City.
Glitch City cannot be accessed if the player runs out of steps in Celadon City, Cerulean City, Lavender Town, Saffron City, Fuchsia City, Viridian City, Pewter City, Cinnabar Island, Vermilion City, or inside any building.
===Escaping Glitch City===
The only way to leave Glitch City is to or out of it.
===Explanation===
In the Pokémon games, doors and cave entrances are coded as “warps” that are placed on tiles. Warps specify two values: one value indicates which map the player should be warped to, and the other specifies which warp on that map the player should be teleported to (warps can only lead to other warps).
Glitch City occurs because the player leaves the Safari Zone while the step timer is still running. When the steps run out, they are automatically warped to the Safari Zone gate, regardless of whether they are actually in the Safari Zone.
The reason the player may find themselves in Glitch City upon exiting the gate is because the door that would lead out to Fuchsia City is coded so that the warp points to warp 4 on the last map the player was on. This works perfectly after a normal Safari game, where the player would be warped to just before the Safari Zone's gate. However, many areas in Generation I Kanto lack a warp 4, leading to a glitch if the player was in one of those maps when the steps run out. The maps that have a warp 4—Celadon City, Cerulean City, Lavender Town, Saffron City, Fuchsia City, Viridian City, Pewter City, Cinnabar Island and Vermilion City—do not result in Glitch Cities, instead taking the player to wherever the warp 4 is.
===Layout===
Glitch City is a corrupted version of whichever map the player was on when they ran out of time. The Town Map will display the location the player was in right before entering a Glitch City as the player's current location. For example, if a player was on Route 1 prior to entering a Glitch City, the Town Map will display the player on Route 1. Glitch City's wild Pokémon data is the same as that of the map that the player entered it from.
The dimensions of the source map are apparently preserved: going too far in any direction while in a Glitch City will cause the player to walk outside of the map, thus crashing the game. Pokémon Stadium's Game Boy Tower mistakes such crashes for a corrupted game. The only crash-free Glitch City is that of Pallet Town, which does not allow the player to move at all.
Although some aspects of the source map of Glitch City are preserved (such as some tiles), most other attributes are completely changed (such as what is and is not walkable terrain). There are essentially five types of tiles in Glitch City: walkable tiles, ledges, walls, water tiles, and tiles which can be walked onto but not walked from. Map links, which usually allow players to travel between two adjacent areas without a warp (such as from to Viridian City), are also apparently ignored, so if a player manages to navigate to where an adjacent map should be and try to walk into it, the result will be the same as if they walked outside of the map.
===Effects===
In Glitch City, cuttable trees usually cannot be down no matter how many times the move is used on them, signposts are unreadable, and doors and cave entrances cannot be entered. This is because objects (such as the invisible ones placed over signs) and warps (such as those placed over doors and cave entrances) are not present in Glitch City. It is possible to in some Glitch Cities, even if no water tiles are visible.
In , Glitch City causes the player's Pikachu to run to and from random places. Walking onto certain glitched tiles may make it disappear, though after the player leaves such tiles, Pikachu may reappear and follow the player's recorded path.
If the final step before the steps run out is taken as the player jumps a ledge in an area with a fourth warp, the player may be able to walk through walls when returning to that area. If it is made while the player is spinning, the player will always be spinning while walking, even if this occurs in an area from which it is impossible to enter Glitch City, such as Viridian City.
If the player has one Pokémon in the party that is ed, the player will appear in front of a Pokémon Center when it faints. This makes areas such as Cerulean Cave and Indigo Plateau accessible earlier than normal. The glitch is deactivated once a building is entered.
Fishing or pressing the start button while in Glitch City to bring up the menu often changes the appearance of the glitched terrain. This is sometimes permanent for the remainder of the time spent in Glitch City, and will sometimes change all the tiles into water tiles.
In , if the final step is taken on Routes 17 or 18, the game acts as if the player is still on Cycling Road. Although the player's sprite is shown to be walking, the Bicycle cannot be unmounted, and the player will automatically move downwards as long as there is an empty tile.
===Specific Glitch Cities===
AccessibleArea: 0 means no Glitch City (warp 4 exists), 1 Glitch City exists but you cannot move inside.
Game version	Hardware 	Location 	AccessibleArea	Picture	Description
Yellow 	Lemuroid 1.11.1	 	1 	 	
Yellow 	Lemuroid 1.11.1	 	0 	 	
Yellow 	Lemuroid 1.11.1	 	1 	 	
Yellow 	Lemuroid 1.11.1	 	2 	 	
Yellow 	Lemuroid 1.11.1	 	0 	 	
Yellow 	Lemuroid 1.11.1	 	huge 	 	From the entry point into Glitch City, you can walk left by 10 steps or right by 9 steps before triggering a crash in the game (off ground).
Sometimes the crash triggers the Pokémon health centre dialogue before the white screen.
Yellow 	Lemuroid 1.11.1	 	0 	 	
Yellow 	Lemuroid 1.11.1	 	0 	 	
Yellow 	Lemuroid 1.11.1	 	11 	 	
Yellow 	Lemuroid 1.11.1	 	1 	 	
Yellow 	Lemuroid 1.11.1	 	0 	 	
Yellow 	Lemuroid 1.11.1	 	8 	 	
Yellow 	Lemuroid 1.11.1	 	12 	 	After entering into Glitch City any directional input will make player enter Saffron City. When the player tries to leave Saffron City they will instead re-enter Glitch City.
Yellow 	Lemuroid 1.11.1	 	41 	 	
Yellow 	Lemuroid 1.11.1	 	3 	 	
Yellow 	Lemuroid 1.11.1	 	0 	 	
Yellow 	Lemuroid 1.11.1	 	huge 	 	Player will go down as if they were on .
Yellow 	Lemuroid 1.11.1	 	1 	 	
Yellow 	Lemuroid 1.11.1	 	16 	 	
Yellow 	Lemuroid 1.11.1	 	huge 	 	
Yellow 	Lemuroid 1.11.1	 	1 	 	
Yellow 	Lemuroid 1.11.1	 	31 	 	
Yellow 	Lemuroid 1.11.1	 	1 	 	
Yellow 	Lemuroid 1.11.1	 	1 	 	
Yellow 	Lemuroid 1.11.1	 	5 	 	
 	 	 	~15 	 	In the Glitch City accessible by Route 1, players are limited to about a 15 block space in which they can walk. There is a ledge that the player can jump off, but they will be stuck in a single space if they do so.
This Glitch City is very similar to that of Pallet Town.
 	 	 	 	 	Similar to the normal , its Glitch City counterpart will cause the player to constantly walk downward. Selecting the Bicycle will display the message "You can't get off here.".
 	 	 	 	 	In the Glitch City accessed through , players sometimes can Surf north until they reach the barrier that normally prevents them from leaving to the north. 
Because invisible walls exist on the western side of this Glitch City, travelling north is the easiest way to escape it. If the player goes to the westernmost checkerboard pattern of water in the area, goes left of it one step, then back right, and presses start, the entire area will become surfable water.
 	 	Rock_Tunnel	 	 	If the player runs out of time in this location's Glitch City without using , the darkness effect will carry over into the Safari Zone. At this point, the player may pay to reenter the Safari Zone and explore it in its entirety in the dark. Exiting into Glitch City simply results in the effect going away as usual.
 	 	 	 	 	After leaving the gate the player will be transported to a Glitch City where any move the player makes will send them to Saffron Gym. After leaving the Gym, the player ends up in a completely different Glitch City.
===Video===
==Generation II==
Sometimes, encountering certain forms of ????? can cause a Glitch City to appear after the battle.
In addition, Glitch Cities can also be accessed by walking out of bounds. Glitch Cities accessed this way may corrupt data such as the Bag or Gym Badges. This is caused by many Glitch Cities loading a list of more than the maximum allowed number of 15 object events, and the game trying to load said events overwrites sections of the RAM it isn't supposed to. Many of those cannot be normally seen because they're set to appear at glitched times of day or with specific event flags.
The most well-known Generation II Glitch City, map 0xFF00, can be easily accessed by saving in an indoor area and resetting the game, then by walking out of bounds. The map does not have a defined tileset, so it uses the tileset of the last map the player was on, but if the player saves and resets, the default Johto tileset will be used instead. The background music is initially a glitched version of the previous music theme playing, but after saving and resetting, it will be the same when Lance or is battled. Dimensions can vary, they could initially be 60x35, but eventually set to 0x0 (actually 256x256). Map connections are zeroed out.
If a map doesn't connect to another one in a specific direction, the game replaces only the high byte with 0xFF upon transfer. This allows going to different Glitch Cities that can exhibit different effects, but many of them can softlock the game or restart it in a glitch dimension. For example, if the player is in Pallet Town, which connects to (0x0D01) to the north, and then the player flies to Fuchsia City, which has no connecting map to the north, the player can potentially enter Glitch City 0xFF01.
==Trivia==
* The fansite Glitch City Laboratories is named after the Glitch City glitch.
==In other languages==
==Related articles==
Category:Glitch and Beta locations
Category:Glitches
de:Sunny Town (Glitch)
es:Islas Fallo
fr:Bug-ville
it:Città dei numeri
zh:故障市（漏洞）