2DFE is a flexible level editor for simple 2D games.
Suppose your game has one platform, two enemies and an obstacle. During the construction of the level, the editor should allow you to position these "elements" in the places you want them to appear in the game.
Using 2DFE you can do the following:
- 1-In the same directory of editor, create a folder called "Elements".
- 2-Below the "Elements" folder, create folders for each category of elementsand copy a image that represents that element.
-
Elements
-
Platforms
- Platform1
-
Enemies
- Enemy1
- Enemy2
-
Obstacles
- Obstacle1
-
Platforms
The result of this arrangement is that you now have a specialized editor for your 2D game. Whatever it is.
After that, it will be up to you to read the file generated by the editor in his game. A typical scenario is to build elements factories that are based on the names of pictures:
public static class EnemyFactory
{
public static AbstractEnemy Create (string name)
{
if (name == "Enemy1")
return new Enemy1();
//etc...
}
}