Skip to content

Instantly share code, notes, and snippets.

@variousauthors
Created June 18, 2022 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save variousauthors/3917daf2a567e89dbfa893f74cc12a00 to your computer and use it in GitHub Desktop.
Save variousauthors/3917daf2a567e89dbfa893f74cc12a00 to your computer and use it in GitHub Desktop.
Soft Clay (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
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
.....
.220.
22200
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
.....
.....
.....
.....
.....
sinking
transparent
impulsed
blue
.....
.....
.....
.....
.....
=======
LEGEND
=======
. = Background
P = Player
b = BoulderA
T = tree
o = rock
~ = Water
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
obstacle = lightobject or heavyobject or solidobject
object = lightObject or heavyObject
sink = water
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
Water
DeepBoulder
ShallowBoulder
stump
BridgeH, BridgeV
Player
Boulder
tree
rock
log
impulse
sinking
impulsed
PlayerTop
TreeTop
LogUpTop
======
RULES
======
( TODO )
( add trees )
( no walking over rock bridge, only sending objects )
( BUGS )
( should be able to send object over boulder bridge )
( 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 )
[ impulse | impulsed object | solidobject ] -> [ | object | solidobject ]
[ impulse | impulsed object | sink ] -> [ | > object | sink ]
( transfering force )
startloop
[ > heavyobject | bridge sink ] -> [ > heavyobject | > bridge sink ]
[ impulse | impulsed lightobject | lightobject ] -> [ | lightobject impulse | impulsed lightobject ] again
[ impulse | impulsed heavyobject | lightobject ] -> [ | heavyobject impulse | impulsed lightobject ] again
[ impulse | impulsed heavyobject | heavyobject ] -> [ | heavyobject impulse | impulsed heavyobject ] again
endloop
( OBJECTS )
( TREE )
( push it over )
horizontal [ impulse | impulsed Tree | no obstacle ] -> [ | stump impulsed > LogH | no obstacle ]
vertical [ impulse | impulsed Tree | no obstacle ] -> [ | stump impulsed > LogV | no obstacle ]
( LOG )
( push it over )
horizontal [ impulse | impulsed LogUp | no obstacle ] -> [ | impulsed > LogH | no obstacle ]
vertical [ impulse | impulsed LogUp | no obstacle ] -> [ | impulsed > 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 )
horizontal [ impulse | impulsed LogH | no obstacle ] -> [ | impulsed > LogUp | no obstacle ]
vertical [ impulse | impulsed LogV | no obstacle ] -> [ | impulsed > 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 ] -> [ BridgeH sink ]
late [ LogV sink ] -> [ 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 no DeepBoulder ] -> [ DeepBoulder ]
late [ Boulder sinking DeepBoulder ] -> [ DeepBoulder ShallowBoulder ]
( ROCK )
( ROCK: PUSHING )
[ impulse | impulsed rock | no obstacle ] -> [ | impulsed > rock | no obstacle ] again
( ROCK: STATES )
late [ rock sink ] -> [ rock sinking sink ]
late [ rock sinking no DeepBoulder ] -> [ DeepBoulder ]
late [ rock sinking DeepBoulder ] -> [ DeepBoulder ShallowBoulder ]
( END OBJECTS )
( PHYSICS: AFTER )
( 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 impulse after map edge stops obstacle )
[ impulse | impulsed stationary object ] -> [ | object ]
( remove impulse after pushing a rock or knocking over a tree )
[ impulsed stationary object ] -> [ 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....~~~~~
.b..~~..b.
...~~.....
.~~~....T.
~~~..T....
~~~.....o.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment