Archive for January, 2013

Date: January 31st, 2013
Cate: development, Quadrilateral Cowboy
7 msgs

QC Dev 005: Lamp

I was recently making this kitchen area for Quadrilateral Cowboy.


As the kitchen started to shape up, I realized I didn’t have a light fixture that would fit the room well. So I willed one into existence.

Meaning, I made a light fixture.


When I make things, I spend a lot of time buried in research. This mostly boils down to finding images via Google kung fu and mining whatever I have in my brain or on my bookshelf. I’m more than happy to spend an inordinate amount of time finding the right reference image, because they give me details I’d otherwise overlook.

For Thirty Flights of Loving, this motorcycle was modeled after the Honda CB750:


And the museum area was modeled after the National Museum of Natural History in Paris:


For this light fixture, I did a few searches. Something caught my eye when I punched in ‘deco light fixture‘:


Look at it. It’s gorgeous. Now, to model this beauty.


I use Blender for my models. I use version 2.49b, not because I’m a fan of old versions of software, but because my file exporters are set up to use this version.

I have a fairly basic rule: don’t let art become a chokepoint. That means low-polygon art, stuff that’s easy to later modify, and something I can make in a reasonable amount of time. I know my art won’t win a stand-up fight against any respectable game, so I go the opposite route and make art that would look perfectly at home in games made in 1996.

Here’s what I ended up with:


I now had 55 naked polygons, ready to be dressed up.


Here’s the texture, a 256×256 image. As you can see, it’s a very bare-bones texture:


After wrapping the texture around my model, here’s how it looked:



I’m using the Doom 3 engine to make the game. Every texture requires a shader, defined via a simple text file. Here’s the shader for this light fixture:


Shaders are capable of doing wacky things, but this one’s pretty plain. The only special thing this shader has is the additive blend (“blend  add“), which makes the texture glow.

Putting it all together

Model + Texture + Shader =


There it is, in all its glowy glory.

Et al

First-person shooters are notoriously hungry for content.

When you make a third-person game, you can get away with lower-resolution assets. The camera is typically somewhere between 5-15 feet away from any given surface, so the world needs less detail.

When you make a first-person game, the player can press their nose against any given surface. There they are, with their nose smooshed against a wall.

This means the art has to look decent when inspected up-close. Cabinets, floors, tables, salt-shakers, egg-beaters, kitchen sinks – it all has to look good-ish. This is a monumental task to demand from artists, and would probably crush me like a bug.

And that’s why my light fixture is 55 polygons.

Date: January 25th, 2013
Cate: development, Quadrilateral Cowboy, Uncategorized
2 msgs

QC Dev 004: Autocomplete

While demoing Quadrilateral Cowboy at PAX 2012, a lot of people asked for autocomplete functionality when typing commands into the game.

I put it on my to-do list and it languished there for a while. The mere idea of an autocomplete system intimidated me, and in my head it ballooned into a beast of a task.

Then one day I started implementing it, and found it wasn’t that bad at all.

The Cat Plays No Part

Here’s the sample level. There’s three doors and a window. The cat plays no part in this example.


Now, let’s say the player types this in:


And then presses tab to autocomplete it. What happens?


First the game iterates through all hack-able entities in the world and generates a list. In this example level, the list is:

  • door1
  • door2
  • door3A
  • window1


There, we now have a list of possible candidates.


We then filter out anything that doesn’t fit the player’s command. The player typed in ‘d‘, and we compare that to the above list.

window1‘ is immediately filtered out, since ‘window1‘ starts with a ‘w‘, not a ‘d‘. You’re dead to me, window1.

That leaves us with three possible candidates: door1, door2, door3A


With this list of candidates, we further pare it down to the best autocomplete entry. We do this by comparing all the candidates amongst one another, and evaluating what they have in common. We compare them character-by-character:

Character 1: d
All the candidates have this in common, so we continue.

Character 2: o
All the candidates have this in common, so we continue.

Character3: o
All the candidates have this in common, so we continue.

Character4: r
All the candidates have this in common, so we continue.

Character5: 1
One or more candidates has a different fifth character. We immediately stop here, and we now know what all the candidates have in common: the first four characters, door.

Ship it

We send door to the autocomplete, filling in the player prompt with: door



Et al

I remember when Guitar Hero first came out, I was working late at Pandemic. Some guys bought the game and the plastic guitar into the conference room.

As I sat there watching our gameplay programmer tap colored buttons on the guitar, my first thought was “this is the dorkiest thing I’ve ever seen.” After a few minutes my opinion became “this is the best thing I’ve ever seen.”  There was something in the room, an energy created by the role-playing aspect and a tiny plastic guitar. He’s a rock star! He played the hell out of that song! That guitar solo ripped my limbs off!

