Glitch City
Walk off the edge of the world in Pokemon Red or Blue and the game does not stop you. It just runs out of map, and builds you a city out of whatever it finds next.
Every town in the game is a grid of blocks, and every block is a small square of tiles the game keeps in a list. When you step past the last real map, through a gap the Safari Zone can open, the game keeps reading blocks anyway, straight out of memory that was never meant to be a map. What it draws is Glitch City: real streets and walls and water, shuffled into a place that was never designed, sometimes beautiful, often a trap.
The way in
You do not stumble into Glitch City by accident. It takes a specific, well-known trick with the Safari Zone's timer, worked out and shared by the glitch community over many years. Tick through the route.
How a map is built
To understand Glitch City you have to know how a normal map is made. It is not drawn pixel by pixel. It is a grid, and every cell holds one block, a four by four square of tiles chosen from a set. Here is the real Kanto overworld block set. Pick a block, paint the map, and see a town take shape, or hit Random and watch it become a Glitch City.
Why it breaks
So where does the garbage come from? The game keeps one pointer to where the current map's blocks live in memory. Walk off the end of a real map, through a bad connection, and that pointer keeps advancing into memory that was never a map. It reads those bytes as block numbers anyway. Slide the pointer and watch a clean map slip into Glitch City.
Walk around in it
This is a real Glitch City, not a mock-up: every block below was pulled byte for byte out of an actual Safari-Zone-glitch save state, exactly as the game read it out of bounds. Try to walk through it. The game only lets you stand on its short list of walkable tiles, and Glitch City is mostly everything else, so you bounce off nearly every block and pick your way through a maze that was never meant to be one.
Solid or air
Here is the cruel part. The game has a short list of tiles you are allowed to stand on, grass, floors, a few paths, and everything else is a wall. Glitch City is mostly everything else. Tap any block to see its tiles checked against the real list, and count how few let you through.
Where you stand becomes what you fight
Here is the deepest cut, and it is why Glitch City is more than scenery. The game keeps one pointer, wMapViewVRAMPointer, aimed at the top-left corner of the screen so it knows where to draw as you scroll. Ordinarily that is housekeeping. But trip a glitched map script out here and the game goes hunting for a trainer that does not exist, reads clean past the end of the trainer list, and lands on that very pointer. Its low byte becomes a trainer class. Take one step and you have changed who you fight.
How to get out
If walking will not save you, what will? A few moves force the game to throw away the garbage and load a real map again. Try each one and see which actually works.
Is it dangerous
Glitch City has a scary reputation, and most of it is a misunderstanding. It rarely scrambles your save on its own. The real hazard is simpler and meaner: getting stranded with no way out and no recent save. How bad that is depends only on where you are playing.
From the ROM
One last look under the hood, straight from the cartridge. Every block in the game, real map or Glitch City, is exactly sixteen numbers, each one pointing at an 8 by 8 tile. Slide through the real block set and watch a block break into its tiles.
Where to go next
Glitch City is one of a family of glitches where the game reads memory it should not. Here are its closest relatives.
Go deeper: arbitrary code execution | the Gen 1 battle engine | browse the Glitchhouse.
Go deeper: MissingNo. | Super Glitch | browse the Glitchhouse.