Skip to content
Published January 14, 2019

This is my first post where I will be discussing the development process of one of my games. I think it’s important to be able to explain to other people how your work is built so that they may be able to learn from it 😀 If I get around to it, I may write “Making of” for some of my older games.

In the beginning…

In my humble, completely factual and very unbiased opinion, I believe that every work created by an individual is a reflection of that person. Each work contains their motivations, their beliefs, their fears, their dreams, etc. Now, some works have them more than others. For example, if you’re commissioned to write a children’s books, there probably won’t be a diatribe about an existential crisis. Nonetheless, I think that for the most part, the choices of words, art, music and structure of a video game can say quite a lot about a person.

This is mainly applicable to solo projects, but it can take form in group settings as well. Once you start getting into AAA game territory where hundreds of people are working on it though, it becomes greatly distilled. Sometimes the core message can come through, but usually its flaws are ironed over and smoothed out. There are hundreds of jobs and millions of dollars on the line, after all.

Learning from games

With a small indie project that likely doesn’t have dozens of QA testers, often times you can get deeper insight into the person creating it, such as their morals and values. Even if the game isn’t overt about its opinions, sometimes you can gather clues based on what the creator is showing you and in what order. After all, they had to make conscious decisions to present you with each part of the game.

Often times in life, it’s not always realistic to find out how a certain game was made. It’s nice in home movie releases that the making of a film is often added in. In an effort to help newcomers out with game development, I will be creating “The Making Of” posts such as this one to explain what went into the game’s creation as well as any interesting code that I used.

Where does a game come from?

A game comes from an idea, plain and simple. At some point, one or more ideas float around a person’s head, eventually coalescing into a game idea. Well, more or less. Sometimes it’s a vague notion, whereas other times it will be thoughts crystallized into a perfect form.

For me, Story of the Mirror was several ideas from games, literature, folklore, and more mixed together. I’ll use a bullet list to segregate the different parts.

  • The main idea of stepping through a mirror into a haunted world comes from a few sources. In D&D, there is a dimension called the Plane of Mirrors where a player can travel to, and when they do, an evil doppelgänger usually fights them to the death. This idea comes from folklore and tall tales. I’ve always found myself drawn to mirrors ever since I was young, and I would often place two mirrors near to each other to see them reflect one another. Because of the imperfections and angles, the images would eventually disappear from view or become dark, so it always seemed like to me there was more beyond what we could normally see. At the very least, I remember stories from when I was young of traveling through mirrors into other worlds. I’d also say Legend of Zelda: A Link to the Past and Metroid Prime 2: Echoes are also big inspirations for me in terms of a light world/dark world progression (except in my game, traversal between dimensions is one-way).
  • The Red Prince is a homage to The King in Yellow, a collection of short stories that are more or less tangentially related to a play of the same name in the stories. The play supposedly drives people mad if they read the second part of the play. In addition, being an avid Souls series player, I originally heard of this short story collection as being referenced by the Old Monk and subsequent incarnations, such as King Jeremiah. I changed it slightly to look like a hooded figure because I always think hooded figures are cool and threatening 🙂
  • It’s a staple in many horror games to have bad things happen when the player picks up items, activates switches, etc. For Story of the Mirror (and even Cathode Ray Sunshine which is a prototype of sorts), the game mechanic where the world becomes progressively more evil is drawn from a
    fun little game called Eversion, which I recently learned means to turn something inside out. In the game, you manipulate the game world at various points to make the world more or less evil, in order to complete platforming puzzles. I like the idea in a horror game of the world becoming increasingly darker and more threatening as you progress. Some other inspiration in this vein is Silent Hill 2, Castlevania 2: Simon’s Quest and MLP: Story of the Blanks.
  • Another horror game staple is notes left about for the player to read. Put simply, reading material for the player is often used so that the player can uncover some kind of mystery or evil. For me, I was most motivated by FAITH and Resident Evil, but really, this trope is so common that it’s near ubiquitous.
  • In terms of the game’s look and feel, I’ll again reference FAITH and MLP: Story of the Blanks. In addition, though the game feel is different, I’ve also thought of Yumi Nikki when making games like this. Even though that game isn’t strictly horror, the haunting atmosphere of the game cannot be denied in my opinion.

