clojure-gamedev 2025-04-29

Hey folks I did some experiments to evaluate the ergonomics and efficiency of a workflow that utilizes Blender for scene design and ClojureScript for a gamedev. I did the same study with https://github.com/rafaeldelboni/cljs-threejs-rapier and https://github.com/rafaeldelboni/cljs-babylon-havok/. Clearly the code is super different because Babylon has havok integrated in it's core, so you have to write way less boilerplate compared with the threejs version. I hope this helps someone, that as me, is evaluating the developer experience of coding clojure and editing the scene in a external editor and being able to setup the physics. Please be aware the code is super ugly the bare minimum to make the scene works in the both stacks.

👏 8
👏🏼 1

This is so cool, thanks for sharing your work!

❤️ 1

No I used as inspiration for some decisions on how integrate rapier and three, but I'm not sure if I like declaring scenes with a component like structure, but this on me. Maybe rt-fiber + helix or ulx can be a great deal.

I think it would be good for certain types of games. For example if you're procedurally generating a lot of a scene with cljs code it would be great. For integrating with an editor like Blender it's maybe less useful.

makes sense 🙂

if you end up doing a poc with it I would love to see

👍 1

Good job! I highly suggest JS interop: https://github.com/applied-science/js-interop

❤️ 1

Thanks! I did an "extension" adding navmesh to the threejs stack mix and a variation with squint instead of cljs, if you are interested: https://github.com/rafaeldelboni/cljs-threejs-rapier-recast https://github.com/rafaeldelboni/squint-threejs-rapier-recast

👍 1

Have you investigated react-three-fiber at all? It would be cool to have a fully declarative way of expressing 3d scenes in cljs. I should probably test this out.

👍 1