Penumbear Tools - Level Editor
Penumbear will be released next week on February 28th.
I am a firm believer in using the right tools for the job even if I have to pay for them. I generally prefer open source tools so I can modify them if need be, but the development process would have been much slower without purchasing TexturePacker, ParticleDesign, GlyphDesigner, Spriter, and a number of other utilities. Level design was a huge part of making Penumbear and without a level editor we would never have finished. There are a few level editors out there with tight cocos2d integration, but I didn't love any of them. I decided that for Penumbear I would pay the cost by developing our own level editor.
In an early build of Penumbear we had simple level editor that could be used directly on the iPad. We used UIKit for all of the textfields, sliders, toggles, and selectors to avoid reinventing the wheel. This was a great start but positioning elements with your finger was not always precise enough. It also took a long time to build levels due to swapping between views and dragging pieces into position.
Soon after I ported Penumbear so that it would run on OSX as well. Being able to test things immediately on the desktop without having to load it onto the iPad with every change sped up development by an order of magnitude. The OSX build also spawned its own level editor because running the UIKit version wasn't an option. I maintained both the OSX and iOS level editors for awhile, but it quickly became apparent that we were building all of the levels on the OSX build so I stopped development of the iOS level editor.
Playtesting While Designing
When you shorten the wait times new behaviors develop whether it be from coding to testing, writing to publishing or ordering to having. This held true for level design. Having an editor that supported instant switching between edit mode and play mode allowed me to vigorous test every section of every level as it was built. If a jump distance didn't feel just right or the timing of an event was off, I could immediately edit the level and test it again. Having the editor at my finger tips at all times also allowed me to tweak levels on every single play through of the game. If I ran into a section that didn't look as pretty as I wanted it to, I could open up the editor, clean things up, and then continue on my way.
Keyboard Shortcuts
I am a big fan of the keyboard. Visual UI is great for new users and for certain task types, but when creating (and especially when coding) nothing beats quick access a key stroke away. I added in shortcuts for all sorts of behavior:
- copying objects
- deleting objects
- nudging objects around
- moving the viewport
- zooming
- rotating objects
- locking object positions
- toggling edit/play mode
- changing z-order & layer
- moving Penumbear
Lighting System
The Penumbear lighting system has a ton of variables:
- radius
- starting on/off state
- color
- emission angle
- type: toggle, always on, grow, blink, swing, switched, rotating and timed
- blink rate and delay
- grow to and starting radius
- grow speed
- timed light duration
- starting and ending rotation
- other alternate light type settings ie lasers
- positioning
- various performance settings
All of these variables needed to be accessible in the editor. Additionally we needed lights to update in real time so we could see the effect they would have on the geometry of the level as we moved them around.
Sounds
One of the features I added into the editor was a interface for swapping sound effect files into the game. This was added so that Josh (@OpenHeartSound) could test out sound effects in game without having to wait for a release. One of the great things about building your own editor is that you can add in features like this one to smooth out parts of the development process.
Shortfalls
Despite all the great things about the editor, it is full of warts and subpar behavior. I limited myself to fixing up and improving things in the editor that would save us time developing levels. Making Penumbear was a primary goal so with a programming staff of one, I had to sacrifice the level of polish that I would have liked to put into the editor.
OSX Release
We will be running a beta of the OSX version of Penumbear very soon. We will include the level editor with the beta so testers can play around with the editor. I don't think it is polished enough to be released with the Mac App Store version, but we may sell a special edition of Penumbear off our site that includes the editor, the OST, and a few other things for buying it direct. If interest in an editor totally explodes, then I'll dust off my toolmaker hat and make it consumer ready.