Level Editor 2D

Created for a project named Commander Commandeer, this 2D level editor is fully equipped to create full levels for any kind of 2D side-scrolling game. The editor was made using Windows forms around an XNA project. This tool is great for rapid prototyping of new ideas, as well as creating larger projects.

Incorporation of Entity Component Framework;
Creation of new prefabricated entities to add to the level;
Modification of the texture, position, and size of newly-created geometry;
Saving and loading, along with togglable auto-save feature;
A large variety of sub-systems to enhance the user experience.

The editor was designed to give users the tools with which to create a variety of projects. To accomplish this, the library that the editor depends on is both flexible and non-dependent on each system. The best way to allow for this freedom is the Entity Component Framework. Having an entity that gets its behavior completely from its components allows for an endless combination of functionality. This editor allows the user to create new entities and add and remove these components to create any type of behavior they require.

Creating entities in the level can be as easy as adding a blank entity to the level and then adding desired components. To ease the process, the user can create any variety of prefabricated entities that they intend to place multiple times throughout their level. Once they have created the template for their prefabricated entity, placing it is as simple as shift-clicking on the desired location in the level.

In addition to creating prefabricated entities, the user can also place geometry in their level, by creating blocks and sizing them using the grid system. Once the geometry is completed, they can edit it by resizing each side, moving the position, and, most importantly, changing the texture. This editor allows the user to develop the entire layout of a level extremely quickly, while preserving the ability to expand and add much more detail.

The editor has the ability to save and load all the map files the user wants, and uses XML serialization to save all the entities in the game world. This creates a world.xml file for the user to load in their game. While the user is editing their level, the editor will save iterations based on a few conditions. Some of these conditions include time since last save, using specific tools, and attempting operations on multiple objects.

This was my first attempt at working with windows forms and it proved to be a great way to create a versitile level editor. Using the experience gained from this project, I was able to start working on my 3D level editor and apply all the techniques that worked from this project into the design.