Developing the Game

Development on Story of the Mirror took place in October 2018 over a few weeks time , the longest game I’ve completed to date. Keep in mind, this wasn’t a straight-up 8 hour shift, 5 days a week like your typical office job. As one might expect with independent solo development, particularly when it’s still a hobby for me, work was pretty scattered. Sometimes I’d work the entire day, while other days I would take the day off or work maybe 30 minutes. I’m not quite in the habit yet, but I plan on recording how many hours I spend on game development in the future, not only for curiosity’s sake but also for business purposes.

Software Design

Creating the Map from a Tile Set

The maps for each portion of the game were created as Lua Tables. The tables were filled with numbers, and these numbers corresponded to rocks, trees, etc. in the sprite editor. In Pico-8, you are heavily limited on how many characters and words you can have in your game file, so I had to condense the game world and make the Ghost World and Dark World the same tile maps.

Writing some Basic A.I.

The ghosts in the game use a simple a.i. script. Because they were incorporeal, I could let the ghosts simply ignore obstacles and pass through them easily. Simply put, the ghosts slowly home in on the player.

This is a basic script that I used for the enemy ghosts. I’ve used this same idea in Cathode Ray Sunshine. Simply put, the enemy moves left, right, up and down to get closer to the player. To avoid jittering, it helps to keep a small range of values (P1.x -1 to P1.x + 1 and P1.y – 1 to P1.y + 1 in this case) where the ghost doesn’t move in one direction. Without this small buffer range, the enemy will become jittery since they’ll likely never be exactly in line with the player.

Level Design

Designing a world from smaller pieces

There are 4 main sections to the game: The Light World (starting area), the Ghost World, the Dark World, and the Red Prince’s Room. The transition to each area is supposed to be analogous to going from the real world to Purgatory and Hell, with changes to design and color to match this change in scenery. This is the central theme of the game: slowly going to a world filled with evil, not unlike Silent Hill. When designing your game, it helps to create areas that complement the theme or message of your game; otherwise, players won’t understand why they are traveling to them.

Creating a Looping Overworld

If you have a map that you want to loop through (to make the world seem larger than it is), you can accomplish this quite easily. The way I did this was giving the player map coordinates (x,y) like (0,0), (0,1), etc. and changing the map coordinates when they moved between screens. As an example, going left from screen (1,1) would reach screen (0,1) since going left decreases the x component by one. To achieve looping, first decide on maximum map dimensions, such as 3×3. When the player goes right from (2,y), for instance, use some code to change (3,y) to (0,y) (basically whenever the player would go out of bounds on the map). This brings the player back to the left side of the map, making the map a sphere that connects to itself on the edges.

Art Design

Usage of Color

I made use of different colors for each section of the game to help push forward the idea that the player is transitioning to Hell.

In the opening area, the colors are mainly organic looking, with pleasant looking greens and browns.

In the Ghost World, color has been bleached from the environment. Therefore, the world is grays, blacks and whites.

Lastly, in the Dark World, blackness fills the ground. Only sickly looking trees and blood-oozing rocks remain, aside from the ghastly phantoms that chase you as you search for the three orbs of light: red, green and blue.

Overlaying visual effects

When the player reaches the Ghost World, black horizontal bars flicker about randomly. This is to give the areas a more malicious and hard edge to them since it cuts out parts of the screen intermittently. The black bars are simply black rectangles that are generated at random y values onscreen.

Sound Design

Shepard’s Tone

For one of the later tracks in the game, I used the Shepard Tone, which is an auditory illusion where a piece of music continuously goes up or down in pitch yet which never actually seems to change frequency. This is a layered musical effect that is created by using two audio channels playing a series of notes that go up or down in pitch. Most people are familiar with this idea from Super Mario 64, where a Shepard Tone plays when trying to go up the infinite 70 star staircase. The trick is to reduce the volume of the notes of one channel as it nears the end of the sequence, and increase the volume of the notes for the next loop in the sequence. This way, the notes fade out when they reach higher (or lower) frequencies and are essentially overwritten by the beginning of the note sequence, thus tricking your brain into thinking the music is ascending or descending forever. Using Pico-8 for this effect was difficult and doesn’t work perfectly, but I think it’s a decent approximation.