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.

Preorder Infested Planet



November 12th, 2010 at 8:32 pm
That is very cool. How much work is it going to make a level building tool the community can use of inkscape?
November 12th, 2010 at 8:55 pm
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.
November 13th, 2010 at 6:37 pm
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.)
November 14th, 2010 at 6:04 am
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.
November 15th, 2010 at 7:30 pm
OMG THIS GAME IS GOING TO EPIC
November 21st, 2010 at 9:25 am
It’d be fun to get my hands on the ‘level editor’ before the game is released, haha.
April 28th, 2011 at 8:16 am
[...] 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 [...]
July 26th, 2011 at 12:29 am
I also read some time ago that Rocket Bear Games was using it for as level editor as well but I forgot about [...]
October 2nd, 2011 at 6:46 pm
How did you manage to read the x and y position of the objects?
All I see is the matrix transformation D=
October 2nd, 2011 at 8:55 pm
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.