ANN: Dungeons of Wor - a largish FRP example and a fun game, all in one!

Hello all, I just uploaded the first public version of Dungeons of Wor [1], a homage to the renowned three-decade-old arcade game, Wizard of Wor. While it makes a fine time killer if you have a few minutes to spare, it might be of special interest to the lost souls who are trying to figure out FRP. The game was programmed using the Simple version of the experimental branch of Elerea [2], which provides first-class discrete streams to describe time-varying quantities, and the main game logic is described as a composition of streams instead of a world state transformer. Developing in this manner was an interesting experience, and I'll write about it in more detail over the weekend. All the best, Gergely [1] http://hackage.haskell.org/package/dow [2] http://hackage.haskell.org/packages/archive/elerea/1.2.3/doc/html/FRP-Elerea... -- http://www.fastmail.fm - The professional email service

1) This is missing the obligatory youtube video.
2) AWESOME! :)
thomas.
2010/2/11 Patai Gergely
Hello all,
I just uploaded the first public version of Dungeons of Wor [1], a homage to the renowned three-decade-old arcade game, Wizard of Wor. While it makes a fine time killer if you have a few minutes to spare, it might be of special interest to the lost souls who are trying to figure out FRP. The game was programmed using the Simple version of the experimental branch of Elerea [2], which provides first-class discrete streams to describe time-varying quantities, and the main game logic is described as a composition of streams instead of a world state transformer. Developing in this manner was an interesting experience, and I'll write about it in more detail over the weekend.
All the best,
Gergely
[1] http://hackage.haskell.org/package/dow [2] http://hackage.haskell.org/packages/archive/elerea/1.2.3/doc/html/FRP-Elerea...
-- http://www.fastmail.fm - The professional email service
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

1) This is missing the obligatory youtube video. That's usually handled by dons. ;)
Gergely -- http://www.fastmail.fm - Email service worth paying for. Try it for free

Exciting! But on a mac, I can't get the window to become focussed or accept input. Tips ? I don't have a Mac, but I heard that GLFW is not without problems there, so maybe it's the culprit this time too. Do other GLFW apps work on your machine?
Gergely -- http://www.fastmail.fm - IMAP accessible web-mail

I tried it, but after briefly displaying a window, the program terminates with the message: dow: user error (unknown OpenGL extension entry glTexParameteri, check for OpenGL 3.1) I just tried it under XP, using an unaltered Haskell Platform 2009.2.0.1 (GHC 6.10.3), and it compiled and worked out of the box. I got some other error reports too (about segfaults under Linux), but I can't reproduce any of them.
Gergely -- http://www.fastmail.fm - Access your email from home and the web

Seems like today FRP is the last word in game programming with Haskell. Do you know something that could be a good tutorial, or at least introduction to FRP ? Something that could somewhat help me learn the ropes, 'cause I'm afraid if I dive directly into your code I'm gonna be lost. I don't think there's any material on FRP that could be considered a general tutorial, because there are many flavours with smaller and bigger differences, and no-one really seems to know how to program in this manner beyond toy examples. So, for the time being, I'd probably start with the original Fran paper [1], which is quite accessible in my opinion, and even though some of the details are obsolete, it explains the basics reasonably well. The Yampa Arcade [2] is probably the best introduction to the arrow-based approach (AFRP). The new Reactive paper [3] is not beginner friendly, but if you already grokked Fran, it shouldn't be too hard to follow, and it describes a way to design an applicative style reactive library with a much cleaner interface than that of Fran.
Gergely [1] http://conal.net/papers/icfp97/ [2] http://www.haskell.org/yale/papers/haskell-workshop03/index.html [3] http://conal.net/papers/push-pull-frp/ -- http://www.fastmail.fm - A fast, anti-spam email service.

Exciting! But on a mac, I can't get the window to become focussed or accept input. Tips ?

On Feb 12, 4:22 am, Simon Michael
Exciting! But on a mac, I can't get the window to become focussed or accept input. Tips ?
Tips: $ cabal install mkbndl $ cd ~/.cabal/bin $ mkbndl dow $ open Dow.app Ok, but you need to click the right control key to select stuff on the menu, and you probably only have a left control key, so: $ cd $ tar xvzf ~/.cabal/packages/hackage.haskell.org/dow/0.1.0/ dow-0.1.0.tar.gz $ cd dow-0.1.0/src $ head -n 86 Main.hs > tmp $ echo " kt1 <- getKey ' '" >> tmp $ tail -n 7 Main.hs >> tmp $ cp tmp Main.hs $ cd .. $ cabal install $ cd ~/.cabal/bin $ mkbndl -f dow $ open Dow.app
_______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe

On Thu, 11 Feb 2010 09:35:35 +0100, Patai Gergely
I just uploaded the first public version of Dungeons of Wor [1], a
I tried it, but after briefly displaying a window, the program terminates with the message: dow: user error (unknown OpenGL extension entry glTexParameteri, check for OpenGL 3.1) I suppose the program needs a newer version than is supplied with Windows (opengl.org states that Microsoft always includes an old version of OpenGL [1]) Does anybody know how to deal with this? Regards, Henk-Jan van Tuyl [1] http://www.opengl.org/wiki/Getting_started#OpenGL_2.0.2B_and_extensions -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html --

On Sat, Feb 13, 2010 at 09:49:53PM +0100, Henk-Jan van Tuyl wrote:
I tried it, but after briefly displaying a window, the program terminates with the message: dow: user error (unknown OpenGL extension entry glTexParameteri, check for OpenGL 3.1)
I suppose the program needs a newer version than is supplied with Windows (opengl.org states that Microsoft always includes an old version of OpenGL [1]) Does anybody know how to deal with this?
Just a thought: maybe it is something else. That function appears to exist since Windows 95 according msdn[1] and OpenGL 1.1[2]. [1] http://msdn.microsoft.com/en-us/library/dd368641(VS.85).aspx [2] http://www.talisman.org/opengl-1.1/Reference/glTexParameter.html HTH, -- Felipe.

Seems like today FRP is the last word in game programming with Haskell. Do you know something that could be a good tutorial, or at least introduction to FRP ? Something that could somewhat help me learn the ropes, 'cause I'm afraid if I dive directly into your code I'm gonna be lost. Good job, by the way. Yves Parès Felipe Lessa wrote:
On Sat, Feb 13, 2010 at 09:49:53PM +0100, Henk-Jan van Tuyl wrote:
I tried it, but after briefly displaying a window, the program terminates with the message: dow: user error (unknown OpenGL extension entry glTexParameteri, check for OpenGL 3.1)
I suppose the program needs a newer version than is supplied with Windows (opengl.org states that Microsoft always includes an old version of OpenGL [1]) Does anybody know how to deal with this?
Just a thought: maybe it is something else. That function appears to exist since Windows 95 according msdn[1] and OpenGL 1.1[2].
[1] http://msdn.microsoft.com/en-us/library/dd368641(VS.85).aspx [2] http://www.talisman.org/opengl-1.1/Reference/glTexParameter.html
HTH,
-- Felipe. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- View this message in context: http://old.nabble.com/ANN%3A-Dungeons-of-Wor---a-largish-FRP-example-and-a-f... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
participants (7)
-
Felipe Lessa
-
Henk-Jan van Tuyl
-
Limestraël
-
Patai Gergely
-
Simon Michael
-
Thomas Hartman
-
yairchu@gmail.com