Skip to content

Instantly share code, notes, and snippets.

@variousauthors
Created June 13, 2022 23:36
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/733c2f249fedee5e2b847911208d2729 to your computer and use it in GitHub Desktop.
Save variousauthors/733c2f249fedee5e2b847911208d2729 to your computer and use it in GitHub Desktop.
Simple Block Pushing Game (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
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