A quick update on some Tileset settings that are now supported in Tiled2Unity. (With thanks to readers alerting me to such shortcomings.)

Note: You can download the newest version of Tiled2Unity here.

Alpha Color Key Support

Previously, the shader used by Tiled2Unity on the Unity side was dependent on the alpha channel of textures alone. Old-school games have a history of using a color-key for transparency though so I’ve followed the lead from Tiled Map Editor to support this in Tiled2Unity.

Tranparent color Tiled supported in Tiled2Unity

Note that in Tiled2Unity you can use both the transparent color and the alpha channel in the same Tileset/texture. You don’t have to go with just one transparency scheme.

Tilesets Made From Collection of Images

Tiled gives you the ability to create a Tileset from a collection of images. I always work with Tilesets where one image contains many tiles and didn’t even know this feature existed.

Tiled Tileset from Collection of Images

This is now supported but a word of warning: This will increase the number of textures and meshes in your Unity scene. I think it’s worth supporting for prototyping or the odd Tileset but as a rule you’re better served by grouping tiles into larger textures.


Update: Most Tiled2Unity users will want to use the newer vertex scaling feature to scale their Tiled maps.

Tiled2Unity Scaling

A couple of weeks ago I released my free Tiled2Unity Utility, allowing developers to export their old-school and tile-based environments (built with Tiled Map Editor) into Unity with (one hopes) relative ease.

You can download the Win32 installer or zip file for Tiled2Unity from the Download Page.

Some of you requested a feature to control the scale of the prefab objects exported by Tiled2Unity, especially give that sprites in Unity2D projects default to a completely weirdo coordinate system where 1 pixel is equivalent to 0.01 units in Unity.

A short note on this: Unity uses Box2D behind the scenes for the physics engine. Box2D is great but it isn’t well suited for pixel-perfect retro game development in my opinion. Our retro games want to work with pixel units where our characters are some 24 or 48 units high and moves some 100 or 200 pixels a second. Box2D wants to work with real-world units where a given character is 1 or 2 meters high and is moved my Newton forces. I feel getting NES-era 2D platforming out of a modern day physics engine is not worth the headache but your mileage may vary.

But I digress. The point being, an important goal for Tiled2Unity is that your generated prefab, once exported from Tiled, is ready to go into your scene without further edits.

