Gender interpolation in Flash

As a developer, I can’t help but deconstruct any game I end up playing. RPGs are a special fascination of mine, and I’ve often wondered how script writers handle games where the player can choose the main character’s gender. There are so many factors to consider beyond simply replacing occurrences of “his” with “her” and so forth; when you throw nicknames, honorifics, and insults into the mix along with all the various pronouns, there’s a huge number of variables to consider.

Today I was hanging out on the Flashpunk forums and the topic came up. Suddenly it occurred to me; you don’t need to have two defined lists of gender-appropriate tokens; just a consistent format for representing each possible option within the text itself.

For example, instead of doing this something like this:

Armitage: This is {var: player_name}. {gendered: subjective_uppercase}’s looking for a job.

The same could be written like this:

Armitage: This is {var: player_name}. {gendered: He/She}’s looking for a job.

It reads a lot better, for starters, and it avoids the need to maintain gendered tokens in a separate location than the script data. Granted, inline variables are harder to change in broad strokes at a later date, but on the other hand it’s harder to accidentally break lots of text by changing something global.

Here’s a little function I wrote to handle this in Flash. It’s not as flexible as the contrived example above, but it does what I set out to accomplish and I’m happy with it.

Let me know if this helps!

Level count isn’t everything

Level count isn’t everything

I’m quickly approaching gold status on Iridescence, and with all foreseeable technical work finished, I’m deep in the throes of level design. Originally I had planned to ship with 100 levels, but today I decided to cut that in half and target 50 instead.

Why am I doing this?

I’ve been stuck in this stage of development for a while, actually. Slide had 16 levels when I released it, and I was intent on having significantly more for Iridescence, being as it’s going to be a commercial release and I want people to feel they’ve gotten their money’s worth. 100 seemed like a nice round number and I assumed that reaching it would be fairly straightforward.

This is the part where I was wrong. Designing puzzles is actually really hard. You want them to be challenging but still fun, subversive but not unfair, and most importantly they have to mesh with one another as a cohesive whole. On top of all that, the puzzle designer has to learn to work backwards from an interesting solution to a starting state that doesn’t make the goal obvious.

The whole process is very creatively-bound, and it’s impossible (at least for me) to sit to down and just crank out new levels up to a set quota. It’s been hard to keep a steady pace, and the constant awareness of how much more work I have in store hasn’t helped.

While considering all this, I realized that I was coming at this whole process from the wrong direction. In all my favorite puzzle games, the number of levels is irrelevant; the game goes on until it runs out of meaningful things to do, and then it stops. My number one goal in Iridescence’s design is that each level provide some way of stretching the player’s mind; whether that’s by introducing a new system, or subverting assumptions to cause misdirection. This is in direct conflict with having to fill a set number of levels. Some puzzle games are based on a small set of mechanics which are then used in levels that are more about going through the motions than finding something new each time.  There’s nothing inherently wrong with that, of course, but it goes against the philosophy I’ve been building Iridescence around.

In the end, I’d rather make a concise game that does what it sets out to do and nothing more, than a long game that’s full of repetition and filler.

Hypothermia is now on!


A while back I made a little game called Hypothermia for Experimental Gameplay‘s “Temperature” challenge, a game jam of sorts that ran for a week during November/December 2013. It got reviewed by Indie Impressions and Indie Statik, and some guy from China did a Let’s Play of it.

Based solely on download count, it’s my most successful game thus far, but I never managed to find a hosting site for it that was a good fit, so despite it being a flash game anyone who wanted to play it had to download an archive containing the SWF and a web page. Thanks to, I now have a place to upload it without having to worry about it being blammed by people who don’t understand game jams. ;)

Play it here!

Stuck Scripting overhaul

Early on in the development of Slide (before Iridescence had come to be), I added support for small script files to allow levels to contain more complicated puzzles without running into false positives that caused the reset button to show up while the level was still perfectly solvable. I was using C# at the time, and options for proper scripting languages on the .NET platform are shamefully limited, so I rolled my own.

Here’s a sample of what it looked like:

The use-case for stuck scripts is extremely specific, so the language itself didn’t need too many bells and whistles. All I needed to do at any time was compare the number of game objects of a given color, and check if pawns had a valid path to their targets. The snippet above basically translates like so:

The puzzle is unsolvable if any of these are true:

there are more red pawns than blue
there are more green pawns than blue
there are more blue pawns than green, unless all blue pawns can reach a target
there are more blue pawns than red, unless all blue pawns can reach a target

Needless to say, it’s as ugly as it is functional, and adding new features proved difficult. The inflexibility of the original design meant for some truly impressive hijinks as I tried to implement more complex behaviors with only the original syntax.

