FunWorlds/HOpenGL Claus Reinke ------------------- -- functional programming and virtual worlds http://www.cs.kent.ac.uk/~cr3/FunWorlds/ This is a snapshot of my FunWorlds/HOpenGL prototype sources, as of July 2003, now (July 2004..) updated to work with ghc-6.2.1 and the new HOpenGL included with it. The functionality is unchanged since February (just some dead or too experimental branches removed, and a minimal update to get things working with HOpenGL-1.04). This is an undocumented snapshot - only for curious adventurers;-) For general ideas, see the project page and the draft paper and slides from IFL'2002. Please let me know about suggestions, problems, etc. Comments on the language design (not yet finalized) are especially welcome, because that is what is different about FunWorlds, but experience reports or your list of priorities regarding as yet missing graphics functionality will be read with interest as well (graphics functionality is barebones even compared to my earlier VRML-based FunWorlds prototypes, because it is relatively clear what to do there and how, so the research focus has been on other things). General contributions to HOpenGL are also welcome, as they would carry over to FunWorlds/HOpenGL (are there any portable sound APIs? font support via a FTGL binding would be very nice; ..). You'll need ghc and HOpenGL installed (I wouldn't call it testing, but I've tried the included examples on my notebook: win98+cygwin, ghc-6.2.1 with included packages OpenGL and GLUT). The snapshot contains a single small directory tree: $ ls -R funworlds-July2004/ funworlds-July2004/: README current examples funworlds-July2004/current: Behavior.hs FunWorlds.hs Scene.hs funworlds-July2004/examples: Boids.hs Cube.hs Juggle2.hs NLift.hs Towers2.hs obj BouncingBall.hs Flock.hs Lift.hs Planet.hs Tree.hs Chain.hs Juggle.hs Makefile Towers.hs hidir funworlds-July2004/examples/hidir: funworlds-July2004/examples/obj: No docs yet:-(, several small examples:-) and the minimal modules (only 3:-) needed to compile the examples. Assuming unixy tools (e.g., cygwin), you can simply go into the examples directory and type make to compile all examples. Many of them use a simple keyboard interface for rotation and scaling (try xX/yY/zZ for rotation in either direction around those axes, sS for scaling down or up, R to reset the view, to end the demo). Some may have other or additional controls (numbers 0-4 for the lift, u/d for the tree), there isn't much variation or size yet, and some examples are downright boring (Planet.hs is only there for comparison with its equivalent in the HOpenGL redbook_HS examples). As usual: no warranty for nothing, have fun if you dare!-)