So for people that wish to use Tiled2Unity on projects with sub-pixel coordinate systems here’s how you can easily set up your Tiled maps to scale appropriately. Note: This will require you install the newer version of Tiled2Unity (

So You Want to Use Physics2D

Let’s say we’ve got the first lady of video games, Samus Aran, in your Unity project and you’ve imported the sprite with the default Pixels To Units setting of 100.

Samus in Unity

With this, we have a sprite image that is 26x43 pixels but has dimensions of 0.26x0.43 units in your Unity project. Using the minimalist-collision.txm Tiled map from the Tiled2Unity example as-is we’d end up with an exported background that is 100 times too large for our sprite to inhabit. Here she is between two blades of pixel grass …

Samus between 2 blades of grass

Setting the Scale in the Tiled File

We could just scale down the prefab we created by hand in the Inspector within Unity but I don’t want to do that every time we export the Tiled map. Instead, we’ll set a property within the map once …

Map property, unity:scale

unity:scale 0.01

Now when we export the Tiled map, our Tiled2Unity Utility looks for that unity:scale property on the map data (Tiled2Unity will complain if you try to scale layers or objects, btw) and the automatically created prefab will have the appropriate scale value assigned to it.

Once re-exported, here’s the final scene with Samus resting on collision geometry with sprite and background using coordinate system values of the same magnitude.

Samus and Environment at Scale

BTW, there are other properties you set in your Tiled map file that control the way your prefab is constructed.

  • unity:sortingLayerName
  • unity:sortingOrder
  • unity:layer
  • unity:tag

I’ll cover these soon in another post. In the meantime I’m happy to take suggestions for improvement.



(Note: ‘Minimalist’ example artwork is attributed to Blarget2 via OpenGameArt.org)

If you’ve been working on a 2D tile-based game in the last couple of years then there’s a decent chance you’re familiar with Thorbjørn Lindeijer’s excellent Tiled Map Editor. It’s what I used when creating the maps for Mega Man in Unity and I’ve now retooled and de-hacked my Tiled-to-Unity exporter (called Tiled2Unity Utility because naming things is hard) for general consumption by my fellow game developers  – free of charge under the MIT License. I sincerely hope others find it useful.

You can download the Tiled2Unity Utility from the Download Page.


  • Builds a Unity prefab out of your TMX map file
  • Supports all TMX layer formats (XML, CSV, Base64, gzip/zlib compressed)
  • Multiple layers and tilesets supported
  • Exports Object Layer as polygons, polylines, rectangles, circles
  • Tile Layer collisions supported (with slopes, odd-shaped polygons)
  • Polygon colliders can be concave, have holes, and be composed of separate polygons
  • Can assign Tag, Sorting Layer, Order in Layer, and (Physics) Layer of exported GameObjects through properties in Tiled
  • Support for customized creation of Unity Prefabs
  • Easy to use: In most cases, you simply export a TMX file into your Unity project and place the automatically generated prefab in your scene – no further edits needed


  • Orthographic map support only (Isometric and hexagonal map support in version
  • Ellipse objects are ignored unless they are circular (there is no ellipse collider in Unity)
  • Object rotation is currently not supported (Object rotation added in version
  • Tiled2Unity only runs on Windows out of the box (Prefabs exported into Unity will work on all devices though) (Note: See comments section here for support on other platforms)

Note that I made a purposeful decision not to support isometric maps*. It adds far too much complexity for something that I think is a bit of a hack. I feel orthographic maps should be used at all times and the illusion of top-down or side-scroller or isometric should come from the art, not some weirdo coordinate system. (Your mileage may vary but it’s not like the Nintendo Entertainment System had an isometric mode.)

*(Edit to add: Okay, I relent. Isometric and hexagonal map support has been added as of version

Tiled2Unity Uses Newer Features of the Tiled Map Editor

In order to assign collision data to tiles you will need to use the new Tile Collision Editor in Tiled.

Tile Collision Editor Menu Item

This Tiled feature is currently in beta* so you’ll need to get a version of the program from the daily builds here: http://files.mapeditor.org/daily/

For my development and testing I’ve used the May 23rd, 2014 build. (Builds older than April 24th, 2014 will crash if you have collision data in external tilesets.)

*(Edit to add: Not in beta anymore. Just download latest version of Tiled)

Getting Started with Tiled2Unity

Before you begin exporting Tiled data into Unity, your project needs to be aware of how it will import the *.unity2tiled.xml files that Tiled2Unity spits out. The scripts for this are part of the Tiled2Unity.unitypackage file found in the install directory.

There are two ways to import this package into your Unity project:

  1. From the Tiled2Unity install folder: Double click on the Tiled2Unity.unitypackage file
  2. From within Tiled2Unity: Just select the “Import Unity Package to Project” menu item

Import Tiled2Unity Unitypackage

In both cases, Unity will take you through the steps of installing the package into your Unity project. There’s a number of scripts and folders here. You’ll need them all.

Import all items

Now we’re ready to export some Tiled maps into Unity.

Using Tiled2Unity Examples

Your Tiled2Unity install contains a couple of TMX file examples. We’re going to open the minimalist.tmx file in Unity …

Minimalist map

We don’t need to run Tiled in order to export a TMX file into Unity, but I’ve set up a command in Tiled that will run Tiled2Unity for me.  This allows me to make my map edits in Tiled and then quickly export to Unity by pressing F5.

Setting Tiled2Unity command in Tiled

"c:\Program Files (x86)\Tiled2Unity\Tiled2Unity.exe" %mapfile c:\MyUnity\Test

The command is made up of 3 parts:

  1. The path to your Tiled2Unity install
  2. The %mapfile macro (this will be the same for all users)
  3. The path to your Unity project (you can leave this blank and use the Tiled2Unity GUI instead)

Hitting F5, now Tiled2Unity pops up with our map already loaded and ready to export to our Unity project …

Running Tiled2Unity from Tiled

Now, pressing the Big Ass Export Button will export an XML file (in this case, minimalist.tiled2unity.xml) to our Unity project where our importer scripts will create the meshes, textures, and materials needed and roll them all up into a prefab named after our TMX file.

Minimalist map in Unity

Now we can place the prefab into our scene hierarchy. (If our map was to be purely decorative then we’d be done.)

Minimalist prefab placed in scene

Adding Collision Geometry

Chances are most maps we make in Tiled for use in video games will require some collision geometry on them for sprites to interact with. Other solutions I’ve found on the internet or the Unity Asset Store require you to hand-place collision objects by hand in Tiled which I think is a total PITA. I’m going to show you how we can easily add complicated collision geometry (with holes, slopes, concave shapes, etc.) to our tile layers that are exported to Unity as PolygonCollider2Ds.

With Tiled still open on our minimalist map, bring up the Tiled Collision Editor an add a Rectangle or Polygon object that fully encloses the solid dark grey tile of our mini-tile tileset …

Add collision to tile

Let’s leave the other tiles alone for now and see how we’re doing. Press F5 again to bring up our Tiled2Unity exporter and press the Preview Exported Map button to see how the geometry would appear in Unity …

First collision preview

Here we can see how the geometry of just one tile will be combined into a polygon collider as the tile is repeated throughout the map. Note that, in the resulting collision mesh, there is actually four shapes here — two of which are rather awkward. Except for not matching the visuals, that’s actually okay, the PolygonCollider2D in Unity would handle this fine.

Let’s go back to Tiled and add polygons to our sloped tiles …

Adding sloped collision

(I recommend that Snap to Grid and/or Snap to Fine Grid is enabled when placing polygons in Tiled)

Previewing again we can see how sloped geometry will be added to the collision mesh …

Second preview

Again, this geometry could be exported into our Unity project and the PolygonCollider2D created from it would just work.

Going over all our darker tiles and adding polygons/rectangles I get a final preview that I’m pretty happy with …

Final preview

The best part of this is as we edit the map the collisions assigned to each tile move along with them. You add the geometry to your tiles once, create all the map data you like, and let the exporter take care of the rest.

Here’s the final exported prefab with our PolygonCollider2D in Unity …

Map with collision in Unity

And there you go, a 2D tile-based map, authored in Tiled, with collision, in your Unity scene.

Find any bugs? Is something not working as expected? Got a feature request that makes sense and won’t kill my social life? Feel free to email me.

By the way, the magic behind this polygon construction is courtesy of Angus Johnson’s exceptional (and open source) Clipper library. In my opinion, layer collisions is the most essential feature of Tiled2Unity and Johnson’s Clipper library worked for me the first time I tried to use it. C’est Magnifique! *kisses fingertips*


Mega Man in Unity

by Seanba on March 16, 2014

Mega Man in Unity

After shipping Epic Mickey 2 (and before the heartbreaking closure of Junction Point Studios) I had a couple of months of comp time to unwind and sharpen the saw a bit.

I decided to spend my some time during that break getting to know the Unity game engine.

To be honest, I had to fight some strong biases in starting that exercise. I’m not sure how widely known the following sentiment is, but for programmers in big-budget, high-end AAA game development the idea of using an engine like Unity is considered weak sauce. Better to spend your time in C++ learning more about concurrency and data object model programming.

But I’ve been longing for some technology to help me prototype gaming ideas quickly and it sounded like Unity was the best contender.

I also decided that this would be the first time in my double life as a hobbyist game programmer that I was actually going to finish something. To that point I chose a beloved game from my childhood and decided to remake, in part, the original Mega Man from the NES golden days. I figured my love for the franchise would help get me past the eventual malaise that smothers every hobby project of mine once real life kicks in.

I’ve just recently finished the exercise and you can play the game in your browser here …

Mega Man in Unity

Only Cutman’s Stage

Like most old-time gamers I’ve spoken to, my experience with Mega Man started with Cutman’s stage — so that is the focus for this game. Other limitations on this Unity-powered game include …

  • Mega Man has no additional powers from any Robot Masters. The Mega Buster is his only weapon.
  • Enemies do not drop powerups, free lives, or any other items.
  • There is no scoring.

Obviously this is not a complete Mega Man game but fans of the original title will hopefully appreciate the 10 minutes or so of oldschool gameplay.

And fellow hobbyists might appreciate that this was accomplished with the free version of Unity.

Some Assembly Was Required

Still, with Unity being a 3D engine there were two important technologies I spent time on in order to display 2D assets:

  1. Sprites: I used the freely-available SpriteManager utility for sprite animation. In addition, I wrote a utility that took animations from GraphicsGale and generated code and data for each sprite.
  2. Tile-based Maps: I wrote a utility that transformed map data from Tiled Map Editor (a great little program for 2D enthusiasts, btw) into a Wavefront OBJ file that could be imported into Unity.

Ironically, I finished this project just as Unity 4.3 was being released so there’s a good bit of work here (especially with the sprites) I was planning to use for other titles that is now obsolete. That’s okay though as I’d much rather see sprites being first class citizens within Unity anyhow.

Was it Time Well Spent?

I started this project in December of 2012 and within a couple of weeks I pretty much had everything in place, with Mega Man running and jumping around Cutman’s level and a couple of the enemy sprites doing their thing. I was (and still am) pleased with how easy it is to work with Unity, even when you are trying to do something that game engine wasn’t really built for, like 2D sprite-based gaming.

After that short time I could have (and maybe should have) moved on to something original as the exercise of “learning” Unity was accomplished — but what I can say, I love that little Blue Bomber dude. I had fun with this.

How long did this take? It’s hard to say as I don’t do project management on my hobbies (what a depressing concept!). Yes, I started this nearly a year-and-a-half ago, but man, I also had to layoff some 30 of my closest programmer friends, shut down a studio, and find another job in that time as well. I only worked on this in spurts. Now, I’m just happy with the end result and I’m eager to focus on something else with my spare time. I hope some Mega Man fans give it a try and enjoy a small piece of nostalgia too.

And as far as Unity goes: I use it for all my hobby game programming projects now. I’d like to see the 2D components mature some more (Unity 4.3 is a great start to that) but overall I can’t think of any other (free) game engine that comes close to this one.

NOTE: I feel I should apologize for the occasional jittery scrolling and screen tearing in the playable Unity game. This appears to be an issue with the Web Player that other developers struggle with and as far as I’ve researched there’s no easy solution. If I’m wrong, email me the details. I’ll gladly fix it.


I’m embarrassed I didn’t realize it would be a problem until after the game was complete as I should have tested on the Web Player throughout development. That’s a total rookie mistake there.


Note: The guys at 1 More Castle came up with a great idea: a day of blogging completely devoted to the review of games, new or old, retail or indie, that we may consider great. It’s an exercise of positive reflection on the titles that make us the gamers we are.

They’ve deemed April 8th to be international Review A Great Game Day. Dozens of such articles are available on their webpage now … and more are coming. I highly recommend a visit.

Below is my entry focused on a game that I hold dear. (Naturally, I waited until the last minute to write it.)

Double Dragon II: The Revenge: The Review

Title: Double Dragon II: The Revenge
Developer: Technos Japan
Publisher: Acclaim Entertainment
Platform: Nintendo Entertainment System
Release: January, 1990
Genre: Beat Em’ Up

The original Double Dragon game was something that completely blew my mind when I first saw it in arcades back in the late 1980s. When it became available for the Nintendo Entertainment System I saved up for months to bring it home.

On that day, my brother and I rushed into the house, ripped off the plastic, blew as hard as we could into the cartridge slot and then … what the hell is this? No cooperative two-player?

Thank god that years later Technos Japan would redeem the series with what I consider to be one of most essential games of any NES collection: Double Dragon II: The Revenge.

Cooperative Play … and Much More

Double Dragon 2 is of the rare breed of games that can be enjoyed both with a friend or solo – even by today’s standards with games like Halo or Gears of War.

Double Dragon 2 (Two Players)

Equally impressive, especially for the time, is the rich repertoire of moves available to the player. Fans of the series will enjoy the feature that Double Dragon brought to fighting games: The ability to grab your opponent by the hair or collar and whale on them. Yet even here you have several choices at your command: You can kick the bad guy repeatedly, you can toss him over your shoulder, you can elbow drop, and you can “upper kick” – my favorite move that launches your opponent upwards – hopefully into some environmental hazard.

Additionally, Double Dragon 2 introduced a number of well-timed super moves. I never grew tired of jumping into a cyclone kick, landing, and then following up with a high-jump kick …

… that is, if I could pull it off …

But There Are Frustrations

For its greatness, Double Dragon 2 does manage to be an unfairly punishing title at times. The biggest complaint is, sadly, the controls. Being on the NES, the developers had no choice but to somehow map 3 actions (left attack, right attack, and jump) onto 2 buttons. The choice of making jump a simultaneous A + B button press was unavoidable but I often can’t get the timing down right.

For the most part, this is a forgivable flaw, but when combined with the areas of the game where you are expected to platform it becomes a controller-smashing-inducing experience.

Meant to Punch

On many play sessions (yes, with my kid brother) it was these areas where the game broke from its true design (Platforming?! In a fighting game?) that kept both of us from seeing the game through to its end. I don’t mind losing when I have a lack of skill or I make a poor decision but stuff like this can be a real drag.

Still Great Fun

But when focused on fighting it’s difficult for me to think of a better game in the genre. In addition to your fists and feet it can also be fun to have the environment finish off your opponents instead. My favorite is timing my movement and attacks to ditch enemies out of a flying helicopter in Mission 3 – Battle in the Chopper but there are plenty of other ledges and spikes throughout the game that can do the work for you.

Double Dragon2. Off the ledge!

These are the kind of gameplay elements that would make great achievements or trophies on today’s consoles and makes me wish that publishers would take more care in re-introducing us to our best-loved games from another time. Emulation on Virtual Console, PlayStation Network, and Xbox Live Arcade is one thing but I’d love see faithful recreations that give us something more (like online co-op) and Double Dragon 2 would be a great guinea pig for such an experiment.

Until then, I’ll just have to bring the original Double Dragon 2 cartridge (Game Over Videogames is good retailer to find one) to my brother’s house. Too bad he still lives up in Canada, the hoser.


Yeah, yeah, the title is a bit cheesy. (I was originally going to go with “The Galaxy is at Peace with Super Metroid Symphony”.)


This past Tuesday, Black Robinson delivered a synthetic symphony love letter to Metroid fans to mark the 19th anniversary of the Super Metroid release in Japan. I’m a big fan of retro video game music and this now tops out as my favorite album in the genre.

I remember vividly playing Super Metroid for the first time and being totally blown away by the prologue with Samus Aran blinking behind her visor and, my god, the music from that portion is covered in this album in a way that just brings tears to my eyes.

Super Metroid Intro

Thankfully, Blake recreated every single piece of music from the game so every fan can joyfully reflect on their own favorite memories from Super Metroid. It’s hard to believe that just one dude was able to pull off. It’s a tremendous work of art and a labor of love on his part. For video game music fans it simply doesn’t get any better than this.

The album is available on iTunes for the completely undervalued cost of $9.99. I bought it again on Loudr for my gamer geek brother today, setting my own price of $20, not because I’m a nice guy (I am) but so I can share something awesome and, hopefully, do my little part to encourage Blake to give us some more great music.

I’m just blown away by this. It’s excellent.

Super Metroid Symphony by Blake Robinson


A couple of years ago I decided to move all my hobby source code from my local Subversion service to an online service.

My needs were pretty simple:

  • Interface locally through a Subversion client (like TortoiseSVN)
  • At least 500MB, but the more the better
  • Private, with SSL encryption
  • And, like my email, free

Assembla was highly recommended by peers, but wasn’t free, so I went with something else that fit the bill. Since then this service moved their ideal free, private, secure, 500MB, ad-free package to a less attractive free, private, non-secure, 200MB one – and with badly aligned, eyesore advertisements to boot.

Not that I can really blame them, mind you. They do need to make money, and it’s not like I program for free (at my day job anyhow). So no hard feelings.

But it turns out that Assembla is now offering a free plans so I’m trying them on for size. Their free SVN hosting is private and secure – and currently comes with a 2GB data store which is more than enough for my hobby projects that tend to be heavy on code and light on artistic resources.

It’s early into my relationship with Assembla, but at first blush I’m impressed with how easy it was to create a new repository and start adding code to it. I also appreciate their online dashboard for being well-designed, clean, and functional. You’ll see some ads there, but they are respectfully out of the way.

We’ll see how it goes, but so far so good.


If you’ve worked as a game developer in Austin for the past 5 or 6 years you’ve no doubt heard the buzz: Austin game dev is in a bit of rut.

But with such a strong showing in 2010, I’m calling it over.  After years seemingly dominated by cancelled titles and studio closures it feels like we’ve hit our stride. It was a great year.

Note: It’s possible in my roundup that I may have missed some key releases from Austin talent. Let me know and I’ll fix that (and my apologies in advance).

Comic Jumper

Comic Jumper 

Twisted Pixel Games moved to Austin just two short years ago and have already shipped 3 high-quality games, including this year’s Comic Jumper. These guys give me the impression they really love their work and don’t take themselves too seriously.

I don’t even question a purchase from this studio anymore. If they make it, I buy it.



If I was forced to pick a favorite, and I wasn’t clichéd enough to pick my own game, then Darksiders would probably be it. Vigil Games took some knocks for borrowing gameplay elements from other titles, but I think we need more games that are heavily influenced by The Legend of Zelda and The God of War. I really enjoyed it. Great story and voice-acting too.

Disney Epic Mickey

Disney Epic Mickey

The game I shipped this year, and proud of it. What I love best about Disney Epic Mickey is the union of “game I want to play” and “game my kids want to watch me play”.

We’re having a great time together with this – except for that one time I got lost and my youngest daughter yelled, “I’m bored, let’s play Mario!” Looks like I’m only sending one kid to college. Let’s see how bored she is then.

Donkey Kong Country Returns

Donkey Kong Country Returns

I’ve got to give Retro Studios credit for keeping this one under wraps for so long. I had no idea they were working on Donkey Kong Country Returns until they announced it at E3 alongside Epic Mickey.

It’s another strong showing from Retro Studios, which has been giving Austin solid game dev cred all decade.

Star Wars Force Unleashed II (Wii)

Force Unleashed 2 (Wii)

From what I’ve heard, Red Fly Studios made the Wii version of Star Wars Force Unleashed II – a separate game from the Xbox and PS3 offerings – from scratch in the timeframe of one year. And I’ve read more than one review that says this version was better than the HD versions, which certainly had many more resources thrown at them. Most impressive.

This is the only game I haven’t played yet, which is horrible since so many good friends worked on it. I’m going to have to do something about that soon.

And The Rest …

And the restCertain Affinity collaborated on the development of Call of Duty: Black Ops. Although the game is primarily developed in California by Treyarch, it’s got to be a big deal for Certain Affinity to have worked on the most highly anticipated and best-selling game of the year.

And I’m sure there was a lot of solid new iPhone, Flash, or Facebook game apps developed in Austin this year but I have to apologize for not having that on my radar.

But in this space I will take special notice of Spacetime Studios’ game, Pocket Legends. I worked at Spacetime for a short while before coming to Junction Point / Disney. They’re a fun bunch of smart developers – and it sounds like they’ve had a great year with their mobile MMO. That they’ve been able to tap into that market so quickly is a testament to their technology and culture.

Congrats Austin Developers

With all this great (shipped!) software there’s no doubt 2010 was a bit of a rough ride for many. I hope my peers found the challenges worth it and are looking to continue improving and growing for 2011. And let’s find a way to get these suckers out the door without working such crazy hours, eh? I’ve got kids now, you know?

Congratulations on a terrific year, and thanks for making Austin a cool place to live and work.

{ 1 comment }