When people think of sitting down to program a video game, the first thing they think of is spraying all of their most awesome ideas all over the keyboard and seeing the finished product pop out including all of the not-so-awesome stuff. What they might fail to realize is that one of the first steps is creating a level editor. Actually, there’s a step before that: Writing a game design document. And a step before that: Picking the tool you want to use, and learning how it works.
Let’s pretend you already know how to use the tool you’ve chosen to develop with (I use Microsoft Visual Studio and XNA). You already know the technical limitations, and you at least have a rough idea of how to implement the different features you want in your game. Great.
You’ve also create a game design document that outlines almost everything about your game in plain English (except where you describe methods to implement features from a design perspective).
The fact is, if you start to create your game without creating a level editor first, you’re putting the cart before the horse. Unless your game is very simple (boring), then you’re not going to want to manually create the level data – you want some software that does it for you. If you’re using a tool that includes a map editor, great. Except you’re stuck with whatever features the level editor includes, so it’s not so great.
For my project, I needed a custom level editor because, except for the foundation of the game engine, I’m building everything from scratch. The lighting system alone will require that the level editor be written from scratch.
I chose Java Swing because it’s a good balance between ease-of-use and power. You can quickly prototype a GUI application in Swing, and within a day or two have something to show for yourself, as I’ve done today over the course of about three or four hours. Check the video:
It’s a rough form, it doesn’t save, or load, or any of that but it already includes drawing capabilities (the only thing I was really worried about being able to do with Swing).
The point is, the editor is very important. Each “map” that’s built with this editor is going to contain mountains of data, not just including what tiles go where. The editor will handle layers, include enemy data, links between maps so the player can move around, and have various triggers and events and all of that. Hand writing all of that data wouldn’t work for a small map let alone anything large and complex.
If you want to create an indie game, make sure you’ve got the level editor covered. It’s really the work horse of your design once you’ve got the basic gameplay down and it helps you get something up and running to test right off the bat.