Geometry, Loop

Think outside the tesseract… what’s a tesseract?

My new game, loop, is almost here! Loop features an interesting mathematical concept called the “tesseract,” and today I wanted to share what that’s all about. It’s math, but certainly not the most technical post I’ve written on this blog.

A tesseract is simply a special name for a 4-dimensional cube. Just as when you take a square and “pull” it upward to produce a cube, you could “pull” a cube along an axis that we can’t see to produce a tesseract. But a problem arises when you try to visualize these shapes. When you look at a cube top-down, all you might see is a square, right? Similarly, if you were to look at a tesseract in the 3-D world, all you would see was a cube. There has to be some way to project the rest of the tesseract into the world we can see.

Carl Sagan has a great video explaining how to understand shapes in another dimension. Essentially the crux of the matter is that although you can’t see the tesseract in its full 4-dimensional glory, you can calculate what its “shadow” on the 3-dimensional world would look like.

tesseract projection
A simple projection of the tesseract into 3-D space (and a lot of fun to calculate!).

As you can see, the tesseract looks like two nested, connected cubes. Why is one cube smaller than the other? Well, it appears smaller because the other end of the tesseract is far away on the axis we can’t see—just as an object farther away in a picture appears smaller. And in animations of a tesseract rotating, which you can see briefly in the preview video for loop, the cubes appear to change size with respect to each other as the “ends” of the tesseract move closer to and farther from the camera.

Of course, loop is a video game, not a math lesson—so the mathematical rules of the tesseract may be a bit warped as they make their way into the animations. After all, a tesseract is simply a cubelike shape, nothing more. But in the game, the tesseract is more than a geometric object; it is a vehicle for transportation across the levels. That idea was impressed upon me by Madeleine L’Engle’s classic 1963 novel A Wrinkle in Time, with which I have been fascinated since elementary school.

Scannable Document on Aug 10, 2016, 4_32_29 PM
The diagram from A Wrinkle in Time explaining travel through the tesseract.

According to A Wrinkle in Time, the tesseract is actually a 5-dimensional entity that allows you to jump across the fourth dimension, which is often said to be time. Based on the conventional definition of a tesseract above, L’Engle seems to have been taking some liberties with the math—but of course, that’s the nature of science fiction.

Regardless of its factual blips, the notion of using another dimension to travel through space is inspiring. The tesseract in loop draws from that idea, which is especially appropriate since (spoiler alert) the Institute within the game exists in another dimension. As an analogy, think of a multistory building: at any given point, you only know the floor you’re on—the x-axis. But when you get on an elevator, that transports you across the y-axis, taking you to another floor. The tesseract is basically a multidimensional elevator.

elevator diagram
The tesseract transports you through another dimension, just like an elevator.

Loop has two kinds of tesseracts—strictly speaking, 4-dimensional polytopes—that you’ll see in the various levels. One is the hypercube, which is mathematically classified as a tesseract. The other is a 16-cell, or hexadecachoron if you’re feeling pretentious; it’s like an octahedron translated into four dimensions. To read more about the different types of 4-D shapes (regular 4-polytopes), check out Wikipedia if you dare.

I find these multidimensional ideas really interesting! Let me know what you think in the comments.

Advertisements
Apps, Loop

loop: recording an original, acoustic soundtrack

Developing my new puzzle game, loop, was much more intricate than any of my other apps. The coding, as it turned out, was much easier; there were much fewer algorithms, iCloud document shuffling strategies, or gnarly PDF functions to work with. Rather, I soon realized that the challenge facing me was an artistic one. I had to create an audiovisual experience unique to my game—while working within the bounds of what one person can do over the course of one summer. I guess that would be something like, say, trying to build a piece of furniture by yourself. You could be perfectly good at designing, sawing, and painting, and still come out with a table that screams “I made this myself.”

And one of the attitudes I had to challenge when developing Loop was precisely that: at first I was limiting myself to things I could only do solo. For most game soundtracks, you could probably do it by yourself if you were writing electronic music. Just buy Logic or some comparable DAW and synthesize away. (Not that it doesn’t take talent and effort, but it’s possible.)

On the other hand, from the beginning of Loop’s life in development I knew that I wanted its soundtrack to be acoustic. I wanted to use my years of learning piano to produce something that would touch the ears of hundreds, hopefully thousands of people. I had a Samson Q2U microphone at home, and I thought, Why don’t I get my friend Patrick to play the violin, and record the whole soundtrack at my house?

There are several reasons why that approach doesn’t work, and as soon as I started the real recording I knew why:

  1. The Samson Q2U microphone is not at all geared toward piano recording, and one microphone cannot possibly be enough for both a piano and a violin.
  2. Home acoustics are really bad.
  3. I wouldn’t be able to manage a DAW and record myself and Patrick simultaneously.
  4. The cost of buying Logic would be comparable to hiring an audio engineer.

All of these reasons added up in such a way that the logical way to approach this soundtrack would be to get a professional audio engineer to set up and manage the recording. And wow, what a difference it made. Check out the (improvised) soundtrack for Loop’s main menu

We had seven mics trained on us while we recorded this soundtrack. (To think that I would have gone ahead with one on the cheap…) The piano was the hardest to get right; we ended up putting two cardioid mics under its belly and two pointing into the strings from a few inches outside. The underside mics give the sound warmth, and the upper ones lend it clarity… Of course, the fact that we used a 7-foot Steinway in the recital hall at Capital University doesn’t hurt the sound quality either.

After all the recording was finished, I went back and added strings from the Sonatina Symphony Orchestra sample library, as well as a few soundscape synths to add noise in the background. (You can hear those strings in the app preview video I released last week.) For this, GarageBand was perfectly sufficient. Once you have good recordings, GarageBand is surprisingly effective at the nitty-gritty of putting them together.

So I can’t say it’s a fully acoustic soundtrack, but with the help of Patrick McBride and Chad Loughrige, the awesome recording engineer at Capital, I was able to create a sound to which most iOS games can’t come close. It’s the sound of real people playing real instruments, and that creates a vibe that simply can’t be substituted.

Loop is coming soon to the App Store! I’d love to hear your comments and experiences about video game soundtracks.

Apps, Loop

A new puzzle game for iOS: “loop”

It’s the summer before I head off to MIT, and of course I couldn’t sit around and do nothing. I dabbled for a while in creating virtual reality animations for Google Cardboard (a teapot that rings like a phone was as far as I got), and I even thought for a while about building my own OS. 

But around a month ago, I came across an idea that I couldn’t put down. It was a concept for a puzzle game, something that had been brewing in the back of my mind ever since I made my first app, My Grapher, back in 2011. 

It took being freed of school, really, to become capable of working on this idea! Because game development requires so many different kinds of art, a daunting challenge for a solo developer. From coding to story development to art design to music composition, I knew I would be on my own for the whole gamut. What I didn’t realize was just how time-intensive the whole process would be.

Well, a month of solid work later, I’m happy to tell you that the product of my efforts will be available soon on the App Store. It’s called “loop : a game of rotation,” and it centers on a one-eyed robot who is captured by a mysterious Institute. You have to rotate Loop into the tesseract (inspired by Madeleine L’Engle, of course) through the clever use of energy pods.

Here’s a video preview, featuring a snippet of the soundtrack I composed and performed alongside my friend Patrick McBride on violin:

I’ll be keeping you posted over the next week or so, as the game gets closer to its release. Reactions, suggestions? Please comment below!