Fork me on GitHub
#clojure-gamedev
<
2018-02-21
>
wusticality20:02:43

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

wusticality20:02:49

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

the2bears20:02:15

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

wusticality20:02:26

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

wusticality20:02:04

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

wusticality20:02:21

doing that with 100k things at 60 hz or greater

the2bears20:02:54

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