Brian Crick

The Butterfly and the Beanstalk Postmortem: What Went Right

(This got a bit long, so I’m splitting it up into parts.)

This last weekend, I attended my third game jam. It’s a thing where you have a couple of days to make a complete video game, based on a theme that’s not known until the start of the jam.

This jam’s theme was The Butterfly Effect. I ended up with a racer type of thing, without the racing. You can play the version I completed for the jam here… though it’s nearly impossible to win. In my next post I’ll put up a new, more playable version and talk about what went wrong and what I was focusing on fixing post-jam.

what went right

the theme

I was really, really unenthusiastic about the theme when it was announced Friday night. So at first I decided to just do something pretty, where you were a pretty butterfly racing along this pretty, convoluted pipe with pretty, perfectly round trees in your way. Like this Unity contest winner. And… going with the theme of the butterfly effect, your small movements should affect the shape of the level globally… somehow.

Which is what I did for my other two jams. Nothing terribly original or exciting here.

But that — that not caring about the theme, or even my own mechanics — led me to what I think is an interesting mechanic that fit with the theme.

By the time Saturday was halfway over, I had sort of numbly forced myself to implement an unchanging pipe, and you could move along the pipe, and there were trees in the way. And I played several times through this empty, endless experience, each time imagining a different goal for the player, and different complications, and that helped me find an approach to the theme I could get excited about.

I kind of liked not starting with a concrete approach in mind. Instead, I started with a stock mechanic, the pipe racer thing, and that helped me think. And that’s the exact opposite of what I’ve done in my other jams.

the pipe

The game has only the vaguest concept of your position in three dimensional space, or even the fact that you’re traveling on the outside of a convoluted pipe.  As far as the game mechanics are concerned, you’re traveling in a straight line along a straight, two-dimensional track. What I’m doing is storing everything — the player location, the position of the trees, even the points that make up the surface of the pipe — in a simplified coordinate system with the following components:

coordinates

  1. Distance along the pipe.
  2. Height above the pipe.
  3. An angle representing your point’s orientation around the pipe.

I then wrote a single positioning function to translate this coordinate system to the world system, bending everything around an array of points I had that defined the curvature of the pipe in world space. Everything went through this function, so once that was nailed down, it became very easy to place things where they needed to be, relative to the pipe. To create the pipe, I call my function on different combinations of distance and angle, all with a fixed height (the radius of the pipe) and those are the vertices on the final pipe mesh. Every frame, the player’s distance goes up a fixed amount and the angle changes if keys are pressed, and then I call my positioning function to place the player model in the scene. As the player moves through the scene, trees are created with 0 height, a random angle and a random distance and positioned with my function. When trees spin, I change their angle slightly and call the function again.

Nothing here cares that the pipe is twisty. Nothing at all.

the music (sort of)

I’m not thrilled with the music. I spent all of half an hour composing it, and it has more than a little in common with this bit of Doctor Who (at the 1:55 mark ). I consider this a win, because I had the presence of mind to just throw some music up there, and move on. There were more important things to work on.

the graphics

My initial goal was just to make something pretty. I think it’s fair to say I got that. 🙂

I’m especially proud of this tree.

tree

More on how I made that in another post.

the revision

I’m considering the post-jam revision an essential part of this process, which is something I’ve never done before. Rather than simply think and blog about what went wrong, I decided to go ahead and try to make fixes for the most glaring problems, and that has helped me learn more about what I need to work on here.

So that’s it for now. Stay tuned for What Went Wrong, which may be even longer! 😉

Copyright © 2017 Brian Crick.