To create the levels for my various 2D game projects I created a 2D level editor. It was originally created in Flash and later ported to Unity3D and integrated into the game Gunnihilation, allowing levels to be created and played smoothly within the game.
The editor has two primary components:
Tile Map Editor
A Tile Map editor which automatically paints Tile patterns.
The Entity system was designed to be as generic as possible, so that adding new entities and all their customisable settings would be quick and effortless, and any potential entity type could be added, allowing the system to be used for multiple different games (as long as they were 2D).
Entities were linked by simple trigger links and name based references. Every entity has a trigger condition and a list of targets it will trigger when that condition is met. This allowed for complex entity linking, with trigger volumes firing timers, counters, enemy spawning, moving geometry and game events such as particle emitters, screen-shake and entering/exiting cutscenes.