← Projects · 2026-07-07

2048

The classic tile-merging puzzle game, rebuilt with a terminal aesthetic. Dark background, amber tiles, green on victory.

Live site2048.games.goonk.se → Repoexplewd/2048 →

Case study: Case study: 2048

Highlights

  • Pure TypeScript + Vite — no framework, no dependencies beyond the build tool
  • Direction normalization: all moves reduce to slide-left via transpose and flip operations
  • Tile identity tracking via DOM Map — elements persist across moves, position animated with CSS transforms
  • Tile colour ramp from grey (2) through amber and gold to terminal green at 2048
  • Keyboard (arrows + WASD) and touch swipe input
  • Best score persisted in localStorage

A 2048 clone built for the terminal aesthetic — same visual language as rack, same philosophy: vanilla TypeScript, static build, no framework.