Fork me on GitHub

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


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


@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.


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


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


doing that with 100k things at 60 hz or greater


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