-------------------------------------------------------------------------------- -- | -- Module : Terminal.Game -- Copyright : © 2017-2019 Francesco Ariis -- License : GPLv3 (see LICENSE file) -- -- Maintainer : Francesco Ariis -- Stability : provisional -- Portability : portable -- -- Machinery and utilities for 2D terminal games. -- -- Before continuing, __please read this__: to use @ansi-terminal-game@, -- you need to compile your programs with @-threaded@; if you do not do -- this the program will crash at start-up. Just add: -- -- @ -- ghc-options: -threaded -- @ -- -- in your @.cabal@ file and you will be fine! -- -------------------------------------------------------------------------------- -- Basic col-on-black ASCII terminal, operations. -- Only module to be imported. -- todo add docs [release] module Terminal.Game ( -- * Game Loop MonadGameIO, FPS, runGame, Event(..), -- * Plane Plane, Coords, Row, Column, Width, Height, stringPlane, stringPlaneTrans, blankPlane, addVitrum, pastePlane, planeSize, paperPlane, -- * Draw Draw, (%), (#), (&), mergePlanes, cell, box, textBox, bold, invert, -- * Animations Animation, Loop(..), creaAni, tick, reset, getFrames, -- * Timers Timed, ExpBehaviour(..), creaTimer, creaBoolTimer, fetchFrame, isExpired, -- * Utils -- screenSize ) where import Terminal.Game.Layer.Imperative import Terminal.Game.Layer.Object import Terminal.Game.Layer.Object.Display () import Terminal.Game.Plane import Terminal.Game.Draw import Terminal.Game.Animation