I’ve just read at Lambda the Ultimate (one of the must-subscribe blogs) about PuzzleScript:
It is an HTML5-based puzzle game engine that uses a simple language for patterns and substitutions to describe game rules. For example (taken from their introduction), the basic block-pushing logic of a Sokoban game can be given as:
[ > Player | Crate ] -> [ > Player | > Crate ]
This line says that when the engine sees the pattern to the left of
->
, it should replace it with the pattern on the right. In this case, the rule can be read as something like: when there is a row or column ([]
) that contains a player object (Player
) next to (|
) a crate object (Crate
), and the player is trying to move toward the crate (>
), then (->
) make the crate move in the same direction.
The introduction given at the PuzzleScript webpage is very informative, full of animations. And those examples bring sweet memories of old games played in the 8-bit era. Take a look yourself!