Friday, December 30, 2011

Level Metrics

The December build of Bullet Time Ninja has been online for a few weeks now. I have been using analytics software to track how people have been playing the game. Today, I will share some of my metrics, and show how I am using this information to improve gameplay.

Above is a youtube video of the version of the game where these metrics were tracked.

Measuring Engagement
I use metrics in Bullet Time Ninja to see how many levels people play, and how many times people die in each level. In theory, if the game is extremely fun, most people will play the game all the way through. Otherwise, people will quit and play something else.

Thanks to free services like Playtomic, I can collect large amounts of player data, and organize it into pretty charts.

This chart shows how many people play each level:

Almost everyone plays the first level, but only about one-third of players make it all the way through to the end. Notice that the drop-off is pretty large in the early levels, but is a bit smaller in the later levels as players get more invested.

Tuesday, November 15, 2011

Wall Kicking

Here is how wall-kicking works:

Desired Outcome
When the player touches a wall, the player should continuously stick to the wall until:
  1. The player touches the ground
  2. The player jumps off the wall
  3. The player presses the DOWN key

The "First Frame" Problem
Most Platformer games collide the player against the environment every frame. When the player overlaps a piece of the ground, wall, or ceiling, the player is moved to the closest point that is not touching the environment. This means that we can only tell if the player touched the environment during the first frame that they touch it. Detecting continuous collision over multiple frames is a little trickier. 

It's pretty easy to tell if the player is constantly touching the ground, since we can count on gravity to keep the player falling through the floor every frame. On walls, we only know that the player has collided on the first touch (unless of course, something is constantly pushing the player into the wall. This is a bad idea unless your character is intentionally sticky, like Meat Boy).

Wednesday, September 28, 2011

Character Animation Logic

Character animation logic is a surprisingly complicated programming problem. Every single condition for making a character animate the correct way, in the correct context, needs to be explicitly defined by the programmer. Without a clear methodology, this kind of code quickly spirals out of control, and becomes a major pain during the game development process.

Today, I will walk through how I implemented Character Animation Logic in Bullet Time Ninja.

The code included with this article comes from an earlier build of Bullet Time Ninja, when I was still using the red ninja.

I chose to share this code instead of a recent build because the code is a lot more readable.

Friday, September 16, 2011

Zoom Camera

In Bullet Time Ninja, when the player enters Bullet Time, the camera dramatically zooms in.

Today, I will walk through how I implemented this camera in Flixel 2.5.

Friday, September 9, 2011

Game Level Architecture

Today, I will walk you through some common pitfalls I see game programmers make when designing their game level architectures. By the end of this post, you will know how to write an architecture that can support hundreds of game levels.

Inheritance is a cool feature of Object-Oriented programming languages, but too often programmers treat it as a one-size-fits all solution for every architecture problem they encounter.

Where an Inheritance Solution Fails, Hard
Flixel uses Objects called FlxStates to segment different sections of the game into seperate ActionScript class files that the programmer writes. One state runs at a time, and switching states destroys the old FlxState before switching to the new FlxState. This system is great for writing things like menu screens,  where each screen sits in a different ActionScript class file.

// file
public class TitleScreen extends FlxState
     // ...
// file
public class CreditsScreen extends FlxState
     // ...

However, you would never want game levels to extend FlxStates.

Developer Blog

Hey folks. I've been working on Bullet Time Ninja for a few months now. I think I'm going to use this blog to discuss some of the cool things that I have learned while working on the game.

Sunday, May 29, 2011


Bullet Time Ninja is a super awesome Flash game about an epic ninja that has the power to slow down time and air-kick in any direction.

The game is currently under development. More details will arise in Fall 2011.