A Map Editor

Posted on
mapeditor gamedev download garbageeditor

I’m not sure that I have an ideal workflow when it comes to creating maps. I doubt I did and even after this map editor; I doubt I do. First, my workflow.

My workflow and the old method

In order to create my simple prototype style maps, I need some way of creating rectangles that will reflect how they will look in the physics world (usually VelcroPhysics). I used to use Tiled Map Editor. Tiled does everything that I need it to do, but getting it done wasn’t exactly frictionless. In order to add a shape, I would have to add an object layer (one time cost per object type). These object layers acted as my palette: Anything in the “Walls” layer would be converted into a wall body in the physics world. First issue is that anything you draw by default does not have any color associated with it. Oh, what’s this! There’s a color property in the object layer. Let’s make the walls a nice green, so I can really see them.

Dramatic Film

It took more time to create that atrocity than I thought it would. As an added bonus, the timing of all the scenes was a lot worse than I imagined. That was fun.

Apparently in order for an object to be colored in the viewing area, it has to have a type. Tiled templates almost seemed to be what I was looking for. I could have set some information in the type field and parsed that information in order to generate objects in the physics world. The problem with this is that color is a layer property, not a template property. Also, for some weird reason you can’t select the layer you want to draw on from the objects tab (which displays a collapsible layer tree with the objects inside). I came to the conclusion that objects were a second class citizen in tiled.

Then came Inkscape

Inkscape seemed to be exactly what I needed it to be. It really was the one time it worked. Symbols were exactly what I’d need. I’d create them and use them as my palette. Tested it out, they retained information and even had a custom description field that could keep Inkscape flexible if I decided to build upon it.

For some reason after that one time that it worked, it just never worked the same again. When I would try to add a symbol, the fields would reset to randomly generated numbers appended to the end of the word ‘symbol’. I would try to change it and the symbols in the palette wouldn’t update. I would select the newest symbol added and it wouldn’t display new information. It was almost as if the new symbol did not exist. Also, when adding it, the object that I generated the symbol from would turn into something else. It’s ID and description would change.

My heart broke, but it was time to move on.

Garbage Editor

The trash

I spent the last couple of days making an editor. Right now it only makes boxes but I think it should be completely usable for my prototypes. I can’t save palettes yet, but I could always code that in.

This isn’t good. I’m wanting to open the release bin so that I could record another thrilling gif, but it’s just crashing without any error. Instant and embarrassing failure.

Apparently I just needed to install nightly templates.

It adheres to my workflow quite efficiently. I can push different types of shapes on there fast. Export them, then easily import them in whatever game and have the shapes be what I need them to be. I don’t think it’s very good for anything outside of a prototype, or for anything outside of placing colliders. If I need it to evolve into placing other polygons or even assets directly, it will. Although, the best thing that could happen is that I find out I missed a piece of software that does what this does but better.

Why Godot

I think Godot is quite a good engine. I don’t think using mono with it is very comfortable. You have to do – Actually, I’ll make a follow up post about small problems that I’ve encountered in workflows and just in general with different engines and tools.

Tl;dr

Tiled is for tiles. I can’t make gifs and would make an awful director. Inkscape is buggy (or I don’t know how to use it). My editor sucks, but it’s ok for my needs.

Download

https://gutterlab.itch.io/garbage-editor