Free-form level editor

September 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):

19_papernode_editor

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. :)

About these ads

5 Comments »

RSS feed for comments on this post. TrackBack URI

  1. Hey, congratulations on your level editor! Looks great!

    I’m trying myself to make one of those for a 2d arcade shooter I’m working on, but to be honest, I’m a little scared to invest a lot of time on it and “forget” about my initial game…

    I’m working on C++, though. No idea about Python :)

    Congrats on your blog update too! Hehe ;)

  2. I know what you mean – it’s easy to waste a lot of time on technically interesting but ultimately unnecessary things. A while ago I wrote a 2D scene-graph on top of Ogre 3D, in C++, but that showed me how much slower development is with that language.

    So I’m back to Python and haXe (Flash) for this one. ;)

    And yeah, I sometimes forget to update this place, but now I’m working on some things so it makes sense to post again. :)

  3. Will have your suggestions in mind. See you around gamedev.net ;)

  4. Wow it looks great!
    I know nothing about python, but it looks like you can do some pretty cool stuff with it.

  5. lookss sweet! Download link? ^_^


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com. | The Pool Theme.
Entries and comments feeds.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: