Gamasutra: The Art & Business of Making Gamesspacer
View All     RSS
October 21, 2014
arrowPress Releases
October 21, 2014
PR Newswire
View All
View All     Submit Event

If you enjoy reading this site, you might also want to check out these UBM Tech sites:

How Crimson: Steam Pirates (#1 game on iPad) Was Built in just 12 Weeks.
by Aljernon Bolden on 09/26/11 02:05:00 pm   Expert Blogs   Featured Blogs

The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community.
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.



Crimson ahead of Smurfs at the top of the iPad charts

If you haven’t yet played Crimson: Steam Pirates, download it today and give it a try.  Crimson is a turn-based strategy game and swashbuckling adventure that takes place on, above, and below the Caribbean Sea.  It’s the first game developed by Harebrained Schemes, the first game published by Bungie Aerospace, and it’s what I personally spent my summer days and nights working on along with the rest of the team at Harebrained Schemes.

Crimson: Steam Pirates and the first 8 missions were released free to play for iPad on September 1st, 2011, with additional mission packs available via in-app purchase for $1.99 that continue the original storyline.  The game quickly gained the #1 position in the Free App category on iPad in 8 countries.  It held the #1 Free App slot in the United States for 5 days.  It’s still a top 5 iPad Strategy Game in 38 countries.

The Crimson team at Harebrained Schemes is made up of 7 people at its peak, and we had a total development cycle of just 12 weeks.  We were able to pull this off due to a few key things:

  1. A clear creative vision
  2. Experienced developers and artists,
  3. 99% of the game was built in Lua script using an open source game development platform called Moai

Since the Moai game development platform is free to use with attribution, there’s no reason that other game studios or indy developers out there couldn’t use the same platform to build a great game in Lua on a tight timeline.

In writing this post, I’m hoping other developers will get a sense of some of the decisions we made in building Crimson, how we made use of the Moai platform, and whether similar decisions might make sense for your own games.  If you’d rather just watch a video though, I’ve got you covered there too.  There’s a video interview with Jordan Weisman (CEO, Harebrained Schemes), Patrick Meehan (Creator of Moai) and yours truly that’s worth checking out.

Working with Flash content:

Flash-exported animations of explosions on ships

The art team at Harebrained Schemes prefers to work in Flash, and one of the reasons we choose the Moai platform is that it supported our existing art pipeline.  Most of the animation effects in Crimson: Steam Pirates (turning paddle wheels on ships, explosions, fore ship wakes, etc.) were created as flipbook animations in Flash.  These were then exported via Flash Javascript plugins to texture atlases (as PNGs), with corresponding Lua files containing the time, rotation and the specific sprites to use for each frame of an animation.  The automation worked well for the team, allowing the Flash team to generally work in batches.  They’d start by working up prototype animations over a day or two and the programmers would integrate these into the game.  Once the integration was done, the artists could come back and iterate on the animations and graphics weeks later without any programmer help.  They’d just export all the new work, look at it in game, and then make adjustments and export the art again.

One of the funny things about our use of Flash for art production and the look and feel of the different parts of the game experience is that the ship boarding action combat sequences look a lot like Flash animations on screen, but these are actually done programmatically using MOAIEaseDriver to move the art assets around.  Our art team really didn’t do much tweening in Flash, so when the gameplay called for a Flash-like experience, we built that into the game programmatically instead.

Multi-layer battlefield and rendering:

Gameplay screen showing islands, water, ships and a submarine

The battlefield of air, sea, and undersea is done with just three layers.  Water shimmering effects are done using a combination of a flipbook animation (imported from Flash) and a Moai particle effect attached to the camera.  The submarines are made to look shallow-submerged and deep-submerged through the application of MOAIShaders (partially transparent simple shaders) to the same art assets used when the submarines are at the surface. 

The island terrain is made of four layers altogether.  There’s a cost in runtime performance, as it takes 4 passes to render things and the whole map is stored in memory, but this wasn’t a serious bottleneck.  We thought about moving to a tilemap for the terrain, but decided not to go this route because it worked the way we originally built it and we didn’t have extra time to spare.  Making the change to tilemaps would have reduced the compute time to one pass and may have become necessary if the game had called for extremely large mission maps.

User interface and controls:

Crimson user interface showing touchable regions and information overlay

At first Crimson: Steam Pirates used a sub-thread to poll for input events.  This was fast to code and is a really useful approach for simple games.  Since Crimson has a mouse-like control system for everything except multi-touch zooming, both mouse clicks and touch events were mapped to the same Lua wrappers and triggered the same gameplay logic in the polling loop. 

Eventually, as the game grew more complex, we changed to using onTouch events provided by Moai.  By that point we had dozens of objects on the screen that could receive input and the new event-based code was much cleaner to work with.

Testing on PCs as well as devices

Me with my laptop, and a pink-case-wearing iPad on the side

One of the great things about the Crimson control scheme and Moai’s native hosts for PC and Mac is that from the earliest iterations everyone working on the game could test gameplay on their dev machine (Mac or PC).  We didn’t have to buy a stable of iPads early in development, or a shiny new Mac for each team member.  Plus we saved the 2-3 minutes per developer cycle that would have been spent copying the latest code to the iPad to test over and over again. 

Of course, the iPad was the target release platform for the game, so we put someone on point for game play on the iPad even in the first few weeks.  Toward the end of the development cycle, we were propping builds to iPads 3-8 times each day for thorough testing.

GUI level editor:

Crimson's custom mission design tool

Early in the cycle we decided a graphical level editor would save us a lot of time, and my teammate Gorden Lee built a great one using .Net.  Our designers used this tool to create and tweak levels at will, had a ready overview of how each level was put together and didn’t even have to deal with the Lua script.

Using Box2D physics for motion and collisions:

Box2D physics in use as a dreadnought pushes debris out of the way

In its earliest iterations, Crimson: Steam Pirates used animation splines for animating the motion of the ships, planes and subs.  But this approach left the game with an unnatural feel for vehicle motion.  Near the end of the project we decided we needed more natural-looking motion, and had to scrap the initial approach.  My colleague, Chris Kohnert, came up with a much better solution by using the Box2D physics engine to move vehicles by impulse instead.  In the final game, all vehicles have polygonal shapes (as do the islands), the motion splines serve as inputs to set impulse and forces on the vehicles, and Box2D handles the collisions.  It was tricky to write the code to figure out the appropriate forces to apply to move the ships along the spline path dictated by the UI, but it works well.  To keep the “board game feel” intact, all the objects are reset to an inert state in the physics engine at the end of each turn and are moved again from scratch the next turn. In order to keep a sense of turn-to-turn momentum based on vehicle motion the previous turn, properties are stored for each object (outside Box 2D) that factor into the UI for setting motion paths and the magnitude of the forces that will be applied for motion in the next turn.

LUA and C++:

Lua script shown in a code editor

We programmed everything in Crimson: Steam Pirates in Lua, except for a bit of C and C++ code to integrate the Facebook and FMOD sound libraries.  Everything else about the way Crimson plays, runs, and looks is Lua code driving the Moai Platform.  We love working in Lua because it’s one of the fastest ways to program new features, and we can get more design cycles completed in the same amount of time. 

A custom Moai host for PC:

Crimson intro screen shown in a PC window

Although the reference iOS host was sufficient for the game, we made an enhanced shell for the Mac and Windows PC Moai hosts to let team members snap gameplay screenshots for easy inclusion in the bug tracking system.  This was a minor extension, but it was super useful for team communication around gameplay issues.

Extending the Moai particle system:

Aft wakes behind moving ships, rendered via the extended particle system

We started using particle effects to animate nice-looking aft wakes behind the ships in the game, but the built-in Moai particle effects supported only a single rotation, and we needed a base rotation and an offset rotation from that baseline.  So we changed the source code in the Moai particle system to make this extension.  In the final version of Crimson, all the ships and surfaced submarines have nicely particle-effect-animated aft wakes that render in relation to their motion.

Open source contributions

Open Source Logo

In addition to the updated particle system, we also extended Moai for easier debugging in the final weeks of game polish and testing.  The new debugging features included memory tracking and diagnostics for Lua and texture use, Lua object dumps and leak detection.  The epic win of open source is that we got to make the game just the way we wanted to and create the tools we needed to work efficiently on our own timeline.  Now, every other Moai game developer has a richer particle system and debugging feature set due to these contributions.  We’re looking forward to making use of extensions made by other developers on future titles.


Picking the right partners

Bungie Aerospace Logo

A final big reason we were able to develop Crimson as fast as we did and have it succeed to such an extent in the marketplace was our partnership with Bungie and their Aerospace publishing arm.  Bungie did sound design for the game, tons of testing, and they provided lots of mission and design feedback throughout the process. They were great to work with throughout development and launch, and we really appreciate their support.


Thanks for reading.  Feel free to post questions or comments here and I’ll answer them as best I can.


Related Jobs

Rumble Entertainment, Inc.
Rumble Entertainment, Inc. — San Mateo, California, United States

Technical Product Manager - Platform (Chinese Fluency)
InnoGames GmbH
InnoGames GmbH — Hamburg, Germany

Mobile Developer C++ (m/f)
Treyarch / Activision
Treyarch / Activision — Santa Monica, California, United States

Senior UI Artist (temporary) Treyarch
Treyarch / Activision
Treyarch / Activision — Santa Monica, California, United States

Lead UI Artist


Mike Arcuri
profile image
Great article AJ! I just wanted to post that if anyone has platform specific questions that aren't directly related to the work done on Crimson: Steam Pirates, they can come visit the forums at or email us at "support _at_"

Ted Brown
profile image
This is the crunchy, nutritious stuff I love coming to Gamasutra for! Thanks for writing and posting the article. I'm downloading the game now. =)

Jheng Wei Ciao
profile image
Impressive work!

As a Lua advocator, I'm very happy to see another great game written in Lua. While I write native code in Lua, I guess I'd take some time to investigate Moai platform as well. Thank you for sharing your experience!

Arush Rehman
profile image
Wow! What a great in-depth article. I have to get into Lua scripting now.


Devin Stone
profile image
Great article and congrats on Crimson's success! Moai is what got me into Lua. I highly recommend it!

Aljernon Bolden
profile image
In my haste to knock this out and get back to making more Crimson, I forgot to mention all of the contributions of our partner Bungie who did sound design, testing, and provided lots of mission and design feedback. They have been great to work with, and we really appreciate their support. - AJ

Saul Gonzalez
profile image
Glad to see some recognition of the fact that the number 1 reason you finished the game so quickly was "a clear creative vision". Of course, you failed to mention that most of this creative vision was one shamelessly plundered from the developers of Steambirds. It's easy to develop games quickly when you can reap the benefits from someone else's investments in design and iteration.

Brent Disbrow
profile image
I'd suggest that this is a bit of an unfair comment given that Spry Fox's title arguably took the mechanics from the Wings of War boardgame and made them into a game. Is it really relevant where the inspiration came from when the games (Steambirds & Crimson: Steam Pirates) are both solid, fun titles?

By the way, nice article breaking down the game creation, AJ!

Saul Gonzalez
profile image

1) Spry Fox spent considerable time and effort adapting the mechanics to the videogame medium. Harebrained Schemes did not.

