Idris2Doc : IdrisGL.Play

IdrisGL.Play

(source)
Play a game in a window.

Definitions

play : Display->Color->Double->a-> (a->Picture) -> (Eve->a->a) -> (Double->a->a) ->IO ()
  Play a game in a window. Like simulate, but you manage your own input events.

@ window Display mode.
@ bgColor Background color.
@ tpf Time per frame. Providing frames per seconds control. (FPS) = 1/<value> (0: unlimited FPS)
@ w The initial world.
@ w2p A function to convert the world to a picture.
@ ew2w A function to handle input events.
@ tw2w A function to step the world one iteration. It passes the amount of time (seconds) since the window creation.

Visibility: export
playStateT : Display->Color->Double->a->StateTaIOPicture-> (Eve->StateTaIO ()) -> (Double->StateTaIO ()) ->IO ()
  Play a game with mutable state in a window. 
Like simulate, but you manage your own input events.

@ window Display mode.
@ bgColor Background color.
@ tpf Time per frame. Providing frames per seconds control. (FPS) = 1/<value> (0: unlimited FPS)
@ stateType The initial world.
@ w2p Describes how to produce pictures to show.
@ e2w A stateful function that handles input events.
@ t2w A stateful function that handles the amount of time (seconds) since the window creation.

Visibility: export