Skip to content

Instantly share code, notes, and snippets.

Created April 26, 2014 23:59
Show Gist options
  • Save anonymous/11334280 to your computer and use it in GitHub Desktop.
Save anonymous/11334280 to your computer and use it in GitHub Desktop.
title
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Cave
author Alan Hazelden
homepage www.draknek.org
run_rules_on_level_start
again_interval 0.1
(verbose_logging)
========
OBJECTS
========
Sky
blue
Wall
#8a5c23 #805520 #966426
00001
01020
00000
20100
00000
Background
DarkBrown
Grass1
Green
00000
.....
.....
.....
.....
Grass2
Green
00000
....0
.....
.....
.....
Grass3
Green
00000
0....
.....
.....
.....
PlayerL
#3c8ee7 #e6e4d5
..1..
.00..
..0..
.00..
.0.0.
PlayerR
#3c8ee7 #e6e4d5
..1..
..00.
..0..
..00.
.0.0.
PlayerClimbing
#3c8ee7 #e6e4d5
..1..
.000.
..0..
..0..
.0.0.
PlayerClimbingL
#3c8ee7 #e6e4d5
.1...
00...
.0...
00...
0....
PlayerClimbingR
#3c8ee7 #e6e4d5
...1.
...00
...0.
...0.
....0
LiftCorner
Grey Yellow
.000.
00000
00100
00000
.000.
LiftRope
#d97d3c #d9903c
..0..
..0..
..1..
..0..
..0..
LiftRopeH
#d97d3c #d9903c
.....
.....
00100
.....
.....
Lift
transparent
LiftGraphic
Black
00000
.....
.....
.....
.....
Ladder
#d97d3c #f4c56a
.0.0.
.010.
.0.0.
.010.
.0.0.
RopeL
#d97d3c #d9903c
0....
0....
1....
0....
0....
RopeR
#d97d3c #d9903c
....0
....0
....1
....0
....0
Boulder
#1b1207 #30200c #2c190a
.100.
00200
00000
20010
.000.
Dark0_odd
transparent
Dark0_even
transparent
Dark1_odd
transparent
Dark1_even
transparent
Dark2_odd
transparent
Dark2_even
transparent
Dark3_odd
black
.0.0.
0.0.0
.0.0.
0.0.0
.0.0.
Dark3_even
black
0.0.0
.0.0.
0.0.0
.0.0.
0.0.0
Dark4_odd
black
Dark4_even
black
Dark5
black
DarkPending
transparent
LightSource
transparent
LightL
#726545
LightR
#726545
LightU
#726545
LightD
#f4e46a
=======
LEGEND
=======
. = Background
# = Wall
` = Sky
o = LiftCorner
L = Lift
P = PlayerR
U = Ladder
B = Boulder
[ = RopeL
] = RopeR
! = LightSource and Dark0_even and Sky
Player = PlayerL or PlayerR or PlayerClimbing or PlayerClimbingL or PlayerClimbingR
Grass = Grass1 or Grass2 or Grass3
LiftChain = LiftRope or LiftRopeH or LiftCorner
Falling = Player or Boulder
Solid = Wall or Boulder
Climbable = Ladder or RopeL or RopeR
Darkness = Dark0_even or Dark0_odd or Dark1_even or Dark1_odd or Dark2_even or Dark2_odd or Dark3_even or Dark3_odd or Dark4_even or Dark4_odd or Dark5
Dark1 = Dark1_even or Dark1_odd
Dark2 = Dark2_even or Dark2_odd
Light = LightSource or LightL or LightR or LightU or LightD
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
Light
Sky, Lift, Wall
LiftRope
Climbable
Boulder
LiftGraphic
Grass, LiftCorner, LiftRopeH
Player
Darkness
DarkPending
======
RULES
======
(Init)
down [ Sky | Wall no Grass ] -> [ Sky | Wall random Grass ]
horizontal [ LiftCorner | no LiftRopeH no Wall ] -> [ LiftCorner | LiftRopeH ]
(Darkness: can be commented out easily)
([ Darkness no Sky ] -> [])
([ Dark0_even | no Wall no Darkness ] -> [ Dark0_even | Dark0_odd ]
+ [ Dark0_odd | no Wall no Darkness ] -> [ Dark0_odd | Dark0_even ]
[ Dark0_even | no Darkness ] -> [ Dark0_even | Dark1_odd ]
[ Dark0_odd | no Darkness ] -> [ Dark0_odd | Dark1_even ]
[ Dark1 | no Darkness no DarkPending ] -> [ Dark1 | DarkPending ]
startloop
random [ DarkPending no Darkness ] -> [ action DarkPending ]
random [ action DarkPending | stationary Dark1 no DarkPending ] -> [ action DarkPending | action Dark1 ]
[ action DarkPending | stationary Dark1_even no DarkPending ] -> [ Dark1_odd DarkPending | Dark1_even ]
[ action DarkPending | stationary Dark1_odd no DarkPending ] -> [ Dark1_even DarkPending | Dark1_odd ]
[ action DarkPending ] -> []
[ action Dark1 ] -> [ Dark1 ]
endloop
[ DarkPending ] -> []
[ Dark1_even | no Darkness ] -> [ Dark1_even | Dark2_odd ]
[ Dark1_odd | no Darkness ] -> [ Dark1_odd | Dark2_even ]
[ Dark2_even | no Darkness ] -> [ Dark2_even | Dark3_odd ]
[ Dark2_odd | no Darkness ] -> [ Dark2_odd | Dark3_even ]
[ Dark3_even | no Darkness ] -> [ Dark3_even | Dark4_odd ]
[ Dark3_odd | no Darkness ] -> [ Dark3_odd | Dark4_even ]
[ Dark4_even | no Darkness ] -> [ Dark4_even | Dark5 ]
[ Dark4_odd | no Darkness ] -> [ Dark4_odd | Dark5 ]
[ Dark5 | no Darkness ] -> [ Dark5 | Dark5 ])
(Movement)
down [ right PlayerClimbingL | Solid ] -> [ PlayerR | Solid ]
down [ left PlayerClimbingR | Solid ] -> [ PlayerL | Solid ]
[ left Player ] -> [ left PlayerL ]
[ right Player ] -> [ right PlayerR ]
left [ > Player RopeL | Wall ] -> [ PlayerClimbingL RopeL | Wall ]
right [ > Player RopeR | Wall ] -> [ PlayerClimbingR RopeR | Wall ]
[ > Player | Wall ] -> cancel
[ vertical Player no Lift no Climbable ] -> [ Player ]
[ > Player | Boulder ] -> [ > Player | > Boulder ]
[ > Boulder | Solid ] -> cancel
(Lifts)
[ vertical Player Lift ] -> [ Player vertical Lift ]
[ up Lift LiftCorner ] -> [ Lift LiftCorner ]
down [ > Lift | Solid ] -> [ Lift | Solid ]
[ moving Lift | stationary LiftChain ] -> [ moving Lift | moving LiftChain ]
[ moving LiftChain | stationary LiftChain ] -> [ moving LiftChain | moving LiftChain ]
[ up LiftChain stationary Lift ] -> [ up LiftChain down Lift ]
[ down LiftChain stationary Lift ] -> [ down LiftChain up Lift ]
[ up Lift LiftCorner ] -> [ Lift LiftCorner ]
down [ > Lift | Solid ] -> [ Lift | Solid ]
[ stationary Lift moving LiftChain ] -> [ Lift action LiftChain ]
[ action LiftChain | LiftChain ] -> [ action LiftChain | action LiftChain ]
[ action LiftChain moving Lift ] -> [ action LiftChain Lift ]
[ moving LiftChain ] -> [ LiftChain ]
[ moving Lift stationary Falling ] -> [ moving Lift moving Falling ]
( Gravity)
late down [ Falling no Lift no Climbable | no Solid ] -> again
down [ stationary Falling no Lift no Climbable | no Solid ] -> [ > Falling | ]
(Update graphics)
late [ LiftRope ] -> []
late [ LiftGraphic ] -> []
late down [ Lift | ] -> [ Lift LiftRope | LiftGraphic ]
late up [ LiftRope no LiftCorner | no LiftCorner ] -> [ LiftRope | LiftRope ]
late down [ Player Ladder no Lift | no Solid ] -> [ PlayerClimbing Ladder | ]
late down [ Player RopeL no Lift | no Solid ] -> [ PlayerClimbingL RopeL | ]
late down [ Player RopeR no Lift | no Solid ] -> [ PlayerClimbingR RopeR | ]
late [ PlayerClimbingL no Climbable ] -> [ PlayerL ]
late [ PlayerClimbingR no Climbable ] -> [ PlayerR ]
(Light)
late [ Light no LightSource ] -> []
late down [ LightSource | no Light ] -> [ LightSource | LightD ]
late down [ LightD | no Light no Wall ] -> [ LightD | LightD ]
==============
WINCONDITIONS
==============
=======
LEVELS
=======
``````````
``````````
``!```````
##[#######
##[#o..o##
##[#....u#
#.[ul..lu#
#.pu.b..u#
##########
##########
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment