Very Boss Progress With Easy Level Design

City LevelTen days ago, I still had 11 boss levels to complete for Breaking Block, along with all of the special mechanics that make the boss levels, well, special. Also, I had 42 more regular levels to create. And I semi-firmly said I would release in June. Still I did not panic, because I knew my content creation tool was solid.

Today I am down to one boss level remaining (the final boss), and 12 regular levels remaining. I’ve been focusing mostly on boss levels since those were further behind and require many times more effort, switching to regular levels when I was burnt out on creating boss mechanics. Overall, this worked out well.

I’ve never made quite this much (in quantity) content for a game before. The next closest is EARL’s Warehouse, with its 39 levels. Even with my map editor, though, creating new maps for EARL’s Warehouse is fairly time-consuming.

I’m very glad that I took a little time early in the project to make level creation for Breaking Block as simple and quick as possible. If I have an idea in mind of the level I want to create, a level can literally be made in 10 minutes. Coming up with the ideas takes more time than expressing them, and that is how it should be, and how you know a tool is really doing its job.

Here is an example level design file for the first boss in the game:




    V     R-    R-     V
    |V Y-Y-Y-Y-Y-Y-Y- V|
     |  Y-G-Y-Y-G-Y-  |
     D-  Y-Y-Y-Y-Y-  D-
    D-D-D-D-D-D-D-D-D-D- 
     G-D-$-D-$-D-$-D-G-
      G-@-@-@-@-@-@-G-  
       G-G-G-G-G-G-G- 

#anchorblocks 1 1 27 28 MovingBoss
#object MercuryBoss 0 9.25

That’s it. Just a few simple lines of text. Any line that does not start with “#” is interpreted as a row of the playfield, and the characters in that row represent the blocks to be created. In this map, we have ‘V’ for violet, ‘R’ for red, ‘Y’ for yellow, ‘G’ for green, ‘D’ for gold, ‘$’ for deadly plasma, and ‘@’ for the boss target blocks. A ‘-‘ dash modifies the preceding character to create a horizontal block, and a ‘|’ vertical bar modifies the above character to create a vertical block. If neither modifier is used, a small cubic block is created.

Lines starting with “#” are commands. The “#object” command creates a Unity prefab, and this allows me to easily import the special behavior of the bosses. The “#anchorblocks” command allows me to anchor a set of blocks to the named object’s transform, so that they can be moved as a group. Whenever I need to do something special for a level design, I can just create a new “#” command.

Here is how it ends up looking in game:
1-5

Easy to use, easy to explain, easy to extend. It’s even fairly easy to visualize the level from the text file. The one weakness I’ve found in this text-based approach is that sometimes things look a little different than you think, so it can be a little bit of trial and error to get things to look right. Still, even that iterative process is quick. And this design was about 1/10th the effort of writing a full graphical editor.

Of course, things can’t always be simplified this much, and I’m not suggesting I could have used such a technique to make EARL’s Warehouse level development more efficient. We can simplify where we can, though. I could just as easily made a level format where each block was encoded as an XML element. This then would have required me to write a visual level editor. Instead, I took advantage of the simple 2D design of my game to make a much more expressive level format.

With this design, given just a couple of hours I can have a few normal levels done, or implement the mechanics for a new boss. This means more content for less time, allowing me to promise 108 levels with 13 boss battles in short order.

If there’s enough interest, perhaps future versions of Breaking Block can allow players to exchange and play their own custom level files – I’ve already given almost enough information for any enthusiast to create levels.