spice-0.3.2.1: An FRP-based game engine written in Haskell.

Safe HaskellNone
LanguageHaskell2010

FRP.Spice

Description

This module re-exports some other modules in the spice library so that you needn't import all of them explicitly.

Synopsis

Documentation

data WindowConfig Source

A datatype to configure the window settings when creating an OpenGL context using startEngine in the engine.

defaultWindowConfig :: WindowConfig Source

The default for WindowConfig

getWindowWidth      = 640
getWindowHeight     = 480
getWindowFullscreen = False
getWindowResizeable = False
getWindowTitle      = "Spice Application"

startEngine :: Game a => WindowConfig -> a -> IO () Source

Starting the spice engine with the parameters prescribed in the WindowConfig. It updates and renders the Game automatically so all you need to to is set up the WindowConfig and make a datatype with an instance of Game.

data Input Source

A container for all of the states themselves. It is used as a Signal Input in the InputContainer (which is necessary to use it within Elerea's FRP network).

type DeltaTime = Float Source

A synonym to make the update function more self-documenting.

class Game a where Source

The class which is to be used in the startEngine function. update provides the API to update on every tick (purely), an render provides the API to render every frame.

Methods

update :: DeltaTime -> Input -> a -> a Source

render :: a -> Scene Source