Level Counter

Story: 60, Challenge: 0.

Saturday, February 2, 2013

Faster level creation infrastructure.

Many technical improvements were made this week. The entire level creation and testing process was streamlined to allow for faster level creation. The level file parser was made a bit stronger and the blog received a tiny addition.

to recall, the way things worked was that the editor ran in debug mode only, dumping its output (the actual level) as a string to the console, where I would copy it and transfer it to the hard coded levels file. Clearly this was very cumbersome and required switching between the editor project and the game project, and recompiling the game, just to see the level in action. Any changes to the level after its initial design were done either by recreating it in the editor or, more commonly, by manually altering the level string, and would again require a recompile of the entire game.

In an effort to make this process more efficient, the editor is now a standalone file. Just small enough to be sent by mail to wherever I happen to be. It now dumps its output to a file. I then transfer this file to a specific folder on my testing device by USB. The game is now able to translate this file into a playable level (in fact, a menu of many playable levels), without needing to recompile. What this means is that I no longer need my development environment to create and test new levels. Wherever I have a computer with internet access and a USB cable I can create levels. (Of course, I would never create levels when I should be working, that is not the point of this update at all).

Levels created in this way are not classified (story/challenge) and instead exist in the new "testing" level menu. When I'm happy with the new design, I transfer the complete level to the hard coded levels file (either the story levels file or the challenge levels file). Recompile, and only then is it considered a part of the final game. The entire level testing infrastructure would be removed from the final version.

While I was enhancing the game's level file parser to handle the new external file, I took some time to strengthen it a bit more. Now level files can have line comments (any line starting with an * is considered a comment line). Also a level string no longer has to define its par (how many guys are required to finish it). If a level does not specify its par, a very large default par is used.

One of the newly designed levels

The next step in this process would be to enable the editor to read in a level file to allow for editing of preexisting levels. This step would be rather time consuming so I'm delaying it for now. When beta testing of levels comes around and changes to existing levels becomes a common activity I'll likely have to get around to it. But, for now, the system is good enough.

In addition to all that, several new levels have been designed. And a new level counter was added to the blog. I will update it from post to post to reflect the level design progress. So stay tuned.

No comments:

Post a Comment