Quadrilateral Cowboy intends to use the keyboard as the role-playing peripheral, to get that thrill of being an internationally-renown deck jockey. If I someday see someone go the extra mile and play this game in a dark room wearing sunglasses and a trenchcoat, I’ll be a happy man.

Date: January 16th, 2013
Cate: development, Quadrilateral Cowboy
6 msgs

QC Dev 003: Pomodoro

Here’s what Blendo Games looks like:


I got the standing desk a couple years ago on a whim, because the idea of sitting for ungodly hours every day made me squirrely. For folks who have experienced stand-up meetings, you’ll know that forcing someone to stand on their feet prevents a lot of dilly-dallying and puttering around. If you feel meetings aren’t productive, try removing all chairs.

(I got a high stool for those lazy times.)

Butt in Chair

When I worked at Pandemic, I’d occasionally come to work an hour early and leave an hour early.


In that first hour, there were no interruptions: no barrage of email, no meetings, no one needing anything from me, and no one for me to go visit. And in that one hour, I was usually able to get a 100+ hours’ worth of work done. I’m exaggerating, but you get the idea. An isolation chamber is far from the ideal working environment, but I’d say periods of butt-in-chair are invaluable.

Once I started Blendo Games, the concept of going to work an hour early no longer applied. I wanted some way to emulate that period of productivity, and a friend pointed me to the Pomodoro technique.


I follow the broad strokes of the Pomodoro technique – here’s how I do it:

1. On my computer desktop, I run a small timer called Workrave. It looks like this:


2. For the next thirty minutes, I work. This means:

  • No checking email.
  • No checking phone.
  • No browsing internet.
  • No watching TV/movies in the background.
  • No getting snacks.
  • No musing about your existence relative to the mind-blowing majesty of the universe.
  • Nothing but work.


3. When the timer hits thirty minutes, take a break. This means: do anything you want. I don’t time my breaks, but they usually average 5-10 minutes.

4. Wash, rinse, repeat.

Et Al

Once you remove distractions from the equation, the equation becomes dead simple – focus on one thing, and nothing but that one thing. Thirty minutes doesn’t sound very long, but it’s enough to ramp up to incredible momentum, putting you “in the zone.”

Bzzt, then the timer hits. I’m always tempted to maintain that momentum and barrel straight through the breaktime. Admittedly, this temptation oftentimes wins me over, but I find doing that ultimately fries my brain.

Spend a day and try it out! I’d love to hear how it goes.


Date: January 9th, 2013
Cate: development, Quadrilateral Cowboy
5 msgs

QC Dev 002: Clambering

I hopped fences when I was younger. My elementary school was locked up during the weekend, so to play on the equipment or the fields, you had to climb over a chain-link fence.


When confronted with a chain-link fence or ledge in a video game, the typical solution is: find a way around it. Commando Bulk McBeefenstein can’t climb the barrier, but 10-year old me can. Sad trombone.

There are FPSs that empower you with maneuverability – Thief and Mirror’s Edge come to mind. These games de-emphasize direct combat and redirect that energy into creatively traversing through the environment.

In Quadrilateral Cowboy, the game is largely about slinking through secure facilities, so player maneuverability was something I wanted to spend time on.

How to Clamber

In Quadrilateral Cowboy, the player character (PC) can clamber onto any ledge within hand’s reach. I’ll describe how the game verifies whether the PC can clamber something.


1. First, a traceline is shot upwards 140 units:


2. Traceline 2 is then shot forward 32 units:


3. Traceline 3 is then shot downward until it hits something:


4. Lastly, check if the PC crouched bounding box can safely fit here:


5. Two things can happen here. If the PC bounding box:

  • safely fits:  great! We’re done. Start the clamber animation.
  • collides into geometry OR hits a surface unusable for any reason: return to Step 2 and increase the forward traceline length.

One good feature about this approach is how it handles two different clamber situations: clambering up wall ledges (as shown above), and clambering up a hole in the ceiling (i.e. an attic crawlspace hatch).

That’s a quick overview of how clambering works. After playing with it in the game, I realized it was woefully insufficient for clambering into what every first-person video game needs: ventilation shafts.

How to Vent

Checking whether the player can clamber into a ventilation shaft is slightly different.


1. First, a traceline is shot forward 48 units out of the PC’s eyeballs. In the example below, the player is looking slightly upward:


2. Trace downward until it hits anything:


3. Check if the PC bounding box can safely fit here:


4. If the PC bounding box:

  • safely fits: then hooray for you! Clamber in.
  • collides into geometry: attempt to nudge the bounding box away from walls until it finds a suitable spot.

