Sunday, 23 September 2012

Off on a tangent - ClojureScript

Okay, so I left my last post saying I wanted to do a flight simulator.

Well in my usual roundabout way I've been on a journey, I discovered ClojureScript (again, but did something useful with it this time) and attempted to use it in some way.

I also had a bit of a reminiscing moment about Elite, the classic BBC game. I managed to download some .X models for them and wanted to render them using ClojureScript.

The final piece was the incredibly powerful Three.js javascript library, this thing does amazing stuff with 3D graphics either on a HTML5 Canvas or using WebGL.

After a few hours I had a Compojure back end, a ClojureScript UI which showed a spinning Cobra MKIII - screenshot below:

So, my thoughts?

Well, ClojureScript is very nice, but the extra step of compiling down to JS is annoying and slows me down. Also, the syntax is very similar but there are enough differences to mean I can't translate seamlessly between it and real Clojure.

Source is here.