Skip to content

Instantly share code, notes, and snippets.

@david-crespo
Created April 13, 2023 15:59
Show Gist options
  • Save david-crespo/1eed8e14ec83c9e0ef6ef6b7e6887bed to your computer and use it in GitHub Desktop.
Save david-crespo/1eed8e14ec83c9e0ef6ef6b7e6887bed to your computer and use it in GitHub Desktop.
Light Lines (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Light Lines
author David Crespo
homepage www.puzzlescript.net
( debug )
========
OBJECTS
========
Background
lightgreen green
11111
01111
11101
11111
10111
Wall
brown darkbrown
00010
11111
01000
11111
00010
Wire
gray blue
.010.
00100
11111
00100
.010.
LiveWire
gray blue lightblue
.010.
00100
11211
00100
.010.
LitWire
gray lightblue
.010.
00100
11111
00100
.010.
Player
black orange white blue
.000.
.111.
22222
.333.
.3.3.
Light
gray darkgray
00100
01110
11111
01110
00100
Lit
gray white
00100
01110
11111
01110
00100
=======
LEGEND
=======
. = Background
# = Wall
P = Player
O = Light
* = Lit
+ = Wire
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
Player, Wall, Light, Lit, Wire, LiveWire, LitWire
======
RULES
======
[ Lit ] -> [ Light ]
[ LitWire ] -> [ Wire ]
[ LiveWire ] -> [ Wire ]
( wires are pushable )
[ > Player | Wire ] -> [ > Player | > Wire ]
( Q: should player touching a wire work like touching a light,
or should player have to touch a light directly? )
( Loop needed to get through chains of light-wire-light-wire-light )
startloop
late [ Player | Light ] -> [ Player | Lit ]
late [ Lit | Light ] -> [ Lit | Lit ]
late [ Lit | Wire ] -> [ Lit | LiveWire ]
late [ LiveWire | Light ] -> [ LiveWire | Lit ]
late [ LitWire | Light ] -> [ LitWire | Lit ]
endloop
( problem: this only works for lights on opposite sides, not two adjacent sides )
late [ Lit | LiveWire | Lit ] -> [ Lit | LitWire | Lit ]
==============
WINCONDITIONS
==============
( No Light )
=======
LEVELS
=======
.............
.p.oooo..ooo.
...o..oo.+...
..+....ooo...
.oooo....+...
.o....oooo...
.o....+......
oo.o+oo......
o..o..o......
o.ooo.oo.....
.......o.....
.ooo+ooo.....
.............
message You did it!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment