Free-form level editorSeptember 3, 2009 at 7:33 pm | Posted in Game development, Level-design, Programming, Python | 5 Comments
The last week or two I’ve been working on a 2D level editor. I can drag and drop images onto it to create free-form levels (beware, placeholder art):
It’s meant for a platformer game, but it’s fairly easy to use the output for a different kind of game. Like, say, a strategy game, or just as a title screen layout file.
On the right side, there’s the bare-bone UI: the layer selection and visibility toggle buttons, the delete-this-layer button, and of course a button for adding layers. The red lines are collision lines – I’ve experimented with that a while ago and it turned out to work pretty well, so I’m migrating parts of my collision-line editor/test program to this new editor. On the right side, you can(‘t) see a hidden layer. The blue lines are the grid – which can be toggled and it’s granularity can be fine-tuned. It’s not used for snapping yet, so it’s mostly there to give me some sense of place and size.
I’m still working on various features, but it’s already a useful tool. I wrote it in Python, using Pygame (for the rendering and input handling), pgu (for the buttons) and pywin32 (for the drag and drop support). It has taken me 4 or 5 days so far, a couple of hours each day. :)