Postmortem

Overview

This is my Spring Lisp Game Jam 2011 postmortem. I called my entry Henri's Reef.

Project details

The timeline was one week. I had been wanting to do a Poincare Disk demo and I figured this would be a good time to tackle it.

I quickly settled on the idea of drawing a world in a Poincare Disk and having a player's character walk around in this world. However, I didn't know what the player would do in this world.

Another game idea that floats around in my head is something like Uplink. I started thinking about how I could put terminals in the world which the player could try to hack into and use to manipulate the world he was in. It didn't take too long to realize that such a project would not fit into the week I had.

Another influence on my approach was the fact that my last Lisp Game Jam entry was not finished. This time, I was intent on making sure I got to the end with something that was playable and I knew that a week goes pretty quickly.

I also played around with the idea of having keys to pick up and locked doors to open. I drew little bitmaps for the keys and locks but decided in the end that they didn't fit with the world that was getting created.

The central problem of the project was representing some kind of map inside the Poincare Disk. Things I'd seen done before were (1) various projects where a tree data structure is laid out automatically and (2) projects that use group theory to draw symmetric lattices that tile the space. I knew that "straight" lines are represented by circular arcs in the Poincare Disk but I was a little worried about the complexity of dealing with such arcs. So I decided to stick to short line segments. Just like most of the computer graphics world uses small flat triangles to approximate curved surfaces.

So I commited to using short line segments and went about implementing collision detection. The collision detection completely ignores the fact that the map is embedded in a hyperbolic surface and uses good old high school geometry: trigonometry, pythagorean theorem, dot product.

Once I was able to draw my line segments and keep the player from walking through them, I drew a little map and just wandered around it for a while. It was fun to get a "feel" for the space and it really reminded me of the Crochet Coral Reef project that I had seen before. So I decided that the game would be about walking around on a piece of coral. At least, in my head, that's what it was even though it's not communicated that well in the actual game.

The very last thing I did was make the avatar look a little more like a sea slug and have him slide along with the player simply steering him along.

What went right

I really like how the game turned out. It runs a little slow, and the graphics are certainly spartan, but I really enjoy wandering around the world I created.

I decided to move the collision detection and most of the drawing into Javascript instead of Lisp. The game would have been too inefficient if I had kept everything in Lisp so I'm glad I made this decision and it was nice that it was quite easy to separate the performance-critical stuff from the rest. Of course, being a very small project helps.

My focus on getting something playable really helped. There was a critical point where I decided to make the intro, outro, and win-condition before doing anything else. By doing that, I knew that it was just a matter of using the remaining time to fill in details and I could quit at just about any time and still have something playable.

What went wrong

I'm pretty happy with all the decisions I made along the way on this one. I wish the animation ended up smoother and that I could have created a bigger maze, but looking back, I don't see any easy ways to overcome those limitations.

Conclusions

This project was a lot of fun and I'm happy with the outcome. It's great to finally have a demo of the hyperbolic-space ideas that I'd had in my head for a while. I think I had a lot of luck in wandering around the design space and yet eventually settling on something that worked.

The key to the mathematics is here.