2) There is a line between inspiration and ripping off. The line is arguably blurry, but the majority of people who know about both games agree that Crimson is firmly on the wrong side. It is very relevant because discussing the game's development without mentioning the elephant in the room is dishonest at best and whitewashing at worst.

Brent Disbrow
profile image
My apologies Enrique, I did not realize what a kerfuffle this all was.

That said (devil's advocate for a moment), I'm still not sure why it's relevant that they acknowledge Steambirds. I enjoyed how they extended the control mechanic that Steambirds established. If the problem is a lack of acknowledgment in the postmortem, then nobody should write FPS postmortems anymore because FPS games have standard mechanics that are common amongst the games but they don't spend time acknowledging the initial developers. Arguably you could say that about any genre game. Isn't this a similar case?

Saul Gonzalez
profile image
No offense taken Brent.

I understand you're trying to throw the Harebrained guys a bone here, but one game does not a genre make. If Crimson were a sincere effort to produce a new take on the mechanics introduced by Steambirds, then yes, we could be talking about the birth of a new genre or sub-genre here. However many things about Crimson, starting with the inclusion of the word "steam" in the very title, point to it just being an attempt to making a quick buck at the expense of others' creative work. If I were to ape a groundbreaking game's mechanics, I would at least have the decency to choose a radically different theme.

To make my point clear, my biggest complaint is not with the article, but with the game itself and with the idea that blatant cloning is acceptable. The article's lack of acknowledgement, while expected, is just salt on the wound.

Alberto Fonseca
profile image
Great article but I agree that some discussion or at least mention of Steambirds as your starting point would be needed to make this complete.

v c
profile image
I too am curious why Steambirds (the game developed by Spry Fox and seemingly somewhat copied for Steam Pirates) was not mentioned in this post mortem.

Andrew Ewanchyna
profile image
Spry Fox didn't invent this mechanic. A game called Critical Mass by Sean O'Connor did it years earlier and there are probably even more earlier examples. It is obvious that the word "Steam" and the actual look of the movement interface was inspired from Steambirds but so what. I consider Steam Pirates a more enjoyable game. Isn't that the point.