Performance improvements, combine cap and geometry buffer

This commit is contained in:
2021-09-18 19:48:35 +01:00
parent 80aa67015c
commit c605ac74ff
8 changed files with 48 additions and 20 deletions
+2 -1
View File
@@ -9,7 +9,8 @@ import Dodge.Base.Window
import qualified Data.IntMap as IM
worldShape :: World -> Shape
worldShape w = mconcat (map (crShape w) (IM.elems $ IM.filter crIsClose (_creatures w)))
worldShape w = _foregroundShape w
<> mconcat (map (crShape w) (IM.elems $ IM.filter crIsClose (_creatures w)))
where
crIsClose cr = dist (_crPos cr) camCen < winSize
winSize = 30 + max (getWindowX w) (getWindowY w)