Today I stripped the whole system out and replaced it with a new one. Since I’m using Haxe for this remake, I was able to take advantage of hscript, a subset of Haxe that allows for runtime interpretation. Now, the script above looks like this:

Much better.

The original scripting system was designed as a black box, with a minimal number of inputs and outputs. By keeping the interface consistent between implementations, I was able to completely change the underlying code without changing any other aspect of the program. It’s nice to be able to change something so integral to the gameplay without worrying about side effects.

Menu work

This week in development on Iridescence I’ve been focusing on menus, settings, and save data. Here’s what I’ve implemented as feedback when the player tries to open a level that hasn’t been unlocked yet. The animation is inspired by WordPress’ login window, and I think it’s pretty clear what’s going on.

Rotatable Graphiclists

Here’s a quick gif demonstrating a new feature I’m working on in #Punk, my C# port of Flashpunk.


Pictured: Two images (rectangle and circle), a Nineslice, and a Tilemap.

Since C# + SFML is so much more powerful than Flash, we can do some pretty cool things that weren’t previously possible. Rotatable Graphiclists are something I’ve wanted for a while, and they’re pretty close to being ready!

1GAM 2013: Postmortem

2013 is over and, thanks to OneGameAMonth, I managed to finish 12 games over the course of the year. I wanted to talk about each one a little bit.

January — Must’ve been rats!

rats_arcadeJanuary’s game was the result of my participation in the Global Game Jam, working with Chris Logsdon and Paul Ouellette (with voice work by Mike Elser). It was a lot of fun to make despite not entirely fitting the jam theme, and its a lot of fun to play thanks to its overall silliness. I’m really happy with how well it turned out given the limited amount of time and relative complexity of the systems we were working with.

Here’s my full post on this game.

February — Humphrey’s Tiny Adventure: Remastered


I’m still very happy with Humphrey. For the small amount of time I put into it, it’s one of the more polished games I’ve finished and I enjoyed figuring out ways to convey the story without any words. Despite my love for open-ended systems-driven gameplay, point-and-click adventures will always have a special place in my heart due to their role in my childhood, and I’m glad I was able to make one even as minimal as this.

Here’s my full post on this game.

March — No Other Home

dsjChris and I made No Other Home for NASA’s “Dark side of the jam” event that we attended at NHTI. It was pretty ambitious and we ended up taking a bit longer than the initial 48 hours to finish it.

Looking back on it there are a bunch of things I would change to make the gameplay feel better, but overall it’s pretty solid and I love the way the solar system looks.

April — Vanguard Charge

vcVanguard Charge was born from a combination of my frustration with the limitations of Mass Effect’s Vanguard abilities and inspiration from the results of TIGSource’s “Bootleg demake” game jam. The goal was to capture one specific element from a well-known game and present it in a way that feels like a cheap knockoff product. I only spent a few days making this and there’s admittedly not a lot going on, but it’s fun to play and that’s what matters.

May — Bit Cave


Another game jam entry with Chris, this time to celebrate the revival of the Flashpunk forums. I love the atmosphere in this game. The tension between exploring further and staying alive can actually get pretty high, and the caves are unpredictable enough that even I still get lost despite having designed the system that creates them.


June — Gunbuilding


Gunbuilding’s caption on my 1GAM profile reads “The worst misnomer of all time”, and that’s no exaggeration. As a game it’s an abject failure. The gameplay is simplistic, the visuals are terrible, and there’s no way to win or indeed any reason to keep playing. The only redeeming quality this game has is that it allowed me to put my C# port of Flashpunk through its paces and fix a ton of bugs.

Here’s my full post on this game.

July — Slide


I’ve written a lot about Slide elsewhere, so I won’t go into depth about it here. This was a fun game to make because I had to think backwards in order to create puzzles, which gave me a newfound respect for mystery authors and other puzzle game designers. It was received very positively in its initial state and I’m currently expanding it for a commercial release on mobile and desktop platforms.


August — MicroRL

mrlMicroRL is another experiment without much in the way of gameplay. I wanted to take the ASCII aesthetic of classic roguelikes and try to make a minimalist game that felt good to play. Since the systems involved were so limited, I had to use some sneaky tricks to create situations that weren’t explicitly allowed, like having friendly monsters that healed you by dealing negative damage. Overall it’s not especially worth playing, but I’m pleased with the way it turned out.

September — SlangVN


My final pure experiment of the year (yes, that is a screenshot on the left). SlangVN was a testbed for my experimental scripting language Slang, in the form of a minimalist Visual Novel engine. Technically I guess I would call this a success since the purpose was only ever to test the expressiveness of the language, but the result isn’t a game by any stretch of the imagination. The script is pretty nice though.

