Clojure in games?

I just “discovered” Clojure and am, for the first time, feeling “at home” with a language that is not Java. Maybe this is due to my roots in FORTH and being positively inclined to prefix structure.

It seems that there are some interesting “live-coding” aspects that are used as a music-making interface with SuperCollider, which is a big plus in my mind. But I doubt there is a way to package SuperCollider with a Java game.

I’m curious if anyone else here has experience with it, and thoughts about its game-making potential. It sits on the JVM and can integrate with Java pretty readily, it is claimed.

I found a Clojure-gaming.org website that looks rather similar to ours, except it is practically a ghost town. That is not too encouraging.

There is a demo of an Asteroids knock-off that has some nice explosions, but the few primitive games I’ve seen via web demos have really minimal GUIs.

mm I took a quick look at it and then Scala.
I never used either of both for anything more then a few lines of Code, but in the end I think if I start with functional programming I would use Scala.

I played around with it. If you aren’t used to Lisp like languages it can be quite a mind bender to use (which is a good thing). There are some nice constructs like multimethods which can make for some nice code and I like being able to generate arbitrary key words like :ogre and :troll.

The performance is acceptable, worse than scala but better than languages like python or ruby, so if you are writing a game that is not processor intensive, then you shouldn’t be too badly off. I have found the Java integration to be a bit more cumbersome than Scala.

I haven’t used Clojure yet but being involved with Scala I hear about it often. The ability of Clojure to hot-swap even better than Java looks quite alluring.

Scala is working great with lwjgl and I’ve had no trouble with writing code or its performance. I imagine Clojure would fare similarly.

I haven’t tried Clojure, but it’s really simple if you ask me.

If you want some more “mind bending” you could watch this mit lecture series

“structure and interpretation of computer programs”
It uses Scheme, which is similar in syntax to Clojure. Those lectures helped me to better understand many of the basic programming paradigms.

I played with clojure a while ago to do some simple example like programs. Personally I found I preferred it to scala at the time. I sort of stopped as I started to get interested in android programming as clojure did not apparently work that well on it at the time. I believe they are know working on it.

If android support gets good then I could imagine writing some more clojure as it is certainly fun to code in it.

The mit video are a great watch and well worth the 20 hours spent watching it. Abelson and Sussman characters really grew on me.

Is it me or does Sussman look a lot like Jason Alexander? He even talks about George a lot.