free-game-0.9.1: Create graphical applications for free

MaintainerFumiaki Kinsohita <fumiexcel@gmail.com>
Safe HaskellNone

Graphics.UI.FreeGame

Contents

Description

free-game is a library that abstracts and purifies GUI applications with simple interfaces.

Synopsis

Examples

 import Control.Monad
 import Graphics.UI.FreeGame
 main = runGame def $ forever tick

shows a window and does nothing.

for more examples, see https://github.com/fumieval/free-game/tree/master/examples.

type Game = F GUISource

Game is a free monad which describes GUIs. This monad is an instance of Picture2D so you can create it using fromBitmap and can be transformed with translate, scale, rotate, colored.

It is also an instance of Keyboard and Mouse.

You have to call tick at the end of the current frame.

The only way to embody Game as real thing is to apply runGame.

runGame :: GUIParam -> Game a -> IO (Maybe a)Source

Run a Game.

def :: Default a => a

The default value for this type.

Reexports

module Linear