tgk

Torus pong - a massive multiplayer online game built in a weekend using Clojure and ClojureScript.

Update Ragnar has written up a blog post describing the architecture of our solution. If you’re interested in that part of the project, please find it here. It goes into detail on how core.async and WebSockets and how we used them to coordinate state between clients. It’s a great read, and very much worth your time.

Last weekend saw the first ClojureCup. Here at uSwitch, we teamed up to build a massive multiplayer version of the arcade classic pong using Clojure and ClojureScript. This blog post outlines how we went about it.

If you want to try out the game, you can find it at pong.clojurecup.com. Until Friday October 4 2013, you can vote for our entry here. If you’d like to read the code or try running the project on your own machine, the code is available at github.

Journal

We did quite a lot of planning ahead of the competition. Having built and maintaining quite a lot of Clojure applications at our day-job gave us a pretty good idea what we wanted the server architecture to be like, and how we wanted to deploy our app. Apart from that we spent a couple of sessions discussing how the game engine should work, the general objective of the game, and how communication should be handled across the server and client.

The work we did over the two days was distributed like this:

Status

Doing the project was great fun! Being forced to do all the planning up front is a always a good exercise. It forces you to go into hammock mode and think before typing.

Working with people on something completely different form what we normally do at work was also incredibly gratifying. You get to see some completely different technologies and techniques being used.

Advice

It’s the first time I’ve participated in a hackathon. The following is a mixture of advice we heard before the competition and our own experiences. It all seems to be valid.

Backlog

There were (of course) some things we didn’t get around to get implemented. Here are some of the things we had on our backlog by the end.

Even without the things from the above list, the game is quite playable. If you want to give it a go, you can find it at pong.clojurecup.com. Remember to vote for us here. The source is available at github.



comments powered by Disqus