[reactive] First draft of reactive-tetris

Peter Verswyvelen bugfact at gmail.com
Tue Nov 18 17:43:31 EST 2008

My colleague Thomas Davie was playing with your Tetris game, and it seemed
that it contained a space leak; it was consuming more memory, slowly.
Could it be caused by the top level

testTicks :: Event () testTicks = levelToTicks 1

I'm not sure how Events are implemented in Reactive, but in a classical FRP
setting the "heads" of this top level variable would never get garbage

2008/11/17 Creighton Hogg <wchogg at gmail.com>

> Hey Reactive,
> Since I have no hosting space I'm actually going to include the
> implementation as an attachment all in one file.  It's not very long anyway,
> so it should be alright.
> A few caveats:
> This code is still _really_ ugly, but it does work as far as I've tested
> There is no game over, you need to quit manually
> There is no score or level adjustment yet.  I need to add that when I have
> more time, i.e. after this week
> That being said, my first real reactive program was surprisingly simple
> once I got comfortable with the semantics.  The actual reactive code isn't
> that complicated, but it did take a pretty big shift in thinking from
> writing explicit game loops.
> I've included a good bit of comments so it hopefully it isn't too hard to
> follow, but if there are any questions about why I did something a
> particular way (the answer may be 'I'm dumb') please e-mail me or find me on
> #haskell.
> _______________________________________________
> Reactive mailing list
> Reactive at haskell.org
> http://www.haskell.org/mailman/listinfo/reactive
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/reactive/attachments/20081118/934e3a7c/attachment-0001.htm

More information about the Reactive mailing list