Sunday, March 29, 2009

Falling Blocks - A Tetris clone in Haskell using SDL

Falling Blocks my first Haskell game. It is a Tetris clone that uses SDL.

While asking some questions on IRC, someone asked me if I had put the project up on Hackage. It hadn't really occurred to me before - I thought of Hackage mainly for libraries. But I decided that there could be more examples of using SDL and the Haskell bindings for it.

The code can be found as a darcs repo at:
http://patch-tag.com/publicrepos/fallingblocks

And can be found on Hackage here:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/fallingblocks

Play is simple:
  • Use the left/right arrow keys to move the block horizontally
  • Use the up arrow to rotate the block
  • Use the down arrow to move the block down more quickly
  • Press p to pause/unpause (0.1.4 +)
  • Press q to quit.
Thank you to everyone that helped me with this - especially those that helped me get the packaging working correctly.

A few screenshots:


Finally, a video Don Stewart put up on YouTube. Ignore the errors - those should be fixed now.