The Kilobyte's Gambit is a lovely mashup of a chess engine in 1K of JavaScript, plus awesome CGA retro pixel art. I love it.

Kicked my ass immediately, I’m not good at chess. A friend of mine in college used to say, regarding vegetarianism, that he wouldn’t eat anything that could beat him at chess. I found this worrisome.

It also reminds me of this:

Atari 2600 Video Chess! This was chess in 4K of 6502 assembly language, on a machine with only 128 bytes of RAM that was only really capable of displaying three, maybe six objects per line on the screen, and that only with tricky programming. If you look closely, you’ll see that the chess pieces are drawn on alternating lines to get around this limitation. Apparently it played decent chess.

Before we hand the OG Atari developers the tiny-chess-program crown, though, the author of the 1K JavaScript chess engine has also written a 326-byte chess game for DOS, as well as... a 1K chess cartridge for the Atari 2600. Yes, it flickers a lot, but hey.

So many props given. Two summers ago I wrote an AI checkers game of my own, using the minimax algorithm. It wasn't terribly good at checkers and it sure wasn't 1K of JavaScript. To be fair, it was also readable code.

MORE
3/6 '21 2 Comments
I didn't last long either!

I love 5K and 1K projects and then I cry when I load a webpage that's 6M and the main purpose is to direct you to a different page.
I was just going to say, the varying lineweights were making me twitchy until I realized what they meant. Clever clever.