[Haskell-cafe] The Yampa Arcade: source code available?

Thomas Hartman thomas.hartman at db.com
Tue Nov 20 11:47:46 EST 2007

I was able to compile and play space invaders on linux. 

Hours of fun for the whole family :)


Peter Verswyvelen <bf3 at telenet.be> 
Sent by: haskell-cafe-bounces at haskell.org
11/20/2007 06:46 AM
Please respond to
bf3 at telenet.be

Don Stewart <dons at galois.com>
Haskell-Cafe <haskell-cafe at haskell.org>
Re: [Haskell-cafe] The Yampa Arcade: source code available?

Thanks for the feedback. Unfortunatly the Space Invaders game uses HGL, 
which is not supported on Windows anymore. Is it supported on Linux?

Frag does compile and run on Windows using GHC 6.6.1, so that might be a 
better starting point.

What is the current consensus regarding (A)FRP? Is it a dead end? Are 
approaches like Modelica better suited for the job?

>From the point of view of a veteran assembly/C++ game hacker like myself, 
it is funny to see that the same problems popup when doing "reactive 
programming" in a pure language like Haskell or an imperative language 
like C++... Recursive dependencies are problematic, be it with signals in 
FRP or with objects in C++. In videogames using an imperative language, 
this is often solved by just adding a global "single frame" delay between 
what is read and what is written. Ugly, but works in many cases. Or a 
third object is introduced that breaks the recursive dependency between 
the two problematic objects. If I'm correct, when switching from FRP to 
AFRP signals (type Signal a = Time -> a) are no first class values 
anymore, only signal functions (type SF a b = Signal a -> Signal b) are 
first class. Furthermore the handling of recursive dependencies/feedback 
is done solely in a loop arrow. 

I must say it is frustratring. I finally got to understand FRP from the 
SOE book, only to find out that it is not really the way to go ;-) Now I'm 
trying to grasp AFRP. It is incredibly interesting stuff, but for a 
not-so-abstract-thinking-average programmer like me, it is not an obvious 
task. Maybe *using* AFRP is easier than understanding the inner details...

Maybe it would be a good idea for the community if someone (maybe me, if I 
find the time ;-) to write a very very simple game using AFRP and GHC 
6.8.1? Even simpler than the Space Invaders game (which does not work 
anymore anyway), but which does show dynamic collections and switching? 
Maybe like Andrew Coppin mentioned, a very simple Tetris clone? Of course, 
this is not legal, Tetris is copyrighted, but maybe for tutorial purposes 
it can be allowed :)

Don Stewart wrote: 
On 19.11.2007, at 19:54, Peter Verswyvelen wrote:
I can find the paper, but is the source code for that Space 
Invaders alike game also available somewhere?
it's included here: http://haskell.org/yampa/afrp-0.4-src.tgz

btw, does anybody know what's the current state of affairs with yampa/ 
afrp? is the framework still developed further?

Can we get this uploaded to hackage? 

-- Don
Haskell-Cafe mailing list
Haskell-Cafe at haskell.org

Haskell-Cafe mailing list
Haskell-Cafe at haskell.org


This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071120/780183fd/attachment-0001.htm

More information about the Haskell-Cafe mailing list