This week, instead of a post on DSELs, I’m going to show what I’ve been working on. It’s my first, real foray into Haskell: a game implementation. Some day soon I hope to make my implementation available on the Haskell libraries repository (Hackage).
Thanks goes to the folk at the Haskell irc channel #haskell who helped me when I got stuck. Special mention goes to Saizan for his everlasting patience.
Edit:
Some more details:
The game is being played by me in single player mode. The other parts shown are WIP. The graphics library used if anyone is interested is Gtk2hs.
Edit 2:
In light of a comment by one of the visitors of the blog (which was also a nagging worry of mine), and some searching on my side I decided to alter the game’s name and certain minor features to prevent copyright problems. I have uploaded a new video which reflects these changes.
Edit 3:
That is sick!
is it implemented using a tetris DSL?
Well no, that is me playing. I haven’t mentioned DSLs so far. But lets say its something I am working on.
keep it up!!
Great! Just one remark: there is no such thing as a mirc channel, it’s an irc channel, and mirc is just one of the software that enables you tu use irc.
Oops you’re right xD Its a bad habit I have from back when I used to use that software! Fixing the post
Hi congratulations !! it looks neat!
Will you share the code ??
Thanks!
Sometime in the future I shall, but right now its something I am working on.
Code shared! http://lambdacolyte.wordpress.com/2010/05/07/4blocks-source-code/
You should be careful about using the name “Tetris”. The Tetris Company is notorious for upholding its trademark on it.
Yes I was afraid of this. I shall remedy this.
I’m glad you did.
You wouldn’t be the first open source or freeware developer to receive nasty cease and desist letters. Anyhow, game looks like it’s coming along very nicely. I love statically typed languages, but the typing in Haskell always gives me headaches. Couldn’t imagine the complexity of the typing in a simple game like this. Kudos!
Honestly, Haskell’s typing was not a problem to me at all when creating this game. If anything it helped me write safer code, and with less debugging time
Here was my take, would be interesting to compare implementation differences.
http://myawesomeblag.blogspot.com/2007/03/opengl-tetris-in-haskell.html
Hi Jim
Checkout the code here: http://lambdacolyte.wordpress.com/2010/05/07/4blocks-source-code/
it is very nice!
thanks