Inkscape as Level Editor

As you’ve probably noticed, I’ve been a bit quiet lately.  I’ve been meaning to make a blog post, but work on the game comes first.  It’s surprising how much time making a good level takes.  I’ve just finished the 4th one and I have a little bit of time left.

Let me talk about what I’m using for level editing in Infested Planet.  I’ve mentioned that I managed to rig the vector art program Inkscape to arrange UI.  Well, I’ve recently made Infested Planet load levels from Inkscape as well.

The process is simple, the map is loaded as a bunch of polygons – that’s not a problem.  I’ve even added the ability to read in cubic splines for extra curviness.  The biggest challenge was reading game objects, since Inkscape has no idea what an Infested Planet object is.

Fortunately, Inkscape allows you to insert custom XML tags.  What I do is hide away some IP-specific data in the art file.  I even store the level scripts in there, just so everything is in the same place.

Here’s the same level in the game:

This works very well.  I don’t have to write crazy editing tools when  should be making the game.  Inkscape gives me a well-developed UI for changing the map and dragging around objects.  Finally, if you really want to, you can use the same tools that I do to make levels when the game comes out.

10 Responses to “Inkscape as Level Editor”

  1. Shane Neville Says:

    That is very cool. How much work is it going to make a level building tool the community can use of inkscape?

  2. Alex Vostrov Says:

    That depends on how fancy you want things to get. If it’s a matter of slapping down a few capture points, it’s easy. You literally copy and paste things onto appropriate layers.

    It’s gets more complicated when you want to tweak things. For example, the campaign has little tip entities that tell you useful hints. To edit the text on those, you have to dig in the XML. And then, if you want to do level scripting, you’d have to know my custom thrown-together script system.

    So the answer is – easy if you’re doing something simple. Slightly more complicated if you’re doing something fancy.

  3. Chris Says:

    It would be nice if sometime before you release IP you would write up a tutorial on how to make levels (and maybe a list of your custom script commands/thingies.) Also having a map contest held to be included within the game would be nice (maps put inside IP.)

  4. HybridMind Says:

    This is great. I’ve seen a few developers use existing art tools as level editors and the concept has always intrigued me. It is something I haven’t tried yet but definitely have kept in mind if I make a larger level based game.

  5. jake Says:


  6. Rakyth Says:

    It’d be fun to get my hands on the ‘level editor’ before the game is released, haha.

  7. Archers Vs Zombies – Dev Log – 03 « Gemserk Says:

    [...] LWJGL irc channel he told me he was using Inkscape for that purpose. I also read some time ago that Rocket Bear Games was using it for as level editor as well but I forgot about [...]

  8. Cuffie Dr Dre Beats Says:

    I also read some time ago that Rocket Bear Games was using it for as level editor as well but I forgot about [...]

  9. Sidar Says:

    How did you manage to read the x and y position of the objects?

    All I see is the matrix transformation D=

  10. Alex Vostrov Says:

    It’s a bit of a trick. I have a prototype layer where all prototypes are assumed to be centred at (0,0). The actual objects are just references to the prototypes.

    You still have to use the transform matrix, but you can just multiply it by (0,0) and get your final position.

Leave a Reply