The helm package

[Tags: library, mit]

A functionally reactive game engine, with headgear to protect you from the headache of game development provided.

[Skip to ReadMe]


Versions0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.4, 0.5.0, 0.6.0, 0.6.1, 0.7.0, 0.7.1 (info)
Change logNone available
Dependenciesbase (==4.*), cairo (>=0.12.4 && <1), containers (>= && <1), elerea (>= && <3), filepath (>= && <2), SDL (>=0.6.4 && <1) [details]
Copyright(c) 2013, Zack Corr
AuthorZack Corr
MaintainerZack Corr <>
CategoryGame Engine
Home page
Bug tracker
Source repositoryhead: git clone git://
UploadedSat Jul 13 01:39:50 UTC 2013 by ZackCorr
Downloads2670 total (23 in last 30 days)
1 []
StatusDocs uploaded by user
Build status unknown [no reports yet]




Maintainers' corner

For package maintainers and hackage trustees

Readme for helm-0.2.0



Helm is a functionally reactive game engine written in Haskell and built around the Elerea FRP framework. Helm is heavily inspired by the Elm programming language (especially the API). All rendering is done through a vector-graphics based API. At the core, Helm is built on SDL and the Cairo vector graphics library. This may change to a more robust setup in the future, such as a lightweight homebrewed renderer built on OpenGL. But for now, Cairo performs pretty well.

In Helm, every piece of input that can be gathered from a user (or the operating system) is hidden behind a signal. For those unfamiliar with FRP, signals are essentially a value that changes over time. This sort of architecture used for a game allows for pretty simplistic (and in my opinion, artistic) code.


Future Work


The following examples is the barebones of a game. It shows how to create an accumulated state that depends on the values sampled from signals (e.g. mouse input and such). You should see a white square on the screen and pressing the arrow keys allows you to move it.

{-# LANGUAGE RecordWildCards #-}

import Control.Applicative
import FRP.Elerea.Simple
import FRP.Helm
import qualified FRP.Helm.Keyboard as Keyboard
import qualified FRP.Helm.Window as Window

data State = State { mx :: Double, my :: Double }

step :: (Int, Int) -> State -> State
step (dx, dy) state = state { mx = (realToFrac dx) + mx state, my = (realToFrac dy) + my state }

render :: (Int, Int) -> State -> Element
render (w, h) (State { .. }) = collage w h [move (mx, my) $ filled white $ square 100]

main :: IO ()
main = run $ do
  dims <- Window.dimensions
  arrows <- Keyboard.arrows
  stepper <- transfer (State { mx = 0, my = 100 }) step arrows

  return $ render <$> dims <*> stepper

Installing and Building

Helm requires GHC 7.6 (Elerea doesn't work with older versions due to a compiler bug). To install the latest (stable) version from the Hackage repository, use:

cabal install helm

Alternatively to get the latest development version, you can clone this repository and then run:

cabal install

You may need to jump a few hoops to install the Cairo bindings (which are a dependency), which unfortunately is out of my hands.


Helm is licensed under the MIT license. See the LICENSE file for more details.