When clambering, the game does the ledge check and the vent check. How does it decide which check to first do? Its prioritization depends on the player’s view angle.

  • If the player is looking upward, the ledge check is prioritized.
  • If the player is looking forward, the vent check is prioritized.

Et al

As a player, it’s wonderful to be empowered with abilities that let you be creative. Stacking boxes to reach a fire escape, creating a ladder out of sticky bombs, or the video game variant to social engineering.

Whereas Thirty Flights of Loving was a tightly-controlled experience, Quadrilateral Cowboy aims to give the player a variety of tools and let them loose in a sandbox to run around and experiment in. For super heroes, great power comes with great responsibilities. For video game players, great power comes with great ability to completely break your game. Players will find ways to use these tools circumvent and short-circuit the game.

And ultimately, I think that’s wonderful. The creativity a player brings in is one of the most exciting things about games.

Date: January 2nd, 2013
Cate: development, Quadrilateral Cowboy
7 msgs

QC Dev 001: Ghost Cursor

In Quadrilateral Cowboy, the player can place items in the world.


The player moves around a “ghost cursor” of the item. When the cursor is in a desired position, left-clicking makes the item appear at that spot.

This went through some iteration, and will almost certainly be further tweaked as development continues. Let’s take a look at how it works right now.

Tracelines And You

But first, some terminology: traceline.

In the picture below, I want to figure out what the player is looking at. So, I use a traceline. The traceline would start at the player’s eyeballs, and then shoot forward a very far distance.


The traceline then spits out a bunch of information. One of these pieces of information is collision: what did the traceline collide with. In this example, the traceline hit the wall, signified by the red circle.


I examine what the traceline collided with, and now I know what the player is looking at: the wall.

Tracelines can do more stuff, but we’ll leave it at that for now.

Bare Necessities

I like to start with the most stupidly easy & simple implementation and then work from there. In this case, the most SE&S implementation is to make the ghost cursor appear X units in front of the player’s eyeballs:


This has some issues:

  • The item would spawn in & drop down to the ground, forcing the player to make a dubious guess where it’ll land.
  • It relies on a lot on trusting players to have good depth perception, which first-person games are notoriously awful at (hence why platformers are great in 2D but suffer in 3D).

On The Ground

To address those issues, the next iteration had the ghost cursor snap to ground surfaces. This was done by having two tracelines:

  • Traceline 1: start from player eyeballs, shoot forward X units.
  • Traceline 2: start from Traceline 1’s end position, shoot downward X units.


There. Now we have a nifty ghost cursor that snaps to floors, tables, shelves, vanities, curios, whatever old-timey furniture you can throw at it:


Done, right? Not quite.

Against the Wall

This is where things break down. If the ghost cursor is positioned near a wall, it’s fine. But once you push it closer to the wall, the ghost cursor ends up lodged into the world:


That’s no good. Halfway into a wall is a highly inappropriate place for any self-respecting ghost cursor. To illustrate, Traceline 1 is hitting the wall, then Traceline 2 is tracing down to the ground, resulting in this awkwardness:


Now, we can rely on the player to not place stuff so close to the wall. They’ll learn and get used to it, right?

Yes, they will learn your quirks. But if making your game lean is a goal, then stuff like this is definitely fat. Players have a finite amount of time and energy for you. Everything that goes into the project has to answer one question: is it respecting the player’s goodwill or squandering it?

Wash Rinse Repeat

The problem: the ghost cursor is lodged into the wall. Therefore, the most straight-forward solution would be to move the ghost cursor away from the wall. Let’s start there.

We add an additional check. If the ghost cursor is stuck in geometry, we:

  1. Step 1: Modify Traceline 1 by shortening it by X units.
  2. Step 2: Do the Traceline 2 downward trace. If the ghost cursor is stuck in geometry, stop everything and return to Step 1.

Once the ghost cursor is no longer stuck in geometry, then we know it has found a suitable place. Done!


That’s where the system is right now. As levels are completed, more gotchas and edge cases appear as the ghost cursor has to contend with increasingly bizarre world geometry.

Et al

There’s something exciting about creating a system and then putting it through its paces. While artistic creativity plays a large part of game development, it also tickles that pleasure center of creating a finely-tuned clockwork machine, brimming with a billion moving parts working in concert with one another.

Then one day your baby is released out into the wild and you hope those billion moving parts don’t violently implode on themselves.

It reminds me of a program I saw on PBS about an off-road racing competition. The catch was: the cars had no drivers, nor were they remote controlled. Robot cars, folks. There was something so exciting and satisfying about seeing these machines have to be ready for whatever one-in-a-million edge case might happen, and gracefully handle it when that edge case inevitably happens ten times in a row.