Home

Awesome

Build Status

This is a simple example game for the gloss bindings for Rhine, an asynchronous functional reactive programming library.

Installation

I'm assuming that you have a regular Haskell development environment, on any platform.

git clone https://github.com/turion/sonnendemo
cd sonnendemo

With cabal

You will probably need to install OpenGL development libraries and FreeGLUT. On Debian-like systems, sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev should suffice. On systems with nix, you probably have to install a GHC with haskellPackages.gloss.

cabal build

With stack

You have to have nix installed. stack uses nix in order to automatically install all OpenGL backend packages.

stack build

Play

The game (SonnenModel.hs)

GUI version (MainGloss.hs)

  1. If there is enough energy in the battery (and a little reserve), a green check mark will appear next to the coffee cup. (Otherwise, a red cross will be displayed.) You can then brew a coffee by clicking on the cup.
  2. To drink the coffee, click on the cup once it's full.
  3. Repeat :)
  4. Exit by pressing Escape.

Here is a screenshot:

screenshot

Console version (MainConsole.hs)

All relevant information appears on the console. Brew and drink coffee by pressing Enter.