A simple level editor


This week I've been working on a simple level editor in order to speed up the creation of levels. In this video you can watch a little bit how it works.

Level editor

I can set the size of the board, where the player and end square are, and place the enemies around. As for the enemies, I can also specify the path they'll follow, and whether they should loop over the path or they should stop at the end. Finally, the level is saved to a JSON file to be read from a level manager class. It's not beautiful, but it works for my purposes.

If I have some more time I'll share a bit of how I made this editor, should it be helpful for other developers aiming at something similar.

My next goals are the following:

  • Read the level JSON from the game.
  • Failure condition, i.e, detect whether enemies "collide" with the player.
  • Winning condition, i.e., detect whether the player reaches the final square.

After getting these things done, I'll be ready to make a bunch of levels and make further design decisions. The most important ones are:

  • Should I set a limit to the number of times the player can move?
  • Should I make the player move between some special squares, instead of freely? That is, I'm thinking that maybe all paths should finish in a specially-marked square in order to force the player to think through every movement.

Leave a comment

Log in with itch.io to leave a comment.