Previously when using the level editor, although my copy-and-paste (or copy-drag) functionality is pretty useful, selecting textures was not efficient at all. Navigating a hierarchical list of textures to find the right one works alright, but level designers are human and work much better with a visual palette of textures.
So, I added a palette designer to the asset editor tool which allows us to create Palette Data, which is consumed solely by the level editor. Here's what it looks like:
Currently the palette editor allows you to drop textures and animations in any of the 400 (20x20) slots, for easy access in the level editor. You can also rotate/flip tiles ahead of time--the tiles you see here for the right side of the rock wall are actually redundant, but it makes for a quicker experience when designing levels.
Here's what it looks like in-editor:
Adding this palette control also necessitated the concept of a 'current layer'--so you can see the layer picker on the right. The long bar is the 'current layer' selector, and determines what layer the palette tile you click is dropped onto. The small boxes in the layer selector represent visibility.
I also added a few more things not shown here, mostly keyboard shortcuts (arrow key navigate from tile to tile, to make using the palette quicker), M shows and hides models, etc.
Okay, now for the slightly cooler stuff. Remember the scrolling section transition from last time? Well, now there's another type: a fade-in-fade-out transition. Here's a video of it in action.
Things to note here:
- The color of the fade is configurable--you can see black and white fades.
- The animation of the player and the direction the player moves on the 'fade in' (latter) part of the transition is configurable. When going from cave to cave, for example, we want to set the incoming direction to 'down' and the incoming animation to whatever player animation makes sense--which is 'player_walking_down' in this case. But the cave on the left (inexplicably) leads the player to another level, outside, moving to the right, so that uses 'player_walking_right'.
Anyway, next up I think I'll be adding a better-defined layering scheme, geared towards allowing multiple playable layers (think: overpasses, underpasses, stairs, ladders) in a single section.