Bird's-eye view of a PuzzleScript file

A puzzlescript file is divided into 8 sections:

Levels

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?!


#########
#[email protected]#
#.P.*.O.#
#.......#
#########


#########
#[email protected]#
#.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.

Level Select

If you set enable_level_select in the prelude, players will be able to jump to any level from the menu. (Note that this means they can also skip levels freely).

If you want to have more control over where exactly the level select screen takes the player, you can write level_select_point at every point that you want to be able to jump to from the level select screen. For example:


LEVEL_SELECT_POINT

MESSAGE Welcome to level 1

#########
#.......#
#.*.*.O.#
#..*..O.#
#.P.*.*.#
#.......#
#########

MESSAGE You beat level 1!

LEVEL_SELECT_POINT

MESSAGE Welcome to level 2

#########
#[email protected]#
#.P.*.O.#
#.......#
#########

MESSAGE You beat level 2!

MESSAGE This level cannot be accessed from the level select screen.

#########
#...*[email protected]#
#.P.*.O.#
#...*.O.#
#########

MESSAGE Thank you for playing the game.

What stuff is hard to do?

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 : )