Skip to content

Instantly share code, notes, and snippets.

@instr3
Created October 4, 2020 16:30
Show Gist options
  • Save instr3/ae6c1753778c5fbf8809f405909c0023 to your computer and use it in GitHub Desktop.
Save instr3/ae6c1753778c5fbf8809f405909c0023 to your computer and use it in GitHub Desktop.
Superconductor (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Superconductor
author My Name Here
homepage www.puzzlescript.net
run_rules_on_level_start
again_interval 0.03
noaction
(verbose_logging)
========
OBJECTS
========
Background
White
Hole
Black
Exit
transparent
Growing
transparent
Disappearing
transparent
ActivatedExit
transparent
ArrowLPush
White green
...1.
..11.
.111.
..11.
...1.
ArrowRPush
White green
.1...
.11..
.111.
.11..
.1...
ArrowUPush
White green
.....
..1..
.111.
11111
.....
ArrowDPush
White green
.....
11111
.111.
..1..
.....
ArrowLRot
White brown
...1.
..11.
.111.
..11.
...1.
ArrowRRot
White brown
.1...
.11..
.111.
.11..
.1...
ArrowURot
White brown
.....
..1..
.111.
11111
.....
ArrowDRot
White brown
.....
11111
.111.
..1..
.....
ArrowLFlip
White darkgray
...1.
..11.
.111.
..11.
...1.
ArrowRFlip
White darkgray
.1...
.11..
.111.
.11..
.1...
ArrowUFlip
White darkgray
.....
..1..
.111.
11111
.....
ArrowDFlip
White darkgray
.....
11111
.111.
..1..
.....
LightL
Yellow
.....
.....
0.0..
.....
.....
LightLIn
Yellow
.....
.....
0.0..
.....
.....
LightR
Yellow
.....
.....
..0.0
.....
.....
LightRIn
Yellow
.....
.....
..0.0
.....
.....
LightU
Yellow
..0..
.....
..0..
.....
.....
LightUIn
Yellow
..0..
.....
..0..
.....
.....
LightD
Yellow
.....
.....
..0..
.....
..0..
LightDIn
Yellow
.....
.....
..0..
.....
..0..
Weak1LightL
#cc9900
.....
.....
0.0..
.....
.....
Weak1LightLIn
#cc9900
.....
.....
0.0..
.....
.....
Weak1LightR
#cc9900
.....
.....
..0.0
.....
.....
Weak1LightRIn
#cc9900
.....
.....
..0.0
.....
.....
Weak1LightU
#cc9900
..0..
.....
..0..
.....
.....
Weak1LightUIn
#cc9900
..0..
.....
..0..
.....
.....
Weak1LightD
#cc9900
.....
.....
..0..
.....
..0..
Weak1LightDIn
#cc9900
.....
.....
..0..
.....
..0..
Weak2LightL
#cc9900
.....
.....
0.0..
.....
.....
Weak2LightLIn
#cc9900
.....
.....
0.0..
.....
.....
Weak2LightR
#cc9900
.....
.....
..0.0
.....
.....
Weak2LightRIn
#cc9900
.....
.....
..0.0
.....
.....
Weak2LightU
#cc9900
..0..
.....
..0..
.....
.....
Weak2LightUIn
#cc9900
..0..
.....
..0..
.....
.....
Weak2LightD
#cc9900
.....
.....
..0..
.....
..0..
Weak2LightDIn
#cc9900
.....
.....
..0..
.....
..0..
SensorH
Black Red
0...0
0...0
0.1.0
0...0
0...0
SensorV
Black Red
00000
.....
..1..
.....
00000
SplitterU
darkgray Black
.101.
.101.
11011
11111
.....
SplitterD
darkgray Black
.....
11111
11011
.101.
.101.
SplitterL
darkgray Black
..11.
1111.
0001.
1111.
..11.
SplitterR
darkgray Black
.11..
.1111
.1000
.1111
.11..
DoorH
darkgray Black
00000
01010
01010
01010
00000
Target
DarkBlue
Wall
Gray
GratingH
Gray
00000
00000
.....
00000
00000
GratingV
Gray
00.00
00.00
00.00
00.00
00.00
Player
Yellow Pink BLACK
.000.
02020
20002
02220
.000.
Blood
Red Black
.0...
0110.
0001.
01010
.100.
Broken
Black
...0.
0....
.0...
....0
0....
Emitter
transparent
ActivatedSplitter
White
.....
.....
.....
.....
.....
Crate
Orange
DoNotDelete
transparent
=======
LEGEND
=======
. = Background
x = Hole
# = Wall
P = Player
E = Exit
> = ArrowRFlip
< = ArrowLFlip
^ = ArrowUFlip
v = ArrowDFlip
] = ArrowRRot
[ = ArrowLRot
u = ArrowDRot
n = ArrowURot
} = ArrowRPush
{ = ArrowLPush
Y = ArrowDPush
A = ArrowUPush
6 = LightR and Emitter
7 = LightL and Emitter
9 = LightU and Emitter
8 = LightD and Emitter
H = SensorH
T = SensorV
| = DoorH and Exit
$ = DoorH
Q = SplitterU
b = Broken
- = GratingH
! = GratingV
Light = LightL or LightR or LightU or LightD
ArrowL = ArrowLRot or ArrowLFlip or ArrowLPush
ArrowR = ArrowRRot or ArrowRFlip or ArrowRPush
ArrowU = ArrowURot or ArrowUFlip or ArrowUPush
ArrowD = ArrowDRot or ArrowDFlip or ArrowDPush
Arrow = ArrowL or ArrowR or ArrowU or ArrowD
ArrowPush = ArrowLPush or ArrowRPush or ArrowUPush or ArrowDPush
LightIn = LightLIn or LightRIn or LightUIn or LightDIn
BlockAll = Wall or DoorH
Splitter = SplitterU or SplitterD or SplitterL or SplitterR
SplitterH = SplitterL or SplitterR
SplitterV = SplitterU or SplitterD
BlockU = BlockAll or SensorV or SplitterH or SplitterD or GratingH
BlockD = BlockAll or SensorV or SplitterH or SplitterU or GratingH
BlockL = BlockAll or SensorH or SplitterV or SplitterR or GratingV
BlockR = BlockAll or SensorH or SplitterV or SplitterL or GratingV
Door = DoorH
Sensor = SensorH or SensorV
WeakLightL = Weak1LightL or Weak2LightL
WeakLightR = Weak1LightR or Weak2LightR
WeakLightU = Weak1LightU or Weak2LightU
WeakLightD = Weak1LightD or Weak2LightD
WeakLightLIn = Weak1LightLIn or Weak2LightLIn
WeakLightRIn = Weak1LightRIn or Weak2LightRIn
WeakLightUIn = Weak1LightUIn or Weak2LightUIn
WeakLightDIn = Weak1LightDIn or Weak2LightDIn
WeakLight = WeakLightL or WeakLightR or WeakLightU or WeakLightD
WeakLightIn = WeakLightLIn or WeakLightRIn or WeakLightUIn or WeakLightDIn
Weak1Light = Weak1LightL or Weak1LightR or Weak1LightU or Weak1LightD
Weak2Light = Weak2LightL or Weak2LightR or Weak2LightU or Weak2LightD
Weak1LightIn = Weak1LightLIn or Weak1LightRIn or Weak1LightUIn or Weak1LightDIn
Weak2LightIn = Weak2LightLIn or Weak2LightRIn or Weak2LightUIn or Weak2LightDIn
AnyLightU = LightU or WeakLightU
AnyLightD = LightD or WeakLightD
AnyLightL = LightL or WeakLightL
AnyLightR = LightR or WeakLightR
AnyLight = LightL or LightR or LightU or LightD or WeakLightL or WeakLightR or WeakLightU or WeakLightD
AnyLightIn = LightLIn or LightRIn or LightUIn or LightDIn or WeakLightLIn or WeakLightRIn or WeakLightUIn or WeakLightDIn
Grating = GratingH or GratingV
CrateObstacles = Wall or DoorH or Splitter or Sensor or Player or Arrow or Broken or Grating
=======
SOUNDS
=======
Sfx0 6715102 (death)
Sfx1 2761707 (push)
Sfx2 83445301 (switch)
Sfx3 7968302 (destroy)
================
COLLISIONLAYERS
================
Background
Hole
Broken
Blood
Exit
ActivatedExit
Emitter
Growing
Disappearing
Target
Player, Wall, Crate, Arrow, Sensor, DoorH, Splitter, Grating
LightL, LightR
LightU, LightD
LightLIn, LightRIn
LightUIn, LightDIn
Weak1LightL, Weak1LightR
Weak1LightU, Weak1LightD
Weak1LightLIn, Weak1LightRIn
Weak1LightUIn, Weak1LightDIn
Weak2LightL, Weak2LightR
Weak2LightU, Weak2LightD
Weak2LightLIn, Weak2LightRIn
Weak2LightUIn, Weak2LightDIn
ActivatedSplitter
DoNotDelete
======
RULES
======
(death)
late [ AnyLight Player ] -> [ AnyLight Blood ] Sfx0
late [ Hole Player ] -> [ Hole ] Sfx0
late [ Hole Arrow ] -> [ Hole ] Sfx0
(operation)
[> Player | ArrowPush | no CrateObstacles ] -> [ | Player no Light no LightIn | ArrowPush no Light ] Sfx1 again
[> Player | ArrowURot ] -> [Player | ArrowRRot ] Sfx1
[> Player | ArrowDRot ] -> [Player | ArrowLRot ] Sfx1
[> Player | ArrowLRot ] -> [Player | ArrowURot ] Sfx1
[> Player | ArrowRRot ] -> [Player | ArrowDRot ] Sfx1
([action Player | ArrowURot ] -> [Player | ArrowLRot ] Sfx1
[action Player | ArrowDRot ] -> [Player | ArrowRRot ] Sfx1
[action Player | ArrowLRot ] -> [Player | ArrowDRot ] Sfx1
[action Player | ArrowRRot ] -> [Player | ArrowURot ] Sfx1)
[> Player | ArrowUFlip ] -> [ Player | ArrowDFlip ] Sfx1
[> Player | ArrowDFlip ] -> [ Player | ArrowUFlip ] Sfx1
[> Player | ArrowLFlip ] -> [ Player | ArrowRFlip ] Sfx1
[> Player | ArrowRFlip ] -> [ Player | ArrowLFlip ] Sfx1
([action Player | ArrowUFlip ] -> [ Player | ArrowDFlip ] Sfx1
[action Player | ArrowDFlip ] -> [ Player | ArrowUFlip ] Sfx1
[action Player | ArrowLFlip ] -> [ Player | ArrowRFlip ] Sfx1
[action Player | ArrowRFlip ] -> [ Player | ArrowLFlip ] Sfx1)
(Light creation)
[ DoNotDelete ] -> [ ]
Down [ LightD | no LightUIn no BlockU] -> [ LightD | LightUIn ]
Up [ LightU | no LightDIn no BlockD] -> [ LightU | LightDIn ]
Right [ LightR | no LightLIn no BlockL] -> [ LightR | LightLIn ]
Left [ LightL | no LightRIn no BlockR] -> [ LightL | LightRIn ]
[ LightUIn no Arrow no LightD no Splitter ] -> [ LightUIn LightD ] again
[ LightDIn no Arrow no LightU no Splitter ] -> [ LightDIn LightU ] again
[ LightLIn no Arrow no LightR no Splitter ] -> [ LightLIn LightR ] again
[ LightRIn no Arrow no LightL no Splitter ] -> [ LightRIn LightL ] again
[ ArrowU no LightU LightUIn ] -> [ LightUIn Broken ] again Sfx3
[ ArrowD no LightD LightDIn ] -> [ LightDIn Broken ] again Sfx3
[ ArrowL no LightL LightLIn ] -> [ LightLIn Broken ] again Sfx3
[ ArrowR no LightR LightRIn ] -> [ LightRIn Broken ] again Sfx3
[ LightIn ArrowU no LightU ] -> [ LightIn ArrowU LightU ] again
[ LightIn ArrowD no LightD ] -> [ LightIn ArrowD LightD ] again
[ LightIn ArrowL no LightL ] -> [ LightIn ArrowL LightL ] again
[ LightIn ArrowR no LightR ] -> [ LightIn ArrowR LightR ] again
(Weak Light)
[ LightUIn SplitterU no ActivatedSplitter] -> [ LightUIn SplitterU ActivatedSplitter ]
[ LightDIn SplitterD no ActivatedSplitter] -> [ LightUIn SplitterD ActivatedSplitter ]
[ LightLIn SplitterL no ActivatedSplitter] -> [ LightUIn SplitterL ActivatedSplitter ]
[ LightRIn SplitterR no ActivatedSplitter] -> [ LightUIn SplitterR ActivatedSplitter ]
[ ActivatedSplitter SplitterV no WeakLight ] -> [ ActivatedSplitter SplitterV Weak1LightL Weak2LightR ] again
[ ActivatedSplitter SplitterH no WeakLight ] -> [ ActivatedSplitter SplitterH Weak1LightU Weak2LightD ] again
Down [ Weak1LightD | no Weak1LightUIn no BlockU ] -> [ Weak1LightD | Weak1LightUIn ]
Up [ Weak1LightU | no Weak1LightDIn no BlockD ] -> [ Weak1LightU | Weak1LightDIn ]
Right [ Weak1LightR | no Weak1LightLIn no BlockL ] -> [ Weak1LightR | Weak1LightLIn ]
Left [ Weak1LightL | no Weak1LightRIn no BlockR ] -> [ Weak1LightL | Weak1LightRIn ]
Down [ Weak2LightD | no Weak2LightUIn no BlockU ] -> [ Weak2LightD | Weak2LightUIn ]
Up [ Weak2LightU | no Weak2LightDIn no BlockD ] -> [ Weak2LightU | Weak2LightDIn ]
Right [ Weak2LightR | no Weak2LightLIn no BlockL ] -> [ Weak2LightR | Weak2LightLIn ]
Left [ Weak2LightL | no Weak2LightRIn no BlockR ] -> [ Weak2LightL | Weak2LightRIn ]
[ Weak1LightUIn no Arrow no Weak1LightD no Splitter ] -> [ Weak1LightUIn Weak1LightD ] again
[ Weak1LightDIn no Arrow no Weak1LightU no Splitter ] -> [ Weak1LightDIn Weak1LightU ] again
[ Weak1LightLIn no Arrow no Weak1LightR no Splitter ] -> [ Weak1LightLIn Weak1LightR ] again
[ Weak1LightRIn no Arrow no Weak1LightL no Splitter ] -> [ Weak1LightRIn Weak1LightL ] again
[ Weak2LightUIn no Arrow no Weak2LightD no Splitter ] -> [ Weak2LightUIn Weak2LightD ] again
[ Weak2LightDIn no Arrow no Weak2LightU no Splitter ] -> [ Weak2LightDIn Weak2LightU ] again
[ Weak2LightLIn no Arrow no Weak2LightR no Splitter ] -> [ Weak2LightLIn Weak2LightR ] again
[ Weak2LightRIn no Arrow no Weak2LightL no Splitter ] -> [ Weak2LightRIn Weak2LightL ] again
[ ArrowU Weak1LightIn Weak2LightIn no WeakLightUIn] -> [ Weak1LightIn Weak2LightIn ArrowU LightU DoNotDelete ] again
[ ArrowD Weak1LightIn Weak2LightIn no WeakLightUIn] -> [ Weak1LightIn Weak2LightIn ArrowD LightD DoNotDelete ] again
[ ArrowL Weak1LightIn Weak2LightIn no WeakLightUIn] -> [ Weak1LightIn Weak2LightIn ArrowL LightL DoNotDelete ] again
[ ArrowR Weak1LightIn Weak2LightIn no WeakLightUIn] -> [ Weak1LightIn Weak2LightIn ArrowR LightR DoNotDelete ] again
[ Weak1LightIn ArrowU no AnyLightU no Weak1LightUIn ] -> [ Weak1LightIn ArrowU Weak1LightU ] again
[ Weak1LightIn ArrowD no AnyLightD no Weak1LightDIn ] -> [ Weak1LightIn ArrowD Weak1LightD ] again
[ Weak1LightIn ArrowL no AnyLightL no Weak1LightLIn ] -> [ Weak1LightIn ArrowL Weak1LightL ] again
[ Weak1LightIn ArrowR no AnyLightR no Weak1LightRIn ] -> [ Weak1LightIn ArrowR Weak1LightR ] again
[ Weak2LightIn ArrowU no AnyLightU no Weak2LightUIn ] -> [ Weak2LightIn ArrowU Weak2LightU ] again
[ Weak2LightIn ArrowD no AnyLightD no Weak2LightDIn ] -> [ Weak2LightIn ArrowD Weak2LightD ] again
[ Weak2LightIn ArrowL no AnyLightL no Weak2LightLIn ] -> [ Weak2LightIn ArrowL Weak2LightL ] again
[ Weak2LightIn ArrowR no AnyLightR no Weak2LightRIn ] -> [ Weak2LightIn ArrowR Weak2LightR ] again
(Light destroying)
Down [ no WeakLightD | WeakLightUIn ] -> [ | no WeakLightUIn ]
Up [ no WeakLightU | WeakLightDIn ] -> [ | no WeakLightDIn ]
Right [ no WeakLightR | WeakLightLIn ] -> [ | no WeakLightLIn ]
Left [ no WeakLightL | WeakLightRIn ] -> [ | no WeakLightRIn ]
Down [ no LightD | LightUIn no Emitter ] -> [ | no LightUIn ]
Up [ no LightU | LightDIn no Emitter ] -> [ | no LightDIn ]
Right [ no LightR | LightLIn no Emitter ] -> [ | no LightLIn ]
Left [ no LightL | LightRIn no Emitter ] -> [ | no LightRIn ]
[ Disappearing Light WeakLight ] -> [ Light no WeakLight no Disappearing ] again
[ Disappearing AnyLight ] -> [ no AnyLight no Disappearing ] again
[ WeakLightL LightL ] -> [ Disappearing WeakLightL LightL ]
[ WeakLightR LightR ] -> [ Disappearing WeakLightR LightR ]
[ WeakLightU LightU ] -> [ Disappearing WeakLightU LightU ]
[ WeakLightD LightD ] -> [ Disappearing WeakLightD LightD ]
[ ArrowU WeakLightUIn ] -> [ ArrowU ] again
[ ArrowD WeakLightDIn ] -> [ ArrowD ] again
[ ArrowL WeakLightLIn ] -> [ ArrowL ] again
[ ArrowR WeakLightRIn ] -> [ ArrowR ] again
[ no Arrow no WeakLightUIn WeakLightD no SplitterH no Disappearing ] -> [ WeakLightD Disappearing ] again
[ no Arrow no WeakLightDIn WeakLightU no SplitterH no Disappearing ] -> [ WeakLightU Disappearing ] again
[ no Arrow no WeakLightLIn WeakLightR no SplitterV no Disappearing ] -> [ WeakLightR Disappearing ] again
[ no Arrow no WeakLightRIn WeakLightL no SplitterV no Disappearing ] -> [ WeakLightL Disappearing ] again
[ no WeakLightIn Arrow WeakLight no Disappearing ] -> [ Arrow WeakLight Disappearing ] again
[ no Arrow no LightUIn no Emitter LightD no Disappearing] -> [ LightD Disappearing ] again
[ no Arrow no LightDIn no Emitter LightU no Disappearing] -> [ LightU Disappearing ] again
[ no Arrow no LightLIn no Emitter LightR no Disappearing] -> [ LightR Disappearing ] again
[ no Arrow no LightRIn no Emitter LightL no Disappearing] -> [ LightL Disappearing ] again
[ no LightIn Arrow Light no Disappearing no DoNotDelete] -> [ Arrow Light Disappearing ] again
[ AnyLightIn Arrow no ArrowU LightU] -> [ AnyLightIn Arrow ] again
[ AnyLightIn Arrow no ArrowD LightD] -> [ AnyLightIn Arrow ] again
[ AnyLightIn Arrow no ArrowL LightL] -> [ AnyLightIn Arrow ] again
[ AnyLightIn Arrow no ArrowR LightR] -> [ AnyLightIn Arrow ] again
[ no LightUIn SplitterU ActivatedSplitter] -> [ SplitterU no ActivatedSplitter]
[ no LightDIn SplitterD ActivatedSplitter] -> [ SplitterD no ActivatedSplitter]
[ no LightLIn SplitterL ActivatedSplitter] -> [ SplitterL no ActivatedSplitter]
[ no LightRIn SplitterR ActivatedSplitter] -> [ SplitterR no ActivatedSplitter]
[ Splitter no ActivatedSplitter WeakLight ] -> [ Splitter WeakLight Disappearing ] again
[ Emitter LightIn ] -> [ LightIn ]
(Sensors)
[ Sensor AnyLight ] [ Door ] -> [ Sensor AnyLight ] [ no Door ] Sfx2
[ WeakLight Exit ] -> [ WeakLight ] message "The beam is too weak to power the launcher."
[ Light Exit ] -> [ Light ActivatedExit ]
late [ Player Exit ] -> [ Player Exit ] message "I should convey the beam to the exit first."
==============
WINCONDITIONS
==============
some player
all Player on ActivatedExit
=======
LEVELS
=======
message "This is the only beam of energy we have."
message "Try to convey it to the launcher. This is our only hope."
message "Remember: the should always be contained in a magnetic loop! Be careful!"
message Level 1: push the transmitters to flip them.
################
#.......#......#
#..v..<...v.<..#
#.p............#
#.......#.>.^..#
#..>6.^.#......#
#.......#......#
###########..###
#..............#
#.......>.v.>..#
#..............#
#.v.......<....|
#.H............#
#.>.....^......#
################
message Level 2
###############
#.............#
#.v.>.<.v.....#
#.............#
#.H.^...<.....|
#.............#
#.<...^.......#
########.######
#.....#.......#
#.....#.v.>.v.#
#.....#.......#
#.v.<.<.<...v.#
#.....#.......#
#.>6^.#.>.^.<.#
#p....#.......#
###############
message Level 3: green transmitters are pushable.
#################
#.....#.}...Y...#
#.Y7{.#.........#
#p....<.A...{.{.#
#.}.A.#.........#
#.....#.........#
#########^#######
#...............#
#...............|
#.....}..Y..A...#
#..H............#
#...............#
#.....A..{..}...#
#...............#
#################
message Level 4 Safeguard
################
#....>v>v>v....#
#p...9......Y..#
#.}..^>^>^>v...#
#...#!#!#!#!####
#..............#
#..............#
#..............#
#.A..A.....{...#
#..............#
###E############
message Level 5: brown transmitters are rotatable. Push them to rotate them clockwise.
###############
#.....#.......#
#.>6v.#.>.].v.#
#p....#.......#
#.n.u.<.^.<.u.#
#.....#.......#
#.^.<.#.^...<.#
#.....#.......#
##########^####
#.............#
#...]..>..v...#
#......H......#
#...n..[..[...|
#.............#
###############
message Level 6
#########
#.......#
#p]6].u.#
#.......#
#.n.<.u.#
#.......#
#.^.<.<.#
#..#.#..#
####^####
...#E#...
message Level 7
#################
#P........#.....#
#.]6.>....-...y.#
#.........#.....#
#.........#.....#
#.n.......-...{.#
#.........#.....#
#..A.Y....###b###
#.........#.....#
#####v##!##.....#
#.............{.#
|...............#
#....^..<.T.....#
#...............#
#################
message Level 8
#################
#...............#
#......>6v......#
#p..............#
#......^.<......#
#...............#
#######.#########
#.............#.#
#.v.<..q..v.<.#.#
#.h...........#.#
#.>.^.....>.^.#.#
#.............#.#
#...>.......>.<.|
#.............#.#
#################
message Level 9 Not a Sokoban
##################
#>...v>..v.......#
#................#
#^..7<^v...<.....#
#.#####..!#!#v.<<E
#.#p..#h.>..#....#
#.#.y}#>.>..#....#
#.#.a.#..#..->.^.#
#.###.####..#....#
#..#........#....#
#..#...##...#....#
#..#...###$##....#
#..#####.........#
#................#
##################
message Level 10
###########
#>....t..v#
#P........#
#.}6.y....#
#.......{.#
#.........|
#.a..{..y.#
#.........#
#^.......<#
###########
(#################
#......>6v......#
#......^.[......#
#p..............#
#.......vq.v....#
#...............#
#.......>..<....#
#...............#
#######.#########)
message to be continued...
message thank you for playing!
(
################
#......v.....<.#
#..>6u.v.......#
#.p^.<.........#
#..v.<.q.....v.#
zz
#..>...v..>..<.#
#..............#
#..............#
#..v...<.......E
#..>...^.......#
################
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment