Using Flash CS6 as a level editor.

While making platform games one of the most common tasks is designing and balancing maps. To accomplish this exists many tools, for The Tapping Dead we decided to use Flash CS6.

One of the reasons for this was that we could have full control of the output data and modify the format easily. Flash CS6 already have a UI that we could use, and components with live preview to pass parameters to the enemies when needed, and have these values parsed in the output.

Since the output is XML+JSON it can be used by any language/platform, in the case of The Tapping Dead we are using Air 3.7.

The idea is very simple, we would have a Scene per Scenario and a Frame per Level. The Class will read each frame and will parse whatever is in the scenario, capture it’s size, position and type, format it in XML+JSON (we decided to use XML+JSON to make it easy to edit/debug, I’ll go back to this later) and copy it to the clipboard.

So, let’s take a look at our UI:

Screen Shot 2013-04-20 at 1.59.56 PM

We have everything in it’s own layer (doors, platforms, triggers, enemies and coins) so we can hide or lock stuff and edit easily.

Now, what If we want an enemy to have a delay, or face to some direction? First we used instance names like Enemy2_left_10 then we parsed the name and got the parameters from them. But having so many similar instance names bugged the parser. Instead of this, we choose to make components with live preview, this way we can have all the parameters in the Properties window. Later the parser will just get these values and include them in the output.

Screen Shot 2013-04-20 at 2.07.31 PM

 

This is the class we used to parse our data:

 

 

This is a sample of the output:

 

We decided to have JSON for each level and contain it inside of a XML. This is simply because when editing and debugging files it was easier for us to read the data this way.

That wasn’t the only task we used Flash CS6 for, also we made all the spritesheets there, but that would be another post.

Thank you for reading!