More Levels!

This week was the start of fixing up level 4! A year and a half ago I’d just finished the background art for it and posted this image to Twitter. Weird to think it’s been that long.
Level 4 is the one I made first to test everything out, and as a result it’s one of the roughest. I have to re-do a lot of its layout, so I thought I’d document the process!

The level layouts are created in the 2D tile editor, Tiled. I try not be concerned with visuals at the beginning, instead just boxing in a rough idea of how the level will play. I do know how the level will look and what enemies will go in it, so that helps inform the design. I just need to get something on there, because a blank canvas is really intimidating.

A first stab at a section of level. I’ve indicated where I plan to place enemies.

Once I’m done, I export the Tiled level map into an array of integers. It’s literally the same information — each integer tells my program which tile in the tileset to use for that section of the level. If you squint your eyes you can almost see the level in the numbers!

It’s like a Magic Eye image!

Once the int array is put into the code, I can start playing the level and managing the camera. The camera is frequently being controlled to frame the action in an optimal way. Here’s a comparison of before and after having camera instructions implemented.

Without camera management.
Without camera management.
With camera management!
With camera management!

There’s a lot to take into account with the camera. I want it to show a fair distance in front of Wryn and give warning to upcoming obstacles. I want it to follow her vertically, but not until she’s far enough away from the ground or it’s annoying. I want to keep Wryn on-screen, and prefer to keep her inside the title-safe area. I want to keep the action from being overlapped by the HUD. I don’t want transitions from one area to the next to be too jarring. Etc etc etc.

Then I add the enemies and start trying it out! Sometimes my ideas work, sometimes they need some tweaking. I keep refining until it feels good.

Not what many would call 'good flow'.
Not what many would call ‘good flow’.
Getting better!
Getting better!

Once I’ve got it to a place I like, I can finally add the foreground and background tile layers in Tiled!
Add some background and foreground environment images in code, and bam! Level constructed.
There’s a lot more after that, like programming checkpoints, cinematics, boss encounters, blah blah blah, but you get the idea.

If you read through this and thought “what an inefficient process!”, well… you’re right! It gets really annoying to constantly re-export the int arrays in Tiled and import them into the game every time I make a change, for example. For my next game, I’m definitely gonna try making a level editor. It can only save time in the long run, and would let people make custom levels, too.