I am currently in the process of making the editor for Ninjah 2, while I will be using the editor to make the levels for the game myself, I also intend (hope) others will use it to make their own level packs too. With this in mind I figure I have to put quite a lot of effort into making the editor as user friendly as possible.
The level editor for the original Ninjah game was fine, but the actual game mechanics were very simple so you didn’t need anything clever editor wise. N2 is going to be a bit different because there will be lots of different active objects. The only active objects from the original game were coins (that needed collecting to open the level exit) and they didn’t actually need much in the way of configuring. I’ve already got about 10 different items for N2 and I’ve no doubt I will add more.
Anyway, I spent a fair bit of last week working on the level editor and it’s difficult. Making level editors is difficult. My intentions were good, months ago I had left myself a message on my whiteboard (well, a google document I call the whiteboard) telling me to use Gridpapr to build layout templates. When it came to actually using it for the tools I needed it quickly became obvious that it wasn’t going to help.
For whatever reason I was completely reluctant to use some sort of Button class to handle … well, clicking on buttons. I was doing some really stupid and pointless mathematical checks to determine “well if they clicked here, they were clicking row 3 column 7 which means…”. If I wanted to move these “buttons” I’d have to do a lot of recoding. It wasn’t flexible at all either, it was stupid, actually stupid.
I am quite happy to say that I now have a proper button system that lets me have text buttons, image buttons and whatever else I want to extend from that. It’s such a minor thing that I am sure pretty much every other developer does without thinking, but it’s a first for me.
It has opened my eyes some what to other people who have made brilliant fully functioning GUI systems. I’ve always given them a go but quickly determined that they are overkill for whatever it is I need. I am now convinced they are not overkill but I was in fact just way too open to dismissing them. Shame on me.
I still haven’t given the layout too much thought, but now that all of the GUI elements can be moved around whenever, it really isn’t that much of a problem.