Batteries included: the level editor is built-in
kent_turbo just reminded me that Ookoobah is shipped with a level editor! We actually used it to create the content for the game. It's just hidden by default. But here is how you can invoke it...
Starting Ookoobah level editor
To enable the editor, pass an additional command-line argument specifying the level name. If a level with the given name does not exist, you'll start with an empty grid and could make a level from scratch. If the level exists, you could amend it.
Create a new level:
ookoobah$ python run_game.py my-new-kickass-level
Edit an existing level:
ookoobah$ python run_game.py beginning
Once invoked, you'll find a new item "Edit" in the main menu. That's the editor.
Note: the argument specifies a level name, not its file path. Actual level files are available as $GAME_DIR/data/$LEVEL_NAME.level
Using the editor
It looks pretty much as the game itself. Except now you have more options. Namely:
- you can save a level (of course),
- have access to an infinite number of all possible block types,
- and can specify which blocks are locked (level blocks), and which will be moved from the grid to a player's inventory.
Some levels have an optional introductory text that is displayed when a player enters a level for the first time. This text is stored in a file $GAME_DIR/data/$LEVEL_NAME.level.txt and may be edited separately.
The editor wasn't considered an official part of the game, but rather a tool that naturally evolved during a development process. Therefore it may have bugs that we consider low priority and didn't fix. Please excuse us (-:
Playing new levels
To play your new level, simply pass its name on a command-line as shown above and select "Play" in the main menu. If you want to include your level in the standard series, you'd have to add it to the tuple LEVELS in the file ookoobah/game_mode.py.
Contributions welcome!
During the challenge we were very focused on the game itself, and could find time for level creation only on the last day. I should say: coming up with level ideas is hard! Nevertheless we made 15 levels, including 6 tutorials, which should suffice for starters.
But you are absolutely free, even encouraged, to create your own. Please do and share them with everyone. Looking forward to seeing your work!
(log in to comment)
hodgestar on 2014/05/18 18:04:
We've ended up with a level editor in a couple of our Pyweek entries in the past (mostly thanks to Nitwit). They're fun and really incredible for last minute content generation. Would recommend them to more teams! They're also fun for judges to tinker with. Looking forward to judging Ookoobah.