wusticality 2018-02-21T20:24:58.000269Z

hey folks

wusticality 2018-02-21T20:26:43.000089Z

been considering building a large simulation game and i’m curious how clojure would fare given that data is immutable - recreating the entire game state every frame seems expensive

wusticality 2018-02-21T20:27:49.000474Z

also i’d have to hook into a real renderer like unity, I was considering potentially using something like to communicate with their game engine every frame to buffer rendering commands

the2bears 2018-02-21T20:39:15.000674Z

@iwannaseethelight I think it depends on how big the state is. You don't actually "recreate" it, either. Due to the persistent data structures you only create/edit the parts of the state you need to each frame.

the2bears 2018-02-21T20:39:49.000681Z

One game I did in Clojure:

wusticality 2018-02-21T20:48:26.000579Z

well i’m just saying every modification to a data structure emits a new data structure

wusticality 2018-02-21T20:49:04.000362Z

i’m aware of the data structures they’re using under the hood, but doing a (map #(...) entities) kind of pattern may not be practical for games

wusticality 2018-02-21T20:49:21.000268Z

doing that with 100k things at 60 hz or greater

the2bears 2018-02-21T20:58:54.000262Z

Yeah, 100k is a lot of things. My games would have far less, maybe up to 1k with a screen full of bullets 🙂