free-game-1.0.1: Create games for free

MaintainerFumiaki Kinoshita <>
Safe HaskellNone







tick :: (Monad f, MonadFree f m) => m ()Source

Deprecated: use delay or foreverFrame instead

Delimit the computation to yield a frame.

foreverTick :: (Monad f, MonadFree f m) => m a -> m anySource

An infinite loop that run tick every frame after the given action.

foreverFrame :: (Monad f, Monad m, MonadTrans t, MonadFree f (t m)) => m a -> t m anySource

foreverFrame :: Frame a -> Game any

untick :: (Functor f, MonadFree f m) => IterT (F f) a -> m (Either (IterT (F f) a) a)Source

Extract the next frame of the action.

untickInfinite :: (Functor f, MonadFree f m) => IterT (F f) Void -> m (IterT (F f) Void)Source

An infinite version of untick.


randomness :: (Random r, FromFinalizer m) => (r, r) -> m rSource

Get a given range of value.


degrees :: Floating a => a -> aSource

Convert radians to degrees.

radians :: Floating a => a -> aSource

Convert degrees to radians.

unitV2 :: Floating a => a -> V2 aSource

An unit vector with the specified angle.

angleV2 :: RealFloat a => V2 a -> aSource

An angle of the given vector.


loadPictureFromFile :: (Picture2D p, FromFinalizer m) => FilePath -> m (p ())Source

Create a Picture from the given file.

loadBitmaps :: FilePath -> Q [Dec]Source

Load and define all pictures in the specified directory.

loadBitmapsWith :: ExpQ -> FilePath -> Q [Dec]Source

The type of the given Name must be FilePath -> IO FilePath


keySpecial :: Keyboard f => Key -> f BoolSource

Deprecated: use keyPress instead