Created
June 27, 2022 16:13
-
-
Save variousauthors/0b05e85644d4b7d58811a05adbeeda1e to your computer and use it in GitHub Desktop.
Soft Clay (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 Soft Clay | |
author Ziggy | |
homepage www.puzzlescript.net | |
verbose_logging | |
run_rules_on_level_start | |
======== | |
OBJECTS | |
======== | |
Background | |
lightgreen | |
Water | |
#ADD8E6 | |
Player | |
black orange brown black | |
12221 | |
13331 | |
.3.3. | |
..... | |
..... | |
PlayerTop | |
black orange brown black | |
..... | |
..... | |
..... | |
..1.. | |
.222. | |
( TODO implement a rolling animation ) | |
BoulderA | |
grey darkgrey lightgray lightgreen #64A93A darkgreen | |
.432. | |
42200 | |
02000 | |
10001 | |
.111. | |
BoulderB | |
grey darkgrey lightgray lightgreen #64A93A darkgreen | |
.224. | |
22204 | |
02004 | |
10001 | |
.111. | |
BoulderC | |
grey darkgrey lightgray lightgreen #64A93A darkgreen | |
.220. | |
22200 | |
02000 | |
10005 | |
.155. | |
BoulderD | |
grey darkgrey lightgray lightgreen #64A93A darkgreen | |
.220. | |
22200 | |
42000 | |
50001 | |
.511. | |
BoulderM | |
transparent | |
DeepBoulder | |
black darkblue blue | |
.111. | |
12211 | |
12111 | |
01110 | |
.000. | |
ShallowBoulder | |
grey darkgrey lightgray lightgreen #64A93A darkgreen | |
..... | |
.430. | |
42200 | |
02000 | |
..... | |
Rock | |
grey darkgrey lightgray lightgreen #64A93A darkgreen | |
.432. | |
42200 | |
02000 | |
10011 | |
..... | |
Tree | |
#44891A brown #54992A #64A93A | |
.232. | |
02220 | |
00000 | |
.111. | |
..... | |
TreeTop | |
#44891A brown #54992A #64A93A | |
..... | |
..... | |
..... | |
..... | |
..3.. | |
stump | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
.111. | |
.111. | |
.111. | |
.000. | |
..... | |
LogHA | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
..2.. | |
00000 | |
00000 | |
00000 | |
..... | |
LogHB | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
..4.. | |
00300 | |
00000 | |
00000 | |
..... | |
LogHC | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
..... | |
00000 | |
00000 | |
00300 | |
..4.. | |
LogHD | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
..... | |
00000 | |
00000 | |
00000 | |
..2.. | |
LogVA | |
#A46422 lightbrown #9f581e #a86f24 #b47e27 | |
.000. | |
.000. | |
.0002 | |
.000. | |
.111. | |
LogVB | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
.000. | |
.000. | |
.0034 | |
.000. | |
.111. | |
LogVC | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
.000. | |
.000. | |
4300. | |
.000. | |
.111. | |
LogVD | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
.000. | |
.000. | |
2000. | |
.000. | |
.111. | |
LogUpTop | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
..... | |
..... | |
..... | |
.111. | |
.111. | |
LogUpA | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
.111. | |
2000. | |
.000. | |
.000. | |
..... | |
LogUpB | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
.111. | |
4300. | |
.000. | |
.000. | |
..... | |
LogUpC | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
.111. | |
.0002 | |
.000. | |
.000. | |
..... | |
LogUpD | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
.111. | |
.0034 | |
.000. | |
.000. | |
..... | |
BridgeHA | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
..2.. | |
00000 | |
00000 | |
00000 | |
..... | |
BridgeHB | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
..4.. | |
00300 | |
00000 | |
00000 | |
..... | |
BridgeHC | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
..... | |
00000 | |
00000 | |
00300 | |
..4.. | |
BridgeHD | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
..... | |
00000 | |
00000 | |
00000 | |
..2.. | |
BridgeVA | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
.000. | |
.000. | |
.0002 | |
.000. | |
.000. | |
BridgeVB | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
.000. | |
.000. | |
.0034 | |
.000. | |
.000. | |
BridgeVC | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
.000. | |
.000. | |
4300. | |
.000. | |
.000. | |
BridgeVD | |
brown lightbrown #9f581e #a86f24 #b47e27 | |
.000. | |
.000. | |
2000. | |
.000. | |
.000. | |
impulse | |
pink | |
....0 | |
..... | |
..... | |
..... | |
..... | |
sinking | |
transparent | |
impulsed | |
blue | |
...0. | |
..... | |
..... | |
..... | |
..... | |
border | |
black | |
00000 | |
00000 | |
00000 | |
00000 | |
00000 | |
======= | |
LEGEND | |
======= | |
. = Background | |
P = Player | |
b = BoulderA | |
T = tree | |
o = rock | |
~ = Water | |
# = border | |
bridgeV = BridgeVA or BridgeVB or BridgeVC or BridgeVD | |
bridgeH = BridgeHA or BridgeHB or BridgeHC or BridgeHD | |
bridge = BridgeH or BridgeV | |
logH = logHA or LogHB or LogHC or LogHD | |
logV = logVA or LogVB or LogVC or LogVD | |
logUp = LogUpA or LogUpB or LogUpC or LogUpD | |
log = logH or logV or LogUp | |
boulder = boulderA or BoulderB or BoulderC or BoulderD or BoulderM | |
lightObject = log | |
heavyObject = boulder or tree | |
solidObject = rock or stump or ShallowBoulder or border | |
obstacle = lightobject or heavyobject or solidobject | |
object = lightObject or heavyObject | |
sink = water | |
======= | |
SOUNDS | |
======= | |
================ | |
COLLISIONLAYERS | |
================ | |
Background | |
Water | |
DeepBoulder | |
ShallowBoulder | |
stump | |
BridgeH, BridgeV | |
Player, border | |
Boulder | |
tree | |
rock | |
log | |
impulse | |
sinking | |
impulsed | |
PlayerTop | |
TreeTop | |
LogUpTop | |
====== | |
RULES | |
====== | |
( TODO ) | |
( boulder rolling onto log ) | |
( tries to roll the log away from the knob ) | |
( BUGS ) | |
( push standing log into water, log does not resolve into knob log ) | |
( PLAYER ) | |
[ > player | object ] -> [ > player impulse | impulsed object ] | |
( can walk over bridges ) | |
horizontal [ > player | water no BridgeH ] -> [ player | water ] | |
vertical [ > player | water no BridgeV ] -> [ player | water ] | |
( can's step off bridges wrong ) | |
horizontal [ > player BridgeV ] -> [ player BridgeV ] | |
vertical [ > player BridgeH ] -> [ player BridgeH ] | |
( can walk behind rocks lol ) | |
down [ > player rock ] -> [ player rock ] | |
up [ > player | rock ] -> [ player | rock ] | |
( PHYSICS ) | |
( transfering force ) | |
startloop | |
[ impulse | impulsed lightobject | lightobject ] -> [ | lightobject impulse | impulsed lightobject ] again | |
[ impulse | impulsed lightobject | heavyobject ] -> [ | lightobject | heavyobject ] again | |
[ impulse | impulsed heavyobject | lightobject ] -> [ | heavyobject impulse | impulsed lightobject ] again | |
[ impulse | impulsed heavyobject | heavyobject ] -> [ | heavyobject impulse | impulsed heavyobject ] again | |
[ impulse | impulsed object | solidobject ] -> [ | object | solidobject ] again | |
endloop | |
( OBJECTS ) | |
( TREE ) | |
( push it over, behaves like logUpA ) | |
left [ impulse | impulsed Tree | no obstacle ] -> [ | stump > LogHA | no obstacle ] | |
right [ impulse | impulsed Tree | no obstacle ] -> [ | stump > LogHB | no obstacle ] | |
up [ impulse | impulsed Tree | no obstacle ] -> [ | stump > LogVD | no obstacle ] | |
down [ impulse | impulsed Tree | no obstacle ] -> [ | stump > LogVC | no obstacle ] | |
( LOG ) | |
( push it over ) | |
left [ impulse | impulsed LogUpA | no obstacle ] -> [ | > LogHA | no obstacle ] | |
left [ impulse | impulsed LogUpB | no obstacle ] -> [ | > LogHC | no obstacle ] | |
left [ impulse | impulsed LogUpC | no obstacle ] -> [ | > LogHB | no obstacle ] | |
left [ impulse | impulsed LogUpD | no obstacle ] -> [ | > LogHD | no obstacle ] | |
right [ impulse | impulsed LogUpA | no obstacle ] -> [ | > LogHB | no obstacle ] | |
right [ impulse | impulsed LogUpB | no obstacle ] -> [ | > LogHC | no obstacle ] | |
right [ impulse | impulsed LogUpC | no obstacle ] -> [ | > LogHA | no obstacle ] | |
right [ impulse | impulsed LogUpD | no obstacle ] -> [ | > LogHD | no obstacle ] | |
up [ impulse | impulsed LogUpA | no obstacle ] -> [ | > LogVD | no obstacle ] | |
up [ impulse | impulsed LogUpB | no obstacle ] -> [ | > LogVC | no obstacle ] | |
up [ impulse | impulsed LogUpC | no obstacle ] -> [ | > LogVA | no obstacle ] | |
up [ impulse | impulsed LogUpD | no obstacle ] -> [ | > LogVB | no obstacle ] | |
down [ impulse | impulsed LogUpA | no obstacle ] -> [ | > LogVC | no obstacle ] | |
down [ impulse | impulsed LogUpB | no obstacle ] -> [ | > LogVD | no obstacle ] | |
down [ impulse | impulsed LogUpC | no obstacle ] -> [ | > LogVB | no obstacle ] | |
down [ impulse | impulsed LogUpD | no obstacle ] -> [ | > LogVA | no obstacle ] | |
( roll them ) | |
vertical [ impulse | impulsed LogH | no obstacle ] -> [ | impulsed > LogH impulse | no obstacle ] again | |
horizontal [ impulse | impulsed LogV | no obstacle ] -> [ | impulsed > LogV impulse | no obstacle ] again | |
( stand them up ) | |
( exception: shove into water ) | |
horizontal [ impulse | impulsed LogH | no obstacle sink ] -> [ | > LogH | no obstacle sink ] | |
vertical [ impulse | impulsed LogV | no obstacle sink ] -> [ | > LogV | no obstacle sink ] | |
left [ impulse | impulsed LogHA | no obstacle ] -> [ | > LogUpC | no obstacle ] | |
left [ impulse | impulsed LogHB | no obstacle ] -> [ | > LogUpA | no obstacle ] | |
left [ impulse | impulsed LogHC | no obstacle ] -> [ | > LogUpB | no obstacle ] | |
left [ impulse | impulsed LogHD | no obstacle ] -> [ | > LogUpD | no obstacle ] | |
right [ impulse | impulsed LogHA | no obstacle ] -> [ | > LogUpA | no obstacle ] | |
right [ impulse | impulsed LogHB | no obstacle ] -> [ | > LogUpC | no obstacle ] | |
right [ impulse | impulsed LogHC | no obstacle ] -> [ | > LogUpD | no obstacle ] | |
right [ impulse | impulsed LogHD | no obstacle ] -> [ | > LogUpB | no obstacle ] | |
up [ impulse | impulsed LogVA | no obstacle ] -> [ | > LogUpD | no obstacle ] | |
up [ impulse | impulsed LogVB | no obstacle ] -> [ | > LogUpC | no obstacle ] | |
up [ impulse | impulsed LogVC | no obstacle ] -> [ | > LogUpA | no obstacle ] | |
up [ impulse | impulsed LogVD | no obstacle ] -> [ | > LogUpB | no obstacle ] | |
down [ impulse | impulsed LogVA | no obstacle ] -> [ | > LogUpC | no obstacle ] | |
down [ impulse | impulsed LogVB | no obstacle ] -> [ | > LogUpD | no obstacle ] | |
down [ impulse | impulsed LogVC | no obstacle ] -> [ | > LogUpB | no obstacle ] | |
down [ impulse | impulsed LogVD | no obstacle ] -> [ | > LogUpA | no obstacle ] | |
( exception: put them back on the stump ) | |
left [ > player | logHA | stump ] -> [ > player | > LogUpC | stump ] | |
left [ > player | logHB | stump ] -> [ > player | > LogUpA | stump ] | |
left [ > player | logHC | stump ] -> [ > player | > LogUpB | stump ] | |
left [ > player | logHD | stump ] -> [ > player | > LogUpD | stump ] | |
right [ > player | logHA | stump ] -> [ > player | > LogUpA | stump ] | |
right [ > player | logHB | stump ] -> [ > player | > LogUpC | stump ] | |
right [ > player | logHC | stump ] -> [ > player | > LogUpD | stump ] | |
right [ > player | logHD | stump ] -> [ > player | > LogUpB | stump ] | |
up [ > player | logVA | stump ] -> [ > player | > LogUpD | stump ] | |
up [ > player | logVB | stump ] -> [ > player | > LogUpC | stump ] | |
up [ > player | logVC | stump ] -> [ > player | > LogUpA | stump ] | |
up [ > player | logVD | stump ] -> [ > player | > LogUpB | stump ] | |
down [ > player | logVA | stump ] -> [ > player | > LogUpC | stump ] | |
down [ > player | logVB | stump ] -> [ > player | > LogUpD | stump ] | |
down [ > player | logVC | stump ] -> [ > player | > LogUpB | stump ] | |
down [ > player | logVD | stump ] -> [ > player | > LogUpA | stump ] | |
( vertical [ > player | logV | stump ] -> [ > player | > LogUp | stump ] ) | |
( LOG: HORIZONTAL LOG ROLLING ) | |
late down [ impulse | impulsed LogHD ] -> [ impulse | impulsed BoulderM ] | |
late down [ impulse | impulsed LogHC ] -> [ impulse | impulsed LogHD ] | |
late down [ impulse | impulsed LogHB ] -> [ impulse | impulsed LogHC ] | |
late down [ impulse | impulsed LogHA ] -> [ impulse | impulsed LogHB ] | |
late up [ impulse | impulsed LogHB ] -> [ impulse | impulsed BoulderM ] | |
late up [ impulse | impulsed LogHC ] -> [ impulse | impulsed LogHB ] | |
late up [ impulse | impulsed LogHD ] -> [ impulse | impulsed LogHC ] | |
late up [ impulse | impulsed LogHA ] -> [ impulse | impulsed LogHD ] | |
late [ BoulderM ] -> [ LogHA ] | |
( LOG: VERTICAL LOG ROLLING ) | |
late left [ impulse | impulsed LogVD ] -> [ impulse | impulsed BoulderM ] | |
late left [ impulse | impulsed LogVC ] -> [ impulse | impulsed LogVD ] | |
late left [ impulse | impulsed LogVB ] -> [ impulse | impulsed LogVC ] | |
late left [ impulse | impulsed LogVA ] -> [ impulse | impulsed LogVB ] | |
late right [ impulse | impulsed LogVB ] -> [ impulse | impulsed BoulderM ] | |
late right [ impulse | impulsed LogVC ] -> [ impulse | impulsed LogVB ] | |
late right [ impulse | impulsed LogVD ] -> [ impulse | impulsed LogVC ] | |
late right [ impulse | impulsed LogVA ] -> [ impulse | impulsed LogVD ] | |
late [ BoulderM ] -> [ LogVA ] | |
( LOG: STATES ) | |
late [ LogHA sink no BridgeV ] -> [ BridgeHA sink ] | |
late [ LogHB sink no BridgeV ] -> [ BridgeHB sink ] | |
late [ LogHC sink no BridgeV ] -> [ BridgeHC sink ] | |
late [ LogHD sink no BridgeV ] -> [ BridgeHD sink ] | |
( the log then settles into one of two states because logs don't float that way ) | |
late down [ impulse | impulsed bridgeHB ] -> [ impulse | impulsed BridgeHC ] | |
late up [ impulse | impulsed bridgeHB ] -> [ impulse | impulsed BridgeHA ] | |
late down [ impulse | impulsed bridgeHD ] -> [ impulse| impulsed BridgeHA ] | |
late up [ impulse | impulsed bridgeHD ] -> [ impulse | impulsed BridgeHC ] | |
late [ LogVA sink no BridgeH ] -> [ BridgeVA sink ] | |
late [ LogVB sink no BridgeH ] -> [ BridgeVB sink ] | |
late [ LogVC sink no BridgeH ] -> [ BridgeVC sink ] | |
late [ LogVD sink no BridgeH ] -> [ BridgeVD sink ] | |
( the log then settles into one of two states because logs don't float that way ) | |
late left [ impulse | impulsed bridgeVB ] -> [ impulse | impulsed BridgeVC ] | |
late right [ impulse | impulsed bridgeVB ] -> [ impulse | impulsed BridgeVA ] | |
late left [ impulse | impulsed bridgeVD ] -> [ impulse| impulsed BridgeVA ] | |
late right [ impulse | impulsed bridgeVD ] -> [ impulse | impulsed BridgeVC ] | |
( the log then settles into one of two states because logs don't float that way ) | |
late [ bridgeVB ] -> [ BridgeVA ] | |
late [ bridgeVD ] -> [ BridgeVC ] | |
( BOULDER ) | |
( BOULDER: ROLLING ) | |
[ impulse | impulsed Boulder | no obstacle ] -> [ | impulsed > Boulder impulse | no obstacle ] again | |
( BOULDER: STATES ) | |
late [ Boulder sink ] -> [ Boulder sinking sink ] | |
late [ Boulder sinking ] -> [ ShallowBoulder ] | |
( ROCK ) | |
( ROCK: PUSHING ) | |
( ROCK: STATES ) | |
( END OBJECTS ) | |
( PHYSICS: CLEAN UP ) | |
( keep the impulsed tag with the moving object ) | |
[ impulsed > object ] -> [ > impulsed > object ] | |
( stop player from moving into obstacles that were blocked ) | |
[ > player | stationary object ] -> [ player | object ] | |
( remove impulses if the object was removed ) | |
late [ impulse | impulsed no object ] -> [ | no object ] | |
( RENDER ) | |
late up [ no Player | PlayerTop ] -> [ | ] | |
late up [ Player | no PlayerTop ] -> [ Player | PlayerTop ] | |
late up [ no Tree | TreeTop ] -> [ | ] | |
late up [ Tree | no TreeTop ] -> [ Tree | TreeTop ] | |
late up [ no LogUp | LogUpTop ] -> [ | ] | |
late up [ LogUp | no LogUpTop ] -> [ LogUp | LogUpTop ] | |
( ROLLING BOULDER HORIZONTAL ) | |
late right [ impulse | impulsed BoulderD ] -> [ impulse | impulsed BoulderM ] | |
late right [ impulse | impulsed BoulderC ] -> [ impulse | impulsed BoulderD ] | |
late right [ impulse | impulsed BoulderB ] -> [ impulse | impulsed BoulderC ] | |
late right [ impulse | impulsed BoulderA ] -> [ impulse | impulsed BoulderB ] | |
late left [ impulse | impulsed BoulderB ] -> [ impulse | impulsed BoulderM ] | |
late left [ impulse | impulsed BoulderC ] -> [ impulse | impulsed BoulderB ] | |
late left [ impulse | impulsed BoulderD ] -> [ impulse | impulsed BoulderC ] | |
late left [ impulse | impulsed BoulderA ] -> [ impulse | impulsed BoulderD ] | |
late [ BoulderM ] -> [ BoulderA ] | |
( ROLLING VERTICAL ) | |
late vertical [ impulse | impulsed BoulderD ] -> [ impulse | impulsed BoulderM ] | |
late vertical [ impulse | impulsed BoulderA ] -> [ impulse | impulsed BoulderD ] | |
late [ BoulderM ] -> [ BoulderA ] | |
late vertical [ impulse | impulsed BoulderC ] -> [ impulse | impulsed BoulderM ] | |
late vertical [ impulse | impulsed BoulderB ] -> [ impulse | impulsed BoulderC ] | |
late [ BoulderM ] -> [ BoulderB ] | |
============== | |
WINCONDITIONS | |
============== | |
======= | |
LEVELS | |
======= | |
############ | |
#..........# | |
#...T..T...# | |
#.b..b...o.# | |
#.P....~~~~# | |
#.....~~~~~# | |
#.T..~~..b.# | |
#...~~~....# | |
#.~~~....T.# | |
#~~~..T....# | |
#~~~.....o.# | |
############ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment