Created
June 13, 2022 23:36
-
-
Save variousauthors/733c2f249fedee5e2b847911208d2729 to your computer and use it in GitHub Desktop.
Simple Block Pushing Game (PuzzleScript Script)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title Simple Block Pushing Game | |
author David Skinner | |
homepage www.puzzlescript.net | |
verbose_logging | |
run_rules_on_level_start | |
======== | |
OBJECTS | |
======== | |
Background | |
lightgreen green | |
11111 | |
11111 | |
11111 | |
11111 | |
11111 | |
water | |
blue | |
00000 | |
00000 | |
00000 | |
00000 | |
00000 | |
Player | |
black orange brown black | |
12221 | |
13331 | |
.3.3. | |
..... | |
..... | |
PlayerTop | |
black orange brown black | |
..... | |
..... | |
..... | |
..1.. | |
.222. | |
( TODO implement a rolling animation ) | |
Boulder | |
grey darkgrey lightgray | |
.220. | |
22200 | |
02000 | |
10001 | |
.111. | |
RollingBoulder | |
grey darkgrey lightgray blue | |
.2223 | |
22000 | |
00000 | |
00011 | |
.111. | |
DeepBoulder | |
black darkblue blue | |
.111. | |
12211 | |
12111 | |
01110 | |
.000. | |
ShallowBoulder | |
grey darkgrey lightgray | |
..... | |
.220. | |
22200 | |
02000 | |
..... | |
Rock | |
grey darkgrey lightgray | |
.222. | |
22000 | |
00000 | |
00011 | |
..... | |
impulse | |
pink | |
....0 | |
..... | |
..... | |
..... | |
..... | |
sinking | |
transparent | |
rolling | |
transparent | |
======= | |
LEGEND | |
======= | |
. = Background | |
P = Player | |
b = Boulder | |
o = rock | |
~ = Water | |
obstacle = rock | |
sink = water | |
bridge = ShallowBoulder | |
======= | |
SOUNDS | |
======= | |
================ | |
COLLISIONLAYERS | |
================ | |
Background | |
Water | |
DeepBoulder | |
ShallowBoulder | |
RollingBoulder | |
Player | |
Boulder | |
rock | |
impulse | |
sinking | |
rolling | |
PlayerTop | |
====== | |
RULES | |
====== | |
( WATER ) | |
[ > player | water no bridge ] -> [ player | water no bridge ] | |
( BOULDER ) | |
( BOULDER: ROLLING ) | |
[ > player | boulder ] -> [ player impulse | Rolling Boulder ] | |
[ impulse | Rolling Boulder | Boulder ] -> [ | Boulder impulse | Rolling Boulder ] again | |
[ impulse | Rolling Boulder | obstacle ] -> [ | Boulder | obstacle ] | |
[ impulse | Rolling Boulder | sink ] -> [ | > Boulder | sink ] | |
[ impulse | Rolling Boulder | no obstacle ] -> [ | Rolling > Boulder impulse | no obstacle ] again | |
( this is to resolve collision with map edge ) | |
[ impulse | Rolling stationary Boulder ] -> [ | Boulder ] | |
( keep them together ) | |
[ Rolling > Boulder ] -> [ > Rolling > Boulder ] | |
( BOULDER: STATES ) | |
late [ Boulder sink ] -> [ Boulder sinking sink ] | |
late [ Boulder sinking no DeepBoulder ] -> [ DeepBoulder ] | |
late [ Boulder sinking DeepBoulder ] -> [ DeepBoulder ShallowBoulder ] | |
( ROCK ) | |
[ > player | rock ] -> [ > player | > rock ] | |
[ > player | > rock | Boulder ] -> [ player | rock impulse | rolling boulder ] again | |
( ROCK: STATES ) | |
late [ rock sink ] -> [ rock sinking sink ] | |
late [ rock sinking no DeepBoulder ] -> [ DeepBoulder ] | |
late [ rock sinking DeepBoulder ] -> [ DeepBoulder ShallowBoulder ] | |
( RENDER ) | |
late up [ no Player | PlayerTop ] -> [ | ] | |
late up [ Player | no PlayerTop ] -> [ Player | PlayerTop ] | |
============== | |
WINCONDITIONS | |
============== | |
======= | |
LEVELS | |
======= | |
.......... | |
.......... | |
.b..b...o. | |
..P...~~.. | |
.....~~~.. | |
.b..~~~... | |
...~~..... | |
.......... | |
.......... | |
.......... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment