Skip to content

Instantly share code, notes, and snippets.

@instr3
Created October 3, 2020 09:27
Show Gist options
  • Save instr3/7b8c0a7a63cb04ea6a808133376f24bb to your computer and use it in GitHub Desktop.
Save instr3/7b8c0a7a63cb04ea6a808133376f24bb to your computer and use it in GitHub Desktop.
My Game (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title My Game
author My Name Here
homepage www.puzzlescript.net
run_rules_on_level_start
again_interval 0.03
========
OBJECTS
========
Background
White
Hole
Black
Exit
transparent
Growing
transparent
Disappearing
transparent
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 black
...1.
..11.
.111.
..11.
...1.
ArrowRFlip
White black
.1...
.11..
.111.
.11..
.1...
ArrowUFlip
White black
.....
..1..
.111.
11111
.....
ArrowDFlip
White black
.....
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..
SensorH
Black Red
0...0
0...0
0.1.0
0...0
0...0
SensorV
Black Red
00000
.....
..1..
.....
00000
DoorH
darkgray Black
00000
01010
01010
01010
00000
Target
DarkBlue
Wall
Gray
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
Crate
Orange
=======
LEGEND
=======
. = Background
x = Hole
# = Wall
P = Player
E = Exit
> = ArrowRFlip
< = ArrowLFlip
^ = ArrowUFlip
v = ArrowDFlip
] = ArrowRRot
[ = ArrowLRot
u = ArrowDRot
n = ArrowURot
} = LightR and Emitter
{ = LightL and Emitter
9 = LightU and Emitter
8 = LightD and Emitter
H = SensorH
T = SensorV
| = DoorH and Exit
Light = LightL or LightR or LightU or LightD
ArrowL = ArrowLRot or ArrowLFlip
ArrowR = ArrowRRot or ArrowRFlip
ArrowU = ArrowURot or ArrowUFlip
ArrowD = ArrowDRot or ArrowDFlip
Arrow = ArrowL or ArrowR or ArrowU or ArrowD
LightIn = LightLIn or LightRIn or LightUIn or LightDIn
BlockAll = Wall or DoorH
BlockU = BlockAll or SensorV
BlockD = BlockAll or SensorV
BlockL = BlockAll or SensorH
BlockR = BlockAll or SensorH
Door = DoorH
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
Hole
Broken
Blood
Exit
Emitter
Growing
Disappearing
Target
Player, Wall, Crate, ArrowL, ArrowR, ArrowU, ArrowD, SensorH, DoorH, SensorV
LightL, LightR
LightU, LightD
LightLIn, LightRIn
LightUIn, LightDIn
======
RULES
======
late [ Light Player ] -> [ Light Blood ]
late [ Hole Player ] -> [ Hole ]
[> Player | ArrowURot ] -> [Player | ArrowRRot ]
[> Player | ArrowDRot ] -> [Player | ArrowLRot ]
[> Player | ArrowLRot ] -> [Player | ArrowURot ]
[> Player | ArrowRRot ] -> [Player | ArrowDRot ]
[action Player | ArrowURot ] -> [Player | ArrowLRot ]
[action Player | ArrowDRot ] -> [Player | ArrowRRot ]
[action Player | ArrowLRot ] -> [Player | ArrowDRot ]
[action Player | ArrowRRot ] -> [Player | ArrowURot ]
[> Player | ArrowUFlip ] -> [ Player | ArrowDFlip ]
[> Player | ArrowDFlip ] -> [ Player | ArrowUFlip ]
[> Player | ArrowLFlip ] -> [ Player | ArrowRFlip ]
[> Player | ArrowRFlip ] -> [ Player | ArrowLFlip ]
[action Player | ArrowUFlip ] -> [ Player | ArrowDFlip ]
[action Player | ArrowDFlip ] -> [ Player | ArrowUFlip ]
[action Player | ArrowLFlip ] -> [ Player | ArrowRFlip ]
[action Player | ArrowRFlip ] -> [ Player | ArrowLFlip ]
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 ] -> [ LightUIn LightD ] again
[ LightDIn no Arrow no LightU ] -> [ LightDIn LightU ] again
[ LightLIn no Arrow no LightR ] -> [ LightLIn LightR ] again
[ LightRIn no Arrow no LightL ] -> [ LightRIn LightL ] again
[ ArrowU no LightU LightUIn ] -> [ LightUIn Broken ] again
[ ArrowD no LightD LightDIn ] -> [ LightDIn Broken ] again
[ ArrowL no LightL LightLIn ] -> [ LightLIn Broken ] again
[ ArrowR no LightR LightRIn ] -> [ LightRIn Broken ] again
[ 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
(random [ Wall ] -> [ no Wall ])
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 ] -> [ no Light no 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 ] -> [ Arrow Light Disappearing ] again
[ LightIn Arrow no ArrowU LightU ] -> [ LightIn Arrow ] again
[ LightIn Arrow no ArrowD LightD ] -> [ LightIn Arrow ] again
[ LightIn Arrow no ArrowL LightL ] -> [ LightIn Arrow ] again
[ LightIn Arrow no ArrowR LightR ] -> [ LightIn Arrow ] again
[ Emitter LightIn ] -> [ LightIn ]
[ SensorH Light ] [ Door ] -> [ SensorH Light ] [ no Door ]
==============
WINCONDITIONS
==============
some player
all Player on Exit
=======
LEVELS
=======
################
#.......#......#
#..v..<...v.<..#
#.p............#
#.......#.>.^..#
#..>}.^.#......#
#.......#......#
##########....##
#..............#
#..v.>.>.v..>..#
#..............#
#..H.^...<.....|
#..............#
#..>...^.......#
################
message brown transmitters are rotatable. Push them to rotate them clockwise. Press action keys (x) to rotate them counter-clockwise.
###################
#.......#.........#
#.>}.v..#.>..]..v.#
#p......#.........#
#.......#.........#
#.n..u..<.^..[..u.#
#.......#.........#
#.......#.........#
#.^..<..#.^..<..<.#
#.......#.........#
#############v#####
#...>.......v.....#
#...^.T.....<<....|
#.................#
###################
message thank you for playing!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment