Skip to content

Instantly share code, notes, and snippets.

Created August 23, 2015 17:06
Show Gist options
  • Save anonymous/6a8607e9095e95dfffb2 to your computer and use it in GitHub Desktop.
Save anonymous/6a8607e9095e95dfffb2 to your computer and use it in GitHub Desktop.
title
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Tentacle test
author Alan Hazelden - thanks to Ricky Liu
homepage www.puzzlescript.net
noaction
realtime_interval 0.2
again_interval 0.1
run_rules_on_level_start
(verbose_logging)
========
OBJECTS
========
Background
#ccc #ddd #bee
10000
12220
12220
12220
11110
Wall
#555 #444 #333 #222
00220
11001
02220
00011
31113
Hole
black
Crate
Brown
00000
0...0
0...0
0...0
00000
HumanStill
DarkRed #493c2b #000000
..0..
.111.
01110
02220
.2.2.
HumanL
DarkRed #493c2b #000000
..0..
.111.
01110
02220
.2.2.
HumanR
DarkRed #493c2b #000000
..0..
.111.
01110
02220
.2.2.
HumanU
DarkRed #493c2b #000000
..0..
.111.
01110
02220
.2.2.
HumanD
DarkRed #493c2b #000000
..0..
.111.
01110
02220
.2.2.
Player
transparent
Prev
transparent
Body
purple
PrevU
purple pink
.000.
.000.
.100.
..1..
.....
PrevD
purple pink
.....
..1..
.001.
.000.
.000.
PrevL
purple pink
.....
000..
0001.
001..
.....
PrevR
purple pink
.....
..100
.1000
..000
.....
NextU
purple pink
.001.
.001.
.000.
.....
.....
NextD
purple pink
.....
.....
.000.
.100.
.100.
NextL
purple pink
.....
110..
000..
000..
.....
NextR
purple pink
.....
..000
..000
..011
.....
(NextU2
purple pink
..001
..001
..00.
.....
.....
NextD2
purple pink
.....
.....
.00..
100..
100..
NextL2
purple pink
11...
000..
000..
.....
.....
NextR2
purple pink
.....
.....
..000
..000
...11)
Move
transparent
Fire
Orange Yellow DarkBrown
.0.0.
000..
0100.
.010.
2.2.2
=======
LEGEND
=======
. = Background
P = Player and PrevL
# = Wall
u = PrevU
d = PrevD
l = PrevL
r = PrevR
! = Body
* = Crate
@ = HumanStill
_ = Hole
x = Fire
Human = HumanStill or HumanL or HumanR or HumanU or HumanD
Next = NextU or NextD or NextL or NextR (or NextU2 or NextD2 or NextL2 or NextR2)
Prev_ = PrevU or PrevD or PrevL or PrevR or Body
Obstacle = Wall or Prev or Crate or Human
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
Hole, Fire
Prev, Prev_
Next, Player, Wall, Crate, Human
Move
======
RULES
======
([stationary Player] -> [Player Tick])
(simplify)
[Body] -> [Prev]
[PrevU] -> [Up Prev]
[PrevD] -> [Down Prev]
[PrevL] -> [Left Prev]
[PrevR] -> [Right Prev]
[Next] -> []
(human movement)
left [ Player | HumanStill | no Obstacle ] -> [ Player | HumanL | ]
right [ Player | HumanStill | no Obstacle ] -> [ Player | HumanR | ]
up [ Player | HumanStill | no Obstacle ] -> [ Player | HumanU | ]
down [ Player | HumanStill | no Obstacle ] -> [ Player | HumanD | ]
[ stationary Player ] [ HumanL ] -> [ Player ] [ left HumanL ]
[ stationary Player ] [ HumanR ] -> [ Player ] [ right HumanR ]
[ stationary Player ] [ HumanU ] -> [ Player ] [ up HumanU ]
[ stationary Player ] [ HumanD ] -> [ Player ] [ down HumanD ]
[ > Human | Obstacle ] -> [ HumanStill | Obstacle ]
(crates)
[ > Player | Crate ] -> [ > Player | > Crate ]
[ > Crate | no Obstacle ] -> [ | Crate ]
[ > Crate ] -> [ action Crate ]
(calculate movement)
[ > Player > Prev | moving Prev ] -> [ | Player moving Prev ]
[ > Player > Prev | ] -> [ Player > Prev | ]
[ > Player | action Crate ] -> [ Player < Move | Crate ]
[ > Player | no Obstacle ] -> [ | < Prev Player ]
[ > Player | Wall ] -> [ Player < Move | Wall ]
[ > Player ] -> [ Player ]
(pushing yourself around)
([ > Move > Prev | no Move ] -> [ Move > Prev | > Move ])
[ ^ Move > Prev | no Move ] -> [ Move > Prev | ^ Move ]
[ v Move > Prev | no Move ] -> [ Move > Prev | v Move ]
[ > Move > Prev | no Move ] -> cancel
random [ < Move > Prev | no Move ] -> [ action Move > Prev | < Move ]
[ > Move stationary Prev ] -> cancel
(random [ > Move > Prev | no Move ] [ Player ]-> [ > Move > Prev | > Move ] [ action Player > Move ]
random [ > Move stationary Prev ] [ Player ]-> [ > Move Prev ] [ action Player > Move ])
[ moving Move > Prev | no Move ] -> [ moving Move > Prev | moving Move ]
[ > Move | stationary Move ] -> cancel
([ > Move | stationary Move ] [ Player ] -> [ > Move | > Move ] [ action Player > Move ]
[ action Player moving Move ] [ action Move ] -> [ action Player moving Move ] [ moving Move ]
[ action Player moving Move ] [ stationary Move ] -> [ action Player moving Move ] [ moving Move ]
[ action Player ] -> [ Player ])
[ > Move stationary Prev | action Move ] -> cancel
[ > Move | Wall ] -> cancel
[ > Move | Crate ] -> [ > Move | > Crate ]
[ > Move | stationary Human ] -> [ > Move | > Human ]
[ > Crate | Crate ] -> cancel
[ > Crate | Wall ] -> cancel
[ > Crate | Human ] -> cancel
[ > Crate | Hole ] -> [ | ]
[ > Crate | Fire ] -> [ | Fire ]
[ > Human | Crate ] -> cancel
[ > Human | Wall ] -> cancel
[ > Human | Human ] -> cancel
[ > Human | Hole ] -> [ | ]
[ > Human | Fire ] -> [ | Fire ]
[ action Move Prev ] -> []
[ > Move moving Prev no Player | no Move no Obstacle ] -> [ | moving Prev ]
+ [ > Move stationary Prev no Player | no Move no Obstacle ] -> [ | Prev ]
+ [ > Crate | no Move no Obstacle ] -> [ | Crate ]
+ [ > HumanStill | no Move no Obstacle ] -> [ | HumanStill ]
[ > Crate ] -> cancel
[ > Move moving Prev Player | no Obstacle ] -> [ Player > Prev | moving Prev ]
(holes)
[ Hole no Prev | < Prev ] [ Player ] -> [ Hole | < Prev ] [ action Player ]
[ action Player > Prev | ] -> [ | Player ] again
[ stationary Prev Hole ] -> [ Hole ] again
[ stationary Prev Hole ] -> [ Prev Hole ] again
(desimplify)
[Up Prev] -> [PrevU]
[Down Prev] -> [PrevD]
[Left Prev] -> [PrevL]
[Right Prev] -> [PrevR]
[stationary Prev ] -> [Body]
[ Move ] -> []
(draw)
late Up [PrevU | ] -> [PrevU | NextD]
late Down [PrevD | ] -> [PrevD | NextU]
late Left [PrevL | ] -> [PrevL | NextR]
late Right [PrevR | ] -> [PrevR | NextL]
late [ Prev_ Fire ] -> cancel
==============
WINCONDITIONS
==============
=======
LEVELS
=======
############
#..........#
#..........#
#..........#
#...xxxxxxx#
#...########
#..........#
#..........#
#####x....##
#..........#
#..........#
#..........#
#....#######
#..........#
#..........#
#####..#####
#..........#
#......dp..#
#....!ll...#
############
############
#..........#
#..........#
#!lp...@...#
#..........#
#....*...#.#
#..........#
#..........#
#..........#
#....#.....#
#..........#
############
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment