Creating a Map Editor

The design of a level is really what makes the game fun, and a level designer typically edits and tweaks any particular level an immeasurable number of times. When you're making a game with different levels, you're going to want the map-creation process to be as easy as possible. It can quickly become tedious to edit maps by hand in a text file. Plus, if you have someone acting as a level designer for your game, you want the map-creation process to be as streamlined as possible so you don't have to spend a lot of time on support and training. You should try to let level designers use the tools they want to use. If they want to use tool X, this might mean you'll just have to write a parser to read files created by tool X, or you'll have to write a converter to convert tool X files to the file format used by the game. However, if the level designer wants to use the latest ultraexpensive, do-everything cool 3D tool, hobbyists who can't afford the tool will be left out. So, you might want to consider creating a free, easy-to-use map editor so that anyone who wants to can create and edit maps for your game. A free map editor would be specific to your game and allow someone to easily edit and create maps, including placing objects and possibly editing simple scripts. You don't need to provide an editor for things such as 3D objects or textures—those can be created in external programs. Creating a free map editor has several advantages:

  • It's easy to create levels and thus easy to extend your game.
  • It's easy for other people to create levels. You don't have to spend lots of time on support or training.
  • Releasing an editor helps build a user community around your game.
  • User-created content adds variety and re-playability to your game.

If you decide to create a map editor, you'll want to make it as easy to use as possible while providing every possible option in the game. You might want to provide the following in the map editor:

  • Provide an easy way to design the environment, whether it's 2D or 3D. Think about how easy it is to build roads in SimCity or houses in The Sims.
  • Provide an import function to import 3D graphics formats.
  • Provide a media library to store textures and sounds. Media could easily be added with drag and drop, and level designers could use drag and drop to place textures into the environment (walls, terrain, and so on).
  • Provide a "common structure" library to store commonly used environment structures. Level designers could store things such as a common "elevator room" or winding hallway.
  • Provide drag-and-drop placement of environment effects, such as lighting.
  • Provide drag-and-drop placement of game objects.
  • Provide a method to easily tweak game object properties.
  • Provide an easy interface to add scripting to any object.
  • Provide a preview button that shows what the map looks like in the game.
  • Provide a launch button that automatically launches the game with the map the user is working on.
  • Provide an automatic deployment button that puts all the necessary files for a game in one place.

For a Java game, you'll probably want to implement a map editor using the Swing UI toolkit so the editor will be flexible and cross-platform. While you're making an editor, don't forget about common app commands such as cut, copy, paste, undo, and redo. NOTE Sometimes editors are so fun to make that you spend more time creating editors than creating the game itself. Be sure to budget your time wisely.


Screenshot


   
Comments