Skip to content

Instantly share code, notes, and snippets.

@jamesamiles
Last active June 30, 2018 12:15
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 jamesamiles/2825915f92c5c3461a3b57e40099de35 to your computer and use it in GitHub Desktop.
Save jamesamiles/2825915f92c5c3461a3b57e40099de35 to your computer and use it in GitHub Desktop.
Stairs (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Stairs
========
OBJECTS
========
Background
darkbrown black
11111
10001
10001
10001
11111
Foreground
black
Wall
darkgreen
Stair_1
darkbrown red
00000
00000
00100
00000
00000
Stair_2
red orange
00000
01000
00000
00010
00000
Stair_3
orange yellow
00000
01000
00100
00010
00000
Stair_4
yellow green
00000
01010
00000
01010
00000
Stair_5
green blue
00000
01010
00100
01010
00000
Stair_6
blue purple
00000
01010
01010
01010
00000
Stair_7
purple white
00000
01010
01110
01010
00000
Player
lightblue
00.00
0...0
.....
0...0
00.00
Goal
gray lightgray
11001
0...1
0...0
1...0
10011
=======
LEGEND
=======
. = Background
, = Foreground
# = Wall
P = Player
1 = Stair_1
2 = Stair_2
3 = Stair_3
4 = Stair_4
5 = Stair_5
6 = Stair_6
7 = Stair_7
A = Stair_1 and Goal
B = Stair_2 and Goal
C = Stair_3 and Goal
D = Stair_4 and Goal
E = Stair_5 and Goal
F = Stair_6 and Goal
G = Stair_7 and Goal
X = Goal
=======
SOUNDS
=======
sfx0 15810707
endlevel 26533306
================
COLLISIONLAYERS
================
Background
Stair_1
Stair_2
Stair_3
Stair_4
Stair_5
Stair_6
Stair_7
Goal
Wall, Player
Foreground
======
RULES
======
(* The Stairs have Stairs beneath them *)
([Wall] -> [Wall Stair_6])
[Stair_7] -> [Stair_7 Stair_6]
[Stair_6] -> [Stair_6 Stair_5]
[Stair_5] -> [Stair_5 Stair_4]
[Stair_4] -> [Stair_4 Stair_3]
[Stair_3] -> [Stair_3 Stair_2]
[Stair_2] -> [Stair_2 Stair_1]
(* Player climbs Stairs at most one layer higher *)
[> Player | Stair_1 no Stair_2] -> [ | Stair_1 Player no Stair_2]
[Stair_1 > Player | Stair_2 no Stair_3] -> [Stair_1 | Stair_2 Player no Stair_3]
[Stair_2 > Player | Stair_3 no Stair_4] -> [Stair_2 | Stair_3 Player no Stair_4]
[Stair_3 > Player | Stair_4 no Stair_5] -> [Stair_3 | Stair_4 Player no Stair_5]
[Stair_4 > Player | Stair_5 no Stair_6] -> [Stair_4 | Stair_5 Player no Stair_6]
[Stair_5 > Player | Stair_6 no Stair_7] -> [Stair_5 | Stair_6 Player no Stair_7]
[Stair_6 > Player | Stair_7 no Wall] -> [Stair_6 | Stair_7 Player no Wall]
(* If Player doesn't climb, push the stair that is one layer higher *)
[> Player no Stair_1| Stair_1] -> [> Player no Stair_1| > Stair_1] sfx0
[Stair_1 no Stair_2 > Player | Stair_2] -> [Stair_1 no Stair_2 > Player | > Stair_2] sfx0
[Stair_2 no Stair_3 > Player | Stair_3] -> [Stair_2 no Stair_3 > Player | > Stair_3] sfx0
[Stair_3 no Stair_4 > Player | Stair_4] -> [Stair_3 no Stair_4 > Player | > Stair_4] sfx0
[Stair_4 no Stair_5 > Player | Stair_5] -> [Stair_4 no Stair_5 > Player | > Stair_5] sfx0
[Stair_5 no Stair_6 > Player | Stair_6] -> [Stair_5 no Stair_6 > Player | > Stair_6] sfx0
[Stair_6 no Stair_7 > Player | Stair_7] -> [Stair_6 no Stair_7 > Player | > Stair_7] sfx0
(* Stairs Block Player *)
[> Player | Stair_1] -> [Player | Stair_1]
[> Player | Stair_2] -> [Player | Stair_2]
[> Player | Stair_3] -> [Player | Stair_3]
[> Player | Stair_4] -> [Player | Stair_4]
[> Player | Stair_5] -> [Player | Stair_5]
[> Player | Stair_6] -> [Player | Stair_6]
[> Player | Stair_7] -> [Player | Stair_7]
==============
WINCONDITIONS
==============
Some Goal on Player
=======
LEVELS
=======
Message Level 1
#,#######,#
#,#.....#,#
#,#.....#,#
#,#..A..#,#
#,#P....#,#
#1#.....#1#
###########
Message Level 2
#,#######,#
#,#.....#,#
#,#.....#,#
#,#..B..#,#
#2#P....#2#
#1#.....#1#
###########
Message Level 3
#,#######,#
#,#.....#,#
#,#.....#,#
#3#..C..#3#
#2#P....#2#
#1#.....#1#
###########
Message Level 4
#,#######,#
#,#.....#,#
#4#.....#4#
#3#..D..#3#
#2#P....#2#
#1#.....#1#
###########
Message Level 5
#,#######,#
#5#.....#5#
#4#.....#4#
#3#..E..#3#
#2#P....#2#
#1#.....#1#
###########
Message Level 6
#6#######6#
#5#.....#5#
#4#.....#4#
#3#..F..#3#
#2#P....#2#
#1#.....#1#
###########
Message The End?
###############
#.....#7#...21#
#..21.#7#.543.#
#..G..#7#.675.#
#P.1..#7#.454.#
#.....#7#.1...#
###############
Message Fin.
(* Notes
Update 1
---------------
Added a 7th stair and a 7th level.
Update 2
---------------
Fixing the aesthetic.
For stairs, the middle 3x3 pixels are now dice patterns indicating height.
Goal has been redesigned to fit on the boundary pixels.
*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment