clojure-gamedev

euccastro 2020-12-03T06:20:35.029200Z

I happened to do something along those lines recently, in LWJGL: https://github.com/euccastro/esterqueira/blob/pong/src/esterqueira/logic.clj

euccastro 2020-12-03T06:21:36.029900Z

code is not exactly pretty, but it avoids atoms or mutable state

euccastro 2020-12-03T06:22:29.030700Z

re: the problem of complicated updates in a deep data structure (IIUC the question) I'd recommend giving specter a try https://github.com/redplanetlabs/specter

👍 1
euccastro 2020-12-03T06:24:24.031200Z

basic structure is inspired by Racket's Big Bang: https://docs.racket-lang.org/teachpack/2htdpuniverse.html?q=big-bang

euccastro 2020-12-03T06:27:08.031800Z

this is the main loop that interfaces that logic with glfw/opengl: https://github.com/euccastro/esterqueira/blob/pong/src/esterqueira/gl.clj#L164