Skip to content
A video game framework for haskell
Haskell Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
spec
src
.gitignore
ActionKid.cabal Update on dependencies Aug 26, 2015
LICENSE
Makefile Improve Makefile Aug 26, 2015
README.markdown link to video tutorial Oct 22, 2014
SOUND.markdown another fucking audio error. May 6, 2014
TODOS.markdown similar modules + update todos Oct 22, 2014
TROUBLESHOOTING.markdown
getting_sdl_working.markdown

README.markdown

ActionKid

A game framework for Haskell.

Video tutorial: http://vimeo.com/109663514

The goal is to have an easy-to-use game framework for Haskell. For example, here's how you get a player on the screen:

-- create a new player data type
data Player = Player { _pa :: Attributes }
deriveMC ''Player

-- describe what it should look like:
instance Renderable Player where
    render p = image "images/player.png"

Here's how you move your player:

handle (EventKey (SpecialKey KeyLeft) Down _ _)  = player.x -= 10
handle (EventKey (SpecialKey KeyRight) Down _ _) = player.x += 10
handle (EventKey (SpecialKey KeyUp) Down _ _)    = player.y += 10
handle (EventKey (SpecialKey KeyDown) Down _ _)  = player.y -= 10

On OS X

If you are playing on OS X, please disable "automatic GPU switching from system preferences -> energy saver first. Without this, the game may appear frozen.

Similar modules

  • All the hard lifting in this package is done by Gloss. ActionKid provides a lot of convenience functions.
  • gloss-game is a similar module.

Docs

You can’t perform that action at this time.