Skip to content

Instantly share code, notes, and snippets.

@dario-zubovic
Created July 29, 2018 09:16
Show Gist options
  • Save dario-zubovic/02b59383be945c98597005578e1332b0 to your computer and use it in GitHub Desktop.
Save dario-zubovic/02b59383be945c98597005578e1332b0 to your computer and use it in GitHub Desktop.
Cavemania (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Cavemania
author Dario Zubovic
run_rules_on_level_start
again_interval 0.125
noaction
zoomscreen 18x10
========
OBJECTS
========
Background
DARKBLUE
Target
White
.....
.000.
.0.0.
.000.
.....
Wall1
Gray DARKGRAY
00010
00110
01001
01100
.0010
Wall2
Gray DARKGRAY
.0000
01000
10110
0000.
00011
Wall3
Gray DARKGRAY
01010
0010.
00000
10000
0000.
Player
Black Orange White Blue
.000.
.111.
22222
.333.
.3.3.
Ladder
BROWN
.0.0.
.000.
.0.0.
.000.
.0.0.
Platform
BROWN
.....
.....
.....
.....
00000
Switch1
#7ee5d8 BROWN
...00
...11
..11.
.11..
.111.
Switch1_rev
#7ee5d8 BROWN
00...
11...
.11..
..11.
.111.
Stone1
#aaeaf2 #7ee5d8 #52b7cc
.1111
21001
21101
22111
.222.
MStone1
#aaeaf2 #7c7ca3 #494554
.1111
21001
21001
22111
.222.
Switch2
#df7ee5 BROWN
...00
...11
..11.
.11..
.111.
Switch2_rev
#df7ee5 BROWN
00...
11...
.11..
..11.
.111.
Stone2
#eeaaf2 #df7ee5 #a552cc
.1111
21001
21101
22111
.222.
MStone2
#eeaaf2 #7c7ca3 #494554
.1111
21001
21001
22111
.222.
MagicBlock2
#eeaaf2 #df7ee5 #a552cc
11101
20221
22001
20211
10222
MagicLadder2
#eeaaf2
.0.0.
.000.
.0.0.
.000.
.0.0.
Stone2Target
#eeaaf2
.....
.000.
.0.0.
.000.
.....
Switch3
#f2f1aa BROWN
...00
...11
..11.
.11..
.111.
Switch3_rev
#f2f1aa BROWN
00...
11...
.11..
..11.
.111.
Stone3
#f2f1aa #e5e17e #ccc852
.1111
21001
21001
22111
.222.
MStone3
#f2f1aa #7c7ca3 #494554
.1111
21001
21001
22111
.222.
MagicBlock3
#f2f1aa #e5e17e #ccc852
11101
20221
22001
20211
10222
MagicLadder3
#f2f1aa
.0.0.
.000.
.0.0.
.000.
.0.0.
Stone3Target
#f2f1aa
.....
.000.
.0.0.
.000.
.....
Trapdoor
BROWN DARKBROWN
00100
.....
.....
.....
.....
Trapopen
BROWN DARKBROWN
0...0
0...0
1...1
.....
.....
SignPost
BROWN DARKBROWN
00000
01110
00000
..0..
..0..
SignPost2
BROWN DARKBROWN
00000
01110
00000
..0..
..0..
Temp
TRANSPARENT
Temp_rev
TRANSPARENT
Temp2
TRANSPARENT
Temp2_rev
TRANSPARENT
Web
Gray LIGHTGRAY
0.1.0
.1.0.
..11.
.1.1.
0..0.
=======
LEGEND
=======
. = Background
# = Wall1
~ = Wall2
& = Wall3
Wall = Wall1 or Wall2 or Wall3
P = Player
O = Target
w = Web
t = Trapdoor
l = Ladder
_ = Platform
- = Ladder and Platform
* = Platform and Stone1
/ = Platform and Stone2
+ = Platform and Stone2Target
m = MagicBlock2
, = MagicBlock2 and Platform
\ = MagicBlock3
@ = Stone3Target
s = SignPost
? = SignPost2
Ladders = Ladder or MagicLadder2 or MagicLadder3
MagicBlocks = MagicBlock2 or MagicBlock3
MovableStone = MStone1 or MStone2 or MStone3
Stones = Stone1 or Stone2 or Stone3
Switches = Switch1 or Switch1_rev or Switch2 or Switch2_rev or Switch3 or Switch3_rev
Blocking = Wall or MovableStone or Stones or Switches or MagicBlocks
Falling = MovableStone or Stones
Temps = Temp or Temp_rev or Temp2 or Temp2_rev
1 = Switch1
! = Stone1
2 = Switch2
" = Stone2
3 = Switch3_rev
£ = Stone3
$ = MStone3
=======
SOUNDS
=======
MovableStone MOVE 36772507
sfx0 83332503 ( switch )
sfx1 54497303 ( magic block -> magic ladder )
================
COLLISIONLAYERS
================
Background
Web, SignPost, SignPost2
Target
Ladders
Platform, Trapdoor, Trapopen
Temps
Stone2Target, Stone3Target
Player, Blocking
======
RULES
======
( message )
late [ Player SignPost ] -> [ Player SignPost ] message Mystical cave ahead
late [ Player SignPost2 ] -> [ Player SignPost2 ] message Gems can only be taken when you solve cave's secrets
( movement )
horizontal up [ > Player | MovableStone ] -> [ > Player | > MovableStone ]
[ > MovableStone | Stones ] -> [ > MovableStone | > Stones ]
[ > Stones | Stones ] -> [ > Stones | > Stones ]
( switches )
left [ > Player | Switch1 ] [ Stone1 ] -> [ Player | Switch1_rev ] [ MStone1 ] sfx0
right [ > Player | Switch1_rev ] [ MStone1 ] -> [ Player | Switch1 ] [ Stone1 ] sfx0
left [ > Player | Switch2 ] [ Stone2 ] -> [ Player | Switch2_rev ] [ MStone2 ] sfx0
right [ > Player | Switch2_rev ] [ MStone2 ] -> [ Player | Switch2 ] [ Stone2 ] sfx0
left [ > Player | Switch3 ] [ MStone3 ] -> [ Player | Switch3_rev ] [ Stone3 ] sfx0
right [ > Player | Switch3_rev ] [ Stone3 ] -> [ Player | Switch3 ] [ MStone3 ] sfx0
( magic switches )
left [ > Player | Switch2 ] [ MagicBlock2 ] -> [ Player | Switch2_rev ] [ MagicLadder2 Temp ] sfx0
right [ > Player | Switch2_rev ] [ MagicLadder2 ] -> [ Player | Switch2 ] [ MagicBlock2 Temp_rev ] sfx0
( magic *.* )
[ MStone2 Stone2Target ] -> [ MagicBlock2 Temp ]
[ Stone2 Stone2Target ] -> [ MagicBlock2 Temp_rev ]
[ MStone3 Stone3Target ] -> [ MagicBlock3 Temp2 ]
[ Stone3 Stone3Target ] -> [ MagicBlock3 Temp2_rev ]
late random [ Temp ] [ MagicBlock2 ] -> [ Temp ] [ MagicLadder2 ] sfx1
late random [ Temp2 ] [ MagicBlock3 ] -> [ Temp2 ] [ MagicLadder3 ] sfx1
late random [ Temp_rev ] [ MagicLadder2 ] -> [ Temp_rev ] [ MagicBlock2 ] sfx1
late random [ Temp2_rev ] [ MagicLadder3 ] -> [ Temp2_rev ] [ MagicBlock3 ] sfx1
[ > Player ] [ Temps ] -> [ > Player ] [ ]
( gravity )
random [ Trapopen ] -> [ Trapdoor ]
down [ down Player Platform | no Ladders ] -> [ Player Platform | ] ( prevent jumping from platform )
down [ down Player | Trapdoor ] -> [ Player | Trapdoor ]
down [ stationary Player no Ladders no Platform | no Blocking ] -> [ down Player | ]
down [ stationary MovableStone no Platform | no Blocking no Trapdoor ] -> [ down MovableStone | ]
down [ stationary Stones no Platform | no Blocking ] -> [ down Stones | ]
late down [ Stones | Trapdoor ] -> [ Stones | Trapopen ]
late down [ Player | Trapdoor ] -> [ Player | Trapopen ]
[ Player ] -> again
==============
WINCONDITIONS
==============
All MovableStone on Target
=======
LEVELS
=======
........##~###~~#~#&&
Ps.?OO.-___*_-..#...#
~&#~###l.....ltt~./-~
~w.....l.....l..#..l&
&.._-__-_#-##-_.~..l~
#...l..l#.l...#.#t.l#
#...l1.l#.l...~.#..l~
#___-~#-#_-_____...l~
~...l..l2.l........l#
~...l__-__-________-#
#......l...........l&
~#&~t..m...........l~
#&.....m...........l#
&..____+___________-~
~......m...........\#
#......m.3.£.......\~
#______,____......$\#
~w.....l...lmmmmm##\#
&......l...l##.....\#
#......l...l.......@#
#~##&&~&###~&~&##&###
message Wohoooo! :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment