-- Allows to play a game using RPGEngine. -- Includes all logic and rendering. module RPGEngine ( playRPGEngine ) where import RPGEngine.Config ( bgColor, winDimensions, winOffsets ) import RPGEngine.Render ( initWindow, render, initGame ) import RPGEngine.Input ( handleAllInput ) import Graphics.Gloss ( play ) ---------------------------------------------------------------------- -- This is the game loop. -- It can receive input and update itself. It is rendered by a renderer. playRPGEngine :: String -> Int -> IO() playRPGEngine title fps = do play window bgColor fps initGame render handleAllInput step where window = initWindow title winDimensions winOffsets step _ g = g -- TODO Do something with step? Check health etc.