c19e3dae5f
Memoize the return value of characterVisiblePositions to a new, semi-abstracted "memo" field on the GameState, recalcuclated if the character position ever changes. I'm 90% sure that the perf issues we were encountering were actually caused by characterVisiblePositions getting called once for *every tile* on draw, but this slightly larger change also makes the game perform relatively-usably again. Since this is only recalculated if the character position changes, if we ever get non-transparent entities moving around without the characters influence (maybe something building or knocking down walls?) we'll have an issue there where the vision won't be updated as a result of those changes if they happen while the character is taking a non-moving action - but we can cross that bridge when we come to it. Change-Id: I3fc745ddf0014d6f164f735ad7e5080da779b92a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3185 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
153 lines
2.3 KiB
YAML
153 lines
2.3 KiB
YAML
name: xanthous
|
|
version: 0.1.0.0
|
|
github: "glittershark/xanthous"
|
|
license: GPL-3
|
|
author: "Griffin Smith"
|
|
maintainer: "root@gws.fyi"
|
|
copyright: "2019 Griffin Smith"
|
|
|
|
extra-source-files:
|
|
- README.org
|
|
|
|
synopsis: A WIP TUI RPG
|
|
category: Game
|
|
|
|
description: Please see the README on GitHub at <https://github.com/glittershark/xanthous>
|
|
|
|
dependencies:
|
|
- base
|
|
|
|
- aeson
|
|
- array
|
|
- async
|
|
- QuickCheck
|
|
- quickcheck-text
|
|
- quickcheck-instances
|
|
- brick
|
|
- bifunctors
|
|
- checkers
|
|
- classy-prelude
|
|
- comonad
|
|
- comonad-extras
|
|
- constraints
|
|
- containers
|
|
- criterion
|
|
- data-default
|
|
- deepseq
|
|
- directory
|
|
- fgl
|
|
- fgl-arbitrary
|
|
- file-embed
|
|
- filepath
|
|
- generic-arbitrary
|
|
- generic-lens
|
|
- groups
|
|
- hgeometry
|
|
- hgeometry-combinatorial
|
|
- JuicyPixels
|
|
- lens
|
|
- lifted-async
|
|
- linear
|
|
- megaparsec
|
|
- mmorph
|
|
- monad-control
|
|
- MonadRandom
|
|
- mtl
|
|
- optparse-applicative
|
|
- parallel
|
|
- parser-combinators
|
|
- pointed
|
|
- random
|
|
- random-fu
|
|
- random-extras
|
|
- random-source
|
|
- raw-strings-qq
|
|
- reflection
|
|
- Rasterific
|
|
- splitmix
|
|
- streams
|
|
- stache
|
|
- semigroups
|
|
- semigroupoids
|
|
- tomland
|
|
- transformers
|
|
- text
|
|
- text-zipper
|
|
- vector
|
|
- vty
|
|
- witherable
|
|
- yaml
|
|
- zlib
|
|
|
|
default-extensions:
|
|
- BlockArguments
|
|
- ConstraintKinds
|
|
- DataKinds
|
|
- DeriveAnyClass
|
|
- DeriveGeneric
|
|
- DerivingStrategies
|
|
- DerivingVia
|
|
- FlexibleContexts
|
|
- FlexibleInstances
|
|
- FunctionalDependencies
|
|
- GADTSyntax
|
|
- GeneralizedNewtypeDeriving
|
|
- KindSignatures
|
|
- LambdaCase
|
|
- MultiWayIf
|
|
- NoImplicitPrelude
|
|
- NoStarIsType
|
|
- OverloadedStrings
|
|
- PolyKinds
|
|
- RankNTypes
|
|
- ScopedTypeVariables
|
|
- TupleSections
|
|
- TypeApplications
|
|
- TypeFamilies
|
|
- TypeOperators
|
|
- ViewPatterns
|
|
|
|
ghc-options:
|
|
- -Wall
|
|
|
|
library:
|
|
source-dirs: src
|
|
|
|
executable:
|
|
source-dirs: src
|
|
main: Main.hs
|
|
dependencies:
|
|
- xanthous
|
|
ghc-options:
|
|
- -threaded
|
|
- -rtsopts
|
|
- -with-rtsopts=-N
|
|
- -O2
|
|
|
|
tests:
|
|
test:
|
|
main: Spec.hs
|
|
source-dirs: test
|
|
ghc-options:
|
|
- -threaded
|
|
- -rtsopts
|
|
- -with-rtsopts=-N
|
|
- -O0
|
|
dependencies:
|
|
- xanthous
|
|
- tasty
|
|
- tasty-hunit
|
|
- tasty-quickcheck
|
|
- lens-properties
|
|
|
|
benchmarks:
|
|
benchmark:
|
|
main: Bench.hs
|
|
source-dirs: bench
|
|
ghc-options:
|
|
- -threaded
|
|
- -rtsopts
|
|
- -with-rtsopts=-N
|
|
dependencies:
|
|
- xanthous
|
|
- criterion
|