content top

Baseborn released!

Baseborn released!

I’m very pleased to be able to announce that Baseborn (formerly “codename Ifrit”) is finally out of beta and has hit its first release. Thanks to all of you who tested the game back in January, we were able to squash a ton of bugs and add some new features, including a complete overhaul of the AI, a remastered soundtrack, new physics and effects for weapons, and the ability to restart the game at any time.

Perhaps the most important change is that it’s no longer necessary to download a specific version of the game if you’re a Mac or Linux user; thanks to the most recent version of FLAKit we can bundle the whole game into a single file and run it on any computer through a web page. This should also allow the game to run on computers that aren’t supported by Adobe’s flash projector, like PowerPC Macs.

If you missed it, we ran a series of posts during the last week that went into detail on various aspects of Baseborn’s development process.  You can find them here:

You can download the most recent version of the game here, and the source code is available on the project repository. We hope you enjoy the game!

Read More

The Sounds of Baseborn

The Sounds of Baseborn

The Baseborn music is the first soundtrack I’ve ever created. It’s always been a dream of mine to write music for games, so I am incredibly happy to be realizing this dream.

You can download the soundtrack here: Baseborn Original Soundtrack

Click on “Buy Now” to download it. You can name your price, or type in a “0” to get it for free. Donations are appreciated, though. 🙂


The Concept

In the beginning levels, I wanted the music to flow together as seamlessly as possible. Each time you change “zone” (go from beach to forest, or forest to tower), a new layer of instrumentation is added. Each layer is meant to alter the feeling to fit the zone, while still maintaining a theme and underlying tone. The Hellther and boss battle music are intentionally independent. I’ll explain this in a bit. Ideally, I would have created my own audio mixer in code, and faded each track in one at time when it was necessary. I was not able to do this due to limits on time and programming experience. I ended up having separate audio files for each layer, but it included all the previous layers as well. I would stop one track and start the other whenever I needed to change song. Fortunately, this was still enough to convey the feelings I wanted.

The Songs

As a warning, these descriptions might become quite “artsy”, “romantic”, even “chimerical“.

1. The Beach

When I wrote this beginning piano piece, I literally sat there with my eyes closed until I brought my mind into a state of empathy for what this shipwrecked character would be feeling. Amnesia, smallness, loneliness, desperation. Then, I just started playing. What you hear is the result. It’s very sparse. This is to contribute to the aforementioned mood, and so that the audio wouldn’t sound cluttered when other layers were added. It’s pretty straightforward, with only a brief key change towards the end of the movement. This key change is important though. It lets you know that everything is not safe, and something is definitely wrong here.

2. The Forest

When you enter the forest, a small violin and triangle enter the scene. It was inspired by “Gustaberg” and “Ronfaure” from the Final Fantasy XI Soundtrack. A high, suspended violin note persists, and later a second violin harmonizes to give some motion. This and the sparse triangle give a feeling of “lostness” and “barrenness”.

3. The Tower

The tower layer has a noticeable change in mood. It gives a royal sound with a rolling snare drum, and a brass melody line. This one is inspired by “The Kingdom Of San D’Oria” from the Final Fantasy XI Soundtrack. The melody starts off with a mid-range french horn and trombone harmonization. Then, it’s joined by a high trumpet harmony, which actually feels more like a melody. Towards the end, a weighty tuba part comes in to give the key change some emphasis. The intensity grows with this track.

4. The Dungeon

This is where the bass kicks in. There is a sudden drop when the contrabass part comes in. The deepness is meant to set off worry and convey “fear”. The notes I chose for it are intentionally dissonant. I found and amplified the tensions that existed within each chord. A steady and cold bass drum beats to bring out the darkness. The audio is rather full at this point, and the tension of the music is growing.

5. The Hellther

The instant this track starts, everything is suddenly silenced. No more instruments, no more music. All you hear is some awful ringing and a relentless drone in the distance. This one was inspired by Ravenholm from Half-Life 2. The purpose was to give a sudden and extreme change so that this strange area stood out from the rest. The goal was to make something awful and twisted. The place is riddled with serpents and demons and horrifying shadows of yourself that are all trying to kill you.

6. The Boss

The Boss music has much, much more going on. It is heavily inspired by the various battle tunes from Final Fantasy, particularly “Battle Theme”, again from the Final Fantasy XI Soundtrack.

After the quietness of the Hellther ambiance, I wanted to give a jolt when the player encountered the boss. This comes with a string ensemble playing very dissonant, stabbing, staccato chords. A descending hammer dulcimer line comes in to add some variety in timbre. Then, when the rolling snare comes in, the cello begins to branch off from the main rhythm, playing some beats in between to add to the sense of urgency. At this point, for variety, the dulcimer first plays an ascending line, and then the normal descending line with harmonizing 5ths.

From here, a nylon-string guitar plays some sustaining arpeggios to add to the layer. Now, we add some bass drum hits and cymbal crashes to really amp up the panic. The dulcimer becomes more active by playing bits of a steadily ascending scale. The end of each bit ends on a tense note. By now, the player has begun combat and is realizing the intensity of the battle. This section ends with all instruments hitting and cutting out, and the dulcimer ringing out with the now-familiar descending line.

The next section quiets down a bit for drama. We’ve got the cello laying a foundation and the dulcimer plays a more active line to keep things going. It plays three-note sequences that rise up the scale each measure. The rhythm of the dulcimer and the cello complement each other in such a way that adds to the “unsettling” feeling.