October/November — Color/Shift demo


Part of my strategy for hitting as many platforms as possible with Iridescence (formerly Color/Shift, formerly Slide) was porting it to the Haxe programming language. This release marked the point where the port contained all the features from the original game and could make use of all the same content. I spent part of the second month porting the game to Linux, which (thanks to Haxe’s cross-platform magic) was almost entirely painless.

December — The Heroes’ Tourney (beta)

thtThe Heroes’ Tourney started in yet another game jam and has gone on to become a serious project that I’m still working on along with the other guys on my team, as well as some new talent. So far everyone we’ve shown it to has had a blast playing and we think we might be on to something good. The official website is under construction here.


Wrapping up…

It’s been fun participating in 1GAM, and I’m really happy with some of the games that came out of it. Looking back on it, though, I wish I hadn’t followed along so rigidly. Some of the months would have been better spent concentrating on more serious projects instead of stressing about meeting the deadline, and I felt more pressure to polish up my experimental projects to submit them where I probably would have abandoned them earlier otherwise.

In 2014 I’m going to participate more casually, following the revised rules which encourage working on fewer projects for extended periods of time. I’ve got a promising solo project and a great team project to occupy my time for the next few months. We’ll see where it goes from there.

Glide update: From()

I made a small addition to Glide, my tweening library for C#. You can now specify starting positions for the variables you’re tweening, useful for when you need to change a variable instantly and then tween back to the default value. I use this when I’m making things flash for alerts or other important things for the player to notice.

Obviously you could just set the values manually before telling them to tween, but this is a nice shortcut if you’re setting a lot of them at once.

You can download Glide here.

Reddit Secret Santa 2013

For the uninitiated, Redditgifts is an unofficial extension to the Reddit community. Every year, thousands of strangers send each other gifts as part of a holiday tradition called Reddit Secret Santa. This was my first year participating. Just like everyone else, I got linked to two other users; one to send a gift to, and one to receive from.

I’m generally a terrible procrastinator, but I got my gift wrapped and sent before the deadline hit. It’s a really cool feeling to send a present to somebody you’ve never met, and I was waiting eagerly to hear news of the gift that was coming for me.

Unfortunately, Christmas came and went with no sign of my Santa. I was pretty bummed out. On the website, I confirmed that I hadn’t gotten a gift and made my peace with it.

A few days later, I got this in my email:


“Who could this be?” I thought. “I don’t have any friends with that name.”

I scrolled down a little further.

Your Secret Santa (Rematch Edition!),
Hi there! This is just a little warm-up present to keep you tied over while I come up with goodies for the main event! Cheers!

The main event? Not necessary. The warm fuzzy feeling I got from opening this email more than made up for the disappointing results of the main exchange.

Then yesterday I got something in the mail.


If you can see past the censors, it’s a box approximately the size of my bedroom. The controller is for scale. It’s the biggest thing I had nearby when this first came in.


Beneath the brown paper was another layer of wrapping. To heighten the anticipation, no doubt.


On top of everything was an envelope…


…with a wax seal on the back. Oh my goodness this is too cool for words.


Look at all this stuff!


An awesome Doctor Who stocking! I think I’m in for a few jealous siblings. It contained enough candy to last me until next Christmas.


A magnetic whiteboard and some custom magnets featuring some of my favorite things.
Clockwise from top right: Snoo the Reddit alien, Adam Jensen from Deus Ex: Human Revolution, my name in fuþorc, the Mark from Dishonored, and Ezio from Assassin’s Creed.
And dry erase colored pencils! Why have I never heard of these before?


The “Family Fun night care package”, consisting of a movie I’d never heard of, a game that we somehow don’t own, and enough popcorn for the whole crew. I’ll be putting these to good use for sure.


A beautiful Hobbit-themed Moleskine journal and the tools required to use it.


And last but not least, a snuggly scarf crafted by Mrs. Claus herself. I’ve never had a scarf before and I was missing out.


My expectations were completely blown away. I’m having trouble articulating just how special this felt. Thank you, Santa, from the bottom of my heart.

Haxe macros are amazing

Here’s a neat trick I discovered today while working on Iridescence.

Haxe has native macros that are very different from those found in C; rather than using a separate pre-processing language, Haxe macros are simply snippets of Haxe code that are run at compile time instead of run time.

In native builds, Iridescence populates its soundtrack dynamically by searching for all song files in the /assets/music folder. On more restrictive platforms like Flash, all assets have to be known at compile time so they can be embedded in the SWF, which meant I needed to create a list of files manually and update it whenever I added a new song. I wrote this little macro to iterate through the music folder at compile time and build a list of song files automatically.