
About
2048 is a sliding-tile puzzle game created by Italian developer Gabriele Cirulli, originally written in JavaScript and released as open-source software in March 2014, with iOS and Android versions following that May. yampa2048 is a Haskell clone of 2048 built as a learning exercise for the Yampa functional reactive programming (FRP) library, using Gloss for rendering. Its game logic and rendering code were adapted from other open-source Haskell/Elm implementations of 2048 rather than written from scratch.
How it differs from the original
The Gloss rendering library used here can't style its font, so the tile numbers look plainer than in the original; the author also notes the Escape key doesn't close the game as intended.
Getting started
Set up and run it with Cabal (cabal sandbox init, cabal install --dependencies-only, cabal run). Play is the same as the original — slide tiles to combine matching numbers and try to survive as long as possible.
History
The project was written by the author as a learning exercise to understand functional reactive programming with the Yampa library, reusing game-logic and rendering code from other developers' existing 2048 implementations rather than building those parts from scratch.
Known limitations
- graphics: Gloss lacks the ability to style the font, so numbers do not look as polished as desired.
Additional notes
- Credits
- Game logic was adapted from Josh Kirklin's 2048-elm implementation, and the Gloss rendering code from Maia Werbos's 2048haskell project.