A puzzlescript file is divided into 8 sections:
Here's where all the fun happens. A level section of a file looks something like this:
#########
#.......#
#.*.*.O.#
#..*..O.#
#.P.*.*.#
#.......#
#########
MESSAGE Woah, that was tough, eh?!
#########
#.....@.#
#.P.*.O.#
#.......#
#########
#########
#.....@.#
#.P.*.O.#
#.......#
#########
MESSAGE Thank you for playing the game.
Levels are separated by blank lines, and you can also display messages if you want to. If you want to have several objects occupying single tile, you can specify this in the legend using and:
@ = Crate and Target
If you hold CTRL (or, on a Mac, CMD) and left click on the level in the text editor, it will load it in game.
Branching. I have no support for it in terms of this level structure. If you want a continuous open world you can set zoomscreen or flickscreen in the prelude.
If you can think of an elegant way to implement level branching in the engine, let me know, and I'll consider it : )