Now Open Source: Hamlet: The Movie: The Game

I've decided to go through all my old software projects, especially my games, and open source any of them that I've completed but haven't already open sourced, and in the process, write a little about the project. The first project I'm going to open source is Hamlet: The Movie: The Game.

If you don't remember Hamlet: The Movie: The Game, here's the post about its release on this very blog, almost two years ago. In short, it was a guitar hero-style rhythm game I made for a senior year English project in High School.

First off, here's the source code on GitHub:

Background

This project was created for an assignment in my senior year English class while we were reading Hamlet. The assignment was to create an "interpretation" of the classic "To be, or not to be" soliloquy.

I don't know how I thought of making a video game. My go-to on these sorts of projects was usually a video, because they're fun to make. But this wasn't a team project, so there would be some difficulty in creating a video I was happy with. Because of that, somehow, I came up with making a game.

I also know that a rhythm game wasn't my first idea. I don't know what my first idea was, but I know it was far more complicated than this game is. I remember driving home from school one day, trying to think of what my game could be about (because I don't think I had a solid idea still), and rhythm game just popped into my head. I thought that was a really funny idea, so I ran with it.

Humorous ideas are usually good ideas. The main reason, in my opinion, is that it's easier to present someone something humorous. It's easier to be more confident in how it's going to be received. It's sort of like lampshade hanging the criticism of your game, as long as you do it right. Makes it less embarrassing to show people. A side effect of humor - which is pretty useful for school projects - is also that it helps people overlook flaws in your game. Humor just has a way of making bad things look presentable.

Development

Even after settling on a rhythm game, I know that this result still wasn't I originally had planned. I don't remember what it was that I had planned, though I do know - looking at the project - that it for some reason involved lip sync. I don't know how that was going to come into play.

I did know early on that I was going to sync it up to a eurobeat song, because I spent a while listening to those hour long eurobeat mixes on YouTube. The plan was originally to create my own original song for this game, but I quickly realized that I wouldn't be able to learn to make eurobeat music in a matter of weeks. So I looked up some eurobeat and found "Samurai" by FCF, which I thought would work pretty well.

I originally wanted to use the words from the Kenneth Branagh version of Hamlet, but I wasn't able to - I think there was too much noise, or it wasn't rhythmically suited to eurobeat, or something. So I went with the Mel Gibson version instead. However, you can still tell that the goal was for Hamlet to look like Branagh:

Kenneth Branagh - Hamlet Model Comparison

Well, kinda.

The actual rhythm portion of the game is actually pretty simple in construction. After creating the song - which involved splitting up Mel Gibson's lines sentence by sentence, then layering them over the eurobeat track in FL Studio - I went through in Audacity and marked where every single "note" should go in the song. I did this for 298 separate notes - play song, pause, mark down timecode and note value, then play. This took over an hour for the song.

What would've been smarter - and how I'd do it today - would be to create the note track in a midi file. I could've placed down the song in FL Studio, then just tapped out the note values on a keyboard or written them in the piano roll. Would've saved me a bunch of time, though I would've had to implement a MIDI parser.

This means the actual action of showing the notes is pretty simple - it just reads the cue file, which contains the exact time that every note should hit the keys, and syncs it up with the current position of the song. Muting the vocals when you miss a note is also simple - I just exported two versions of the song, one with vocals and one without, and muted one or the other.

Visuals

The visual are perhaps the most interesting part of this game. The concept of a Hamlet rhythm game is already pretty interesting, but the novelty wears off pretty quick. I needed something in the background to keep someone engaged and to keep things interesting for the entire duration of the song.

The models were created in Mixamo Fuse, which I think has been renamed to Adobe Fuse CC and is now part of Creative Cloud. I can't say I've touched it since this project. It's very similar to MakeHuman, but Mixamo has the benefit of having a large library of animations that I could use. This was useful for all the dancing used in this game.

The background actually took the longest to implement. Most of the game I had done ahead of time - pretty rare for me for a school project - but I was up until something like 4AM the night before class creating the background scene and adding in all the post-processing effects. I didn't know it was going to be so difficult.

Conclusion

Hamlet: The Movie: The Game isn't a work of art, though it's an important milestone for me. It's the first time I ever finished a project in Unity. I didn't really like Unity because I could never get anything finished in it - I always got hung up on the content before I got to the programming part - so this was a big step. It also served its purpose well - it's a funny five minute game that got me an A in class. And that's really all I set out to do.