User:JohannesAhlmann/WIP/YampaTutorial

From HaskellWiki
< User:JohannesAhlmann
Revision as of 02:45, 11 March 2006 by JohannesAhlmann (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

yampa/afrp tutorial

the intent of this tutorial is to make writing your own little games and applications using yampa and opengl easier. in the hope that soon all kinds of cool haskell-based games will result from this.

links:

#yampa arcade
#yampa/afrp papers
#frag
#hopengl tutorial

you should probably read the yampa arcade paper and the original yampa paper first, because i will not go into the basics of AFRP in all detail, but rather give step-by-step instruction how i built some simple games using it; like pong, tetris and a simple jump'n'run game.

combining AFRP with opengl is a little painful because at some point both libraries want to have a controlling main loop and so one of them has to be threaded through the other's loop. i decided to use the opengl loop in order not to lose any input events and keep a steady frame rate, but i guess the other way round might also be feasible.

if the opengl-stuff weren't so relatively ugly, i would be glad to explain all of it, but as i'd really like to put the focus on applications, i will just take a little (naive) <a href="">framework</a> for granted.

getting used to the continuous-time aspect of yampa is a little hard initially, as well as wrapping your head around dynamic collections of signal transformers. but testing your game objects in isolation _with_ user input is quite a nice bonus and allows for a very nice development approach of one object at a time.