Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Game programming in Haskell

Name: Anonymous 2009-12-27 23:05

All right /prog/, is there any comprehensive or relatively good tutorial for game programming in Haskell? Or at least some pointers about how to tackle the whole thing from a functional perspective? I'm particularly baffled at how to save game state, some say to use State monads while others say IORefs or reactive programming.

Name: Anonymous 2009-12-27 23:51

Use IORefs in State monads. Actually, use a StateT IO monad with IORefs as the state, if you expect to be doing IO which you probably do. If you plan to use threading, use MVars instead of IORefs.

You can also save game state by using read and show on the state variable.

Name: Anonymous 2009-12-28 0:37

Whenever I study a new language, I clone the usual programmer tutorial games: Tetris, Frogger and Pacman. I downloaded some games from http://www.haskell.org/haskellwiki/Applications_and_libraries/Games and studied them. http://prog21.dadgum.com/36.html

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List