Created
June 24, 2022 18:27
-
-
Save variousauthors/76e6cb48762985e12d3dfcd19c93e042 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 | |
.111. | |
.111. | |
.111. | |
.000. | |
..... | |
LogH | |
brown lightbrown | |
..... | |
00000 | |
00000 | |
00000 | |
..... | |
LogV | |
brown lightbrown | |
.000. | |
.000. | |
.000. | |
.000. | |
.111. | |
LogUpTop | |
brown lightbrown | |
..... | |
..... | |
..... | |
.111. | |
.111. | |
LogUp | |
brown lightbrown | |
.111. | |
.000. | |
.000. | |
.000. | |
..... | |
BridgeH | |
brown | |
..... | |
00000 | |
00000 | |
00000 | |
..... | |
BridgeV | |
brown | |
.000. | |
.000. | |
.000. | |
.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 | |
bridge = BridgeH or BridgeV | |
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 a log bridge should move the bridge somehow ) | |
( log rolling onto same orientation log bridge should do something ) | |
( in either case I like the idea of the bridge trying to move away ) | |
( BUGS ) | |
( 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 ) | |
horizontal [ impulse | impulsed Tree | no obstacle ] -> [ | stump > LogH | no obstacle ] | |
vertical [ impulse | impulsed Tree | no obstacle ] -> [ | stump > LogV | no obstacle ] | |
( LOG ) | |
( push it over ) | |
horizontal [ impulse | impulsed LogUp | no obstacle ] -> [ | > LogH | no obstacle ] | |
vertical [ impulse | impulsed LogUp | no obstacle ] -> [ | > LogV | 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 ] | |
horizontal [ impulse | impulsed LogH | no obstacle ] -> [ | > LogUp | no obstacle ] | |
vertical [ impulse | impulsed LogV | no obstacle ] -> [ | > LogUp | no obstacle ] | |
( exception: put them back on the stump ) | |
horizontal [ > player | logH | stump ] -> [ > player | > LogUp | stump ] | |
vertical [ > player | logV | stump ] -> [ > player | > LogUp | stump ] | |
( LOG: STATES ) | |
late [ LogH sink no BridgeV ] -> [ BridgeH sink ] | |
late [ LogV sink no BridgeH ] -> [ BridgeV sink ] | |
( 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 ) | |
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.T..~~~~~# | |
#.b..~~..b.# | |
#...~~.....# | |
#.~~~....T.# | |
#~~~..T....# | |
#~~~.....o.# | |
############ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment