POKEGB: a gameboy emulator that only plays Pokémon blue

submited by
Style Pass
2021-06-04 19:00:07

POKEGB: A gameboy emulator that only plays Pokémon Blue, in 62 lines of c++. source: https://t.co/AGt7RUTr9H pic.twitter.com/o0BUUmzNOt

In the video, I show some source code that looks like 3 pokéballs, compile it with gcc, and run it to play Pokémon Blue. The game is controllable, but has no sound. It renders the graphics w/ 12 colors (shades of red and blue). I choose BLUE as the name for our hero, and JERK as the name of his rival. The video ends when Professor Oak stops me from walking into the tall grass.

But first, let's talk a little about some statistics. The final version in that tweet is actually 68 lines of code (I tweeted the wrong number!), each line less than 150 characters long, for a total of 9956 bytes. If you ignore whitespace and comments, it comes to 4720 bytes. That's too large for the International Obfuscated C Code Contest, but pretty close.

Prior to formatting the source code to look like pokéballs, the source was 188 lines and a total of 7786 bytes, with 5954 bytes of non-whitespace source.

Leave a Comment