A puzzlescript file is divided into 8 sections:
Before any of the "official" sections are declared, you can give details about your project in this section, and also set some editor options.
title 2D Whale World
author increpare
homepage www.increpare.com
require_player_movement
key_repeat_interval 0.12
Here are the possible options:
(you can also refer to them by their numerical index)
Edit[ > Player | Crate ] -> [ > Player | > Crate ]
is compiled into four instructions, as the output from debug shows when you hit 'RUN':
=========== Rule Assembly : (4 rules) =========== (83) DOWN [ crate | up player ] -> [ up crate | up player ] + (83) DOWN [ down player | crate ] -> [ down player | down crate ] + (83) RIGHT [ crate | left player ] -> [ left crate | left player ] + (83) RIGHT [ right player | crate ] -> [ right player | right crate ] ===========Going from left to right:
The compiler does a lot of stuff to the rules you give to it to 'simplify' them in various ways. One thing it does for instance is replace all relative directions ( ^, v, <, and >), with UP, DOWN, LEFT, and RIGHT, which often involves splitting a single rule into many more rules (as above). An other thing you'll notice is that the core engine has rules only going DOWN and RIGHT - rules in other directions are flipped. For more information about directions in puzzlescript, see this page.
[ Player ]->[ Player Temp ]
late [ Player Temp ] -> CANCEL
late [ Temp ] -> [ ]