Skip to content
0:00 / 0:00

#pokemon#compression#gameboy

Pokémon Sprite Decompression Explained

Retro Game Mechanics Explained

254K subscribers • 11 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • May be out of date. Uploaded 6 years ago, in an area where tools change fast.

Intermediate. Assumes working knowledge.

361K views6 years ago2 recommendations

Game developmentComputer scienceGame programmingRetro games and consolesAlgorithms

An explanation of how the first-generation Pokémon games compressed and decompressed sprite data to fit on Game Boy cartridges.

How can so many Pokémon sprites fit in such a small game, and how exactly is all that data compressed? It's all explained right here. LINKS Twitter (updates): twitter.com/RetroGameMechEx Patreon (support): patreon.com/rgmechex Discord (discussion): discord.rgmechex.com INLINE LINKS Sprite decompression webapp: rgmechex.com/tech/gen1decompress.html PATRONS Thank you to everyone who supports RGME through Patreon! Anthony Losego, Dan Salvato, F. Murmel, Jonathan Aldrich, Ange Albertini, Avi Drissman, Mike Gerow, Larry Koubiak, Tina Wuest, Owen Christensen, Gynvael , Buddy , Chris Margroff, Brandan Lennox, Nik , Jason Hughes, Diamond Ice, Cypher Signal, Rupix , Gabe S, krivx , Walter Huf, Pixy011 , David Spalding, Acceleration Shark, Rory Kelly, Carl Cassler, Joe Mecca, Michael Greb, Kefen , Heptonion, leftler , Scott Beca, 19day , Michael Dragone, John Losego, Travis , Arthur Kunkle, Gyiyg, Jordan Wright, Christopher Tramel, Alexander Paz, Stephan J Hennion, coon, Alencar Bravo, Node1729, tripper , Nebelwerfer Granitara, Sten , 333Rich333 , Glenn hEADcRASH Sugden NPC, Alex Yancey, David Mazarro, Steven , null , Ryan , Corey Ogburn, Martin Trozell, Garret Kelly, Jake Hickman, Joel Kuhn, Dan Shedd, Sembiance , Xander479, 4F Panda, Max Roncace, David , A Sentient JDAM, Alec Johnson, Brian Henriquez, Travis Nellor, Zach Hugethanks, dishsoap42 , Mikely Whiplash, Yakov , Oxygen Chen, RetroReversing.com, yuriks , Ceres , Jeremiah , jesugtz , Chris Roy, Chris Connett, Mark , Matthew , sapslaj , Jonathan Scott, Xkeeper , Bjoern Hansen, ers35 , Daniel Bernard (ReckedCat), Lukas Kalbertodt, Vier Ladair, Bwangry , iPaq , zephyrin , Kit Spindler, Jeremy Wright, David Johnson, Brandon, Matt Shepard, Felix Freiberger, Sypwn , Niles Rogoff, Kusabi , Reflet , Yann Le Brech, Evan , Eugene Bulkin, Walter Weaver, Gethiox , Articate , Julien Oster, buzzert , Steve Losh, Samuel Stoddard, HattyJetty , Paige ? Hex, Yeero , Cruz Godar, Linh Pham, Noah Greenberg, Nick Rogers, Sean Nelson (audiohacked), Bryce , Andrew Yukhymchak, Sean Bryant, John Gabriel, BazBadger , Kyle , Master Knight DH, Tim Romero, Michael B., Eric Loewenthal, Adrian Haslinger, Proxy , Nolan Varani, Thoscellen , Wii2 , Daniel Robinson, Hans Jorgensen, waielal , Daniel A.A. Pelsmaeker, Aaron, Max Gartung, Nicolas Dohrendorf, Eric Hoppe, Chaz Serir, derHinek, Niels Peyronnel, samfu, Dominic Wehrmann, André Greubel, Anon42 , Urda, Ted Berkowitz, araknofennisti, AA , Joseph Torres, serhef , Daniel, Audio, Patrick Johnston, Rodrigo Monteiro, Punchmaster, Stephen Bank, Thomas Berg, & Crazed Geek!

Why it's here

2 people recommend this

What people say. Recommended as an excellent explanation of retro game compression algorithms.

u/FanofWheelsin r/programming • Recommends

On “Guy does the Pokémon sprite decompression algorithm by hand on a whiteboard [Livestream]”

... and by "guy," I of course mean Retro Game Mechanics Explained, a top tier YouTuber in terms of teaching programming concepts in classic video games. Not to mention: it's a fundraiser: all donations are going towards The Bail Project, highly recommend stopping by :) https://bailproject.org Also, he has a sick video going over the algorithm itself here: [video even if you don't play pokemon, def worth a watch !!

u/Gropahin r/compsci • Recommends

On “How does compression work really?”

Depends. There are different ways of compressing. There are generic ones where they try to do this sort of counting, but there's also ones specifically crafted for a certain purpose (like the pokemon sprite compression). And even for the generic ones there's a lot of different strategies. Some try to find common occurrences and compress that way. Personally, I find stuff like jpeg2000 the most interesting. They transform it to an other domain, and remove details there which makes it more compressible. Some compression transform it using the Fast Fourier Transform to frequencies and filter out the higher frequencies and then revert it to the original domain. While not completely intuitive…

u/DavidJCobbin r/programming • Mentions

On “An Interactive Intro to CRDTs”

A cool primer on the subject. I do have some observations: Part 2 explains (in the "Fixing Timestamps" section) how to mitigate a problem wherein if a single draw operation crosses over the same pixel multiple times or for a duration of multiple frames, the pixel's "timestamp" (more accurately called a "revision number" given how it's been implemented here) can skyrocket. The mitigation is to make it so that a single draw operation tracks what pixels it's modified before, and refuses to modify them again. For collaborative editing, however, I'd expect this to cause a problem when both users are scribbling overtop each other. Suppose Alice touches her finger to the screen, scribbles over a…