Hi all, time for the weekly update!
I spent quite a bit of time implementing then tweaking the movement for the fire feather. The feather doesn't float through objects, so it has more potential to interact with the environment, like triggering collapsing platforms and other fun things.
I added a couple of sparkles too, so powerups are feeling a bit more polished now!
I've also worked a little more on level design and streamlining my level editing process. I thought I'd talk a bit about that side of things today.
Level Editing in TiledI use
Tiled to create the levels for Leilani's Island. It's a really useful tool that includes both tile placement and freeform object placement, so it's really flexible.
Here are some of the tricks and techniques I use to try and make level editing as painless as possible.
LayersTiled supports adding multiple layers of different types to a single map. I have a standard set of layers that I use:
Main LayerMost stuff you can see here is on the Main layer. It contains scenery tiles (all non-moving scenery) and entity tiles (all interactive objects and some special ones that I'll mention later). Whenever possible I use only this layer and no others, which makes is much easier to copy/paste/move chunks of the level around.
Main2 LayerThis is used for when I need to place both entities and scenery on the same tile. For example here the star blocks are placed over the purple ledge.
Contents LayerThis is used for placing entities inside others. It's not super flexible, so only certain entities can make use of contents, the blocks being a good example. In the picture here the left hand block contains a flower powerup. The right hand block will default to containing a single shell - I used to have to manually add shells to every single block and it was driving me crazy!
Properties LayerThis layer contains freely placed box objects. Tiled allows custom properties to be set for these boxes which is super useful. The way I interpret this layer in the game is that any entity placed on the Main or Main2 layers will inherit the custom properties from the first box object that overlaps it.
In the example above the Entrance entity (which is a point where Leilani can appear) is given the name "Enter".
EntitiesThis is the tileset I used for placing entities on the Main / Main2 / Contents layers. It's a real mess and contains loads of old graphics and old entities that I'm not using at the moment. As some point I'll reorganise it a bit!
Most things on here are interactive entities that are just placed straight into the level (blocks, enemies, spikes).
The tiles with small versions of shells or powerups are used for the Contents layer as shown above. You can see a green spiky ball powerup that I never used, and a pineapple!
The entities on the 8th row are used to limit the in-game camera. The camera cannot travel past the red markers, so those always border the level. The blue camera markers are just a soft limit that the camera will only go through if Leilani goes through too, so I use those if I want the effect of the camera scrolling from one screen to the next.
The second to last row has an invisible Exit trigger, which is used to end the level or switch to a different area of the level. The Entrance one I talked about before - that's where Leilani appears when starting a new area of the level. The <-> icon is used when combining multiple Tiled maps!
Combining Multiple Tiled MapsThe <-> icon is one I just added today. Each level in the game can contain multiple areas, which Leilani travels between by falling down holes or going through tubes. But each of these areas can be made up of multiple Tiled maps which are stitched together by the game. This is really useful, because if I want to expand something in the middle of the level I can just edit one of the small maps to make it wider, without having to move every single thing in the rest of the level two tiles to the right. I can even swap the order of a couple of the sections by simply editing an xml file to load the Tiled maps in a different order.
Which brings me to what the <-> entity does: I place one of these on the right hand side of one map, and one on the left hand side of the next map, and the game uses those to automatically align the two map files with each other by moving them up/down. This means I don't have to worry about making every map the same height or introducing unintended walls/cliffs into the level!
Scenery TilesetsThis is the version of the Cave tileset that I used within Tiled.
and this is the version used in the actual game:
They're quite different! Firstly, the Tiled version uses 16x16 tiles. The in-game tiles are 24x24, but they're drawn 16 pixels apart. This means the tiles can overlap their borders a bit, so the platforms can stick out a bit at the edge for example without me having to place a lot of extra tiles everywhere.
The game version also contains two layers - the black border layer is all drawn first, and then the top detail layer. This means the black borders from neighbouring tiles all merge together and I get a consistent border around all scenery regardless of how the tiles are placed. Again this saves a lot of extra tile combinations, and a lot of time placing the correct borders everywhere.
Finally there are the red tiles in the Tiled version of the tileset. These represent tiles that are automatically placed by the game. For example, there are three versions of each of the cave tiles, containing different patterns. In the editor I just place the first version of the tile. The game automatically alternates between all three versions, according to some rules in an xml file.
Hopefully an image describes it better. The main result is a level that looks a lot nicer in the game than in the editor!
I hope some of that was interesting, and maybe useful to anyone thinking of using Tiled!