gore-and-ash-1.1.0.1: Core of FRP game engine called Gore&Ash

Copyright(c) Anton Gushcha, 2015-2016 Oganyan Levon, 2016
LicenseBSD3
Maintainerncrashed@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Game.GoreAndAsh.Core.Session

Description

Utilities for handling time in engine arrows.

Synopsis

Documentation

type GameTime = Timed NominalDiffTime () Source

Current value of simulation time.

type GameSession = Session IO GameTime Source

Session that stores time in diff format The only purpose is to store time while stepping simulation.

data NominalDiffTime :: *

This is a length of time, as measured by UTC. Conversion functions will treat it as seconds. It has a precision of 10^-12 s. It ignores leap-seconds, so it's not necessarily a fixed amount of clock time. For instance, 23:00 UTC + 2 hours of NominalDiffTime = 01:00 UTC (+ 1 day), regardless of whether a leap-second intervened.

newGameSession :: GameSession Source

Creates new empty game session

stepGameSession :: MonadIO m => GameSession -> m (GameTime, GameSession) Source

Generates next value of game session and outputs current simulation time That simulation time should be feeded to game wire and next value of session should be used at next step of simulation.