Skip to content

mfpalladino/2DFE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2DFE

2DFE is a flexible level editor for simple 2D games.

Idea

2DFE

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

'F' is flexible

Game running

The result of this arrangement is that you now have a specialized editor for your 2D game. Whatever it is.

Reading the elements in your game

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...
    } 
}

About

A flexible level editor for simple 2D games.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages