LambdaHack-0.6.2.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Client

Contents

Description

Semantics of responses that are sent to clients.

See https://github.com/LambdaHack/LambdaHack/wiki/Client-server-architecture.

Synopsis

Re-exported from Game.LambdaHack.Client.LoopM

loopCli :: (MonadClientSetup m, MonadClientUI m, MonadAtomic m, MonadClientReadResponse m, MonadClientWriteRequest m) => KeyKind -> Config -> DebugModeCli -> m () Source #

The main game loop for an AI or UI client.

Re-exported from Game.LambdaHack.Client.UI

data KeyKind Source #

Key-command mappings to be used for the UI.

data SessionUI Source #

The information that is used across a client playing session, including many consecutive games in a single session. Some of it is saved, some is reset when a new playing session starts. An important component is a frontend session.

emptySessionUI :: Config -> SessionUI Source #

Initial empty game client state.

data Config Source #

Fully typed contents of the UI config file. This config is a part of a game client.

Instances

Show Config Source # 
Generic Config Source # 

Associated Types

type Rep Config :: * -> * #

Methods

from :: Config -> Rep Config x #

to :: Rep Config x -> Config #

Binary Config Source # 

Methods

put :: Config -> Put #

get :: Get Config #

putList :: [Config] -> Put #

NFData Config Source # 

Methods

rnf :: Config -> () #

type Rep Config Source # 
type Rep Config = D1 * (MetaData "Config" "Game.LambdaHack.Client.UI.Config" "LambdaHack-0.6.2.0-6LvAjp6yuzE4Q9dWwe00a" False) (C1 * (MetaCons "Config" PrefixI True) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configCommands") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * [(KM, CmdTriple)])) ((:*:) * (S1 * (MetaSel (Just Symbol "configHeroNames") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * [(Int, (Text, Text))])) (S1 * (MetaSel (Just Symbol "configVi") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Bool)))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configLaptop") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "configGtkFontFamily") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "configSdlFontFile") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "configSdlTtfSizeAdd") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Int))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configSdlFonSizeAdd") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "configFontSize") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Int))) ((:*:) * (S1 * (MetaSel (Just Symbol "configColorIsBold") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "configHistoryMax") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Int)))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configMaxFps") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "configNoAnim") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "configRunStopMsgs") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "configCmdline") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 * [String])))))))

mkConfig :: COps -> Bool -> IO Config Source #

Read and parse UI config file.