At the end of the bar, we hear the familiar descending dulcimer line, and the string ensemble plays descending chromatic stabs, alternating in octave as it goes down. Then the snare drum returns to pick things back up again. The dulcimer keeps the same rhythm, but continues to climb in the scale, getting more tense as it goes. At the end of this bar, it all climaxes and then releases into the next section.

Here, everything falls and the tension eases. Insert some lush, flowing strings, and some peaceful harp arpeggios. The peace doesn’t last long, as the final chord of this bar re-introduces the tension. Now the dulcimer takes the lead with a somber melody. We have the strings and percussion hitting every other beat, with some offset rhythms at the end of each measure. It all quickly grows in intensity, then we have a big cymbal wash and . . . a small triangle trills out for a measure or two. Then the piece repeats from the very beginning.

7. The Finale

This was a piece I wrote last-minute to go over the credits. I wanted it to be peaceful, and leave the player with a calm feeling. It was inspired by the faint blue-glowing crescent moon in the background as the credits roll. I was listening to a lot of George Winston at this time, so he was consequently an inspiration for this as well. This one was not played by hand. I created the notes in my MIDI editor.


The Sounds

Most of the sound effects in Baseborn were not created by me. Nearly all of them came from a great resource: There were some sounds that I created, though.

Frost Attack

First, I found a synth sound that sounded “airy”. Then, I essentially ran a finger over several piano keys. This created the sound! It took a few tries to get it just right,  but it was pretty straightforward.


The creation process for this one was very similar to the frost attack sound. It just took some extra equalization to get the tone right.


This one was just a matter of finding a synth sound, and playing a sustained note. I took a small chunk of the sustained note, and copy/pasted that chunk one after the other. Then I did a crossfade between each one so it all sounded like one piece.


Again, you can download the soundtrack here: Baseborn Original Soundtrack



Read More

Populating the world: Baseborn’s AI

Probably the thing I’m most proud of in Baseborn is the AI. In the original design document, the enemies you faced were simply going to be static targets that the player had to eliminate in a set amount of time, as a “combat training exercise”. When Chris and I teamed up, we decided to greatly increase the scope of the project, and proper enemy behavior was one of the first things I started on.


One of my early goals was that the core of the AI system be versatile enough that creating a new type of enemy was as simple as changing a few variables. To facilitate this, I specified a number of behavior parameters that an enemy type could combine, such as “stand ground”, “afraid”, “no melee”, and “no ranged”. By designing the base AI procedure to work differently depending on these parameters, we were able to quickly design new enemy types with almost no class-specific code. Additionally, any bugs we found only needed to be fixed in one place, which was a lifesaver as the system started to grow in complexity.


The base AI procedure (called the “think” method) is called each frame. Here’s the structure of the method:

For the sake of my own sanity, I designed each task to only modify a certain set of data. For example, the enemy’s heading is only ever set in the adjustHeading() method, and his position is only ever set in the move() method.


When an enemy is killed, there is a chance that he’ll drop a pickup of health, mana or ammo for the player to collect. This method simply checks for collision with the player and applies the effect accordingly.

Some enemies have no default behavior. Whether this is simply because they aren’t supposed to do anything (the debris on the beach near the beginning of the game is actually an enemy type), or because their behavior is designed specifically (such as the Doppelganger enemies that appear towards the end of the game), this allows the think procedure to exit early.

Here we check if the enemy’s health has been reduced to zero, and stop the procedure if it has. From here on, all the tasks are related to moving and attacking, and we can’t have our defeated enemies doing that.

Line-of-sight is calculated as a simple rectangle check. The enemy looks to see if the player is within a rectangle offset from his position to see if the player is within its bounds. This step moves the rectangle to correspond to his location.

This is the most involved task by far, and deserves a more in-depth explanation.

There are a number of cases in which the enemy should reverse his heading. The most obvious is that he should turn to face the player, if the player is in his field of view…but not if a wall is between them. Additionally, he should reverse his movement direction if he reaches the edge of a platform (but not if the player is across a gap and within ranged weapon distance) or bumps into an obstacle (but not if the obstacle he’s bumped into is the player backed into a corner).

The first step is to find out whether the player is in view. This involves a rectangle check and a raycast, as shown here:

In this case, even though the player is obviously within the view rectangle, a wall is occluding the enemy’s view.

Not so in this case. Since the player is in view, the enemy should turn and walk towards him.

Each time an enemy moves, he remembers where he was last. If at any time his position hasn’t changed since last time, he knows he’s hit a wall and that the physics engine is preventing him from moving forward. Unless the player is in view, he should turn around and walk the other way.

Next, the enemy checks to see if his next move would cause him to fall off the platform he’s standing on. Most of the time this would cause him to turn so as not to fall, but if the player is in view he will wait on the edge and try to attack him or knock him off.

If the enemy can see the player, he goes into attack mode. Depending on his behavior parameters, he may try to shoot, get in closer for a melee attack, or run away.

If the enemy’s health is below 33%, he goes into flee mode. During this phase he’ll rush off of platform edges, and stop trying to chase the player. After a certain amount of time he’ll start to regain health, and eventually drop out of flee mode and resume his normal behavior.

Finally, the enemy’s position is updated based on his current speed.


This was my first time working with any kind of AI, and I’m very pleased with the way it came out. I look forward to taking what I’ve learned on this project and applying it to future implementations. If you’re interested in seeing the code behind the tasks, you can find it in the Enemy class on Baseborn’s BitBucket repository.

Read More
content top