Skip to content

Instantly share code, notes, and snippets.

@Draknek
Forked from anonymous/readme.txt
Last active June 26, 2017 17:34
Show Gist options
  • Save Draknek/7721f3fb4f99d6d3f519a695df12bb9a to your computer and use it in GitHub Desktop.
Save Draknek/7721f3fb4f99d6d3f519a695df12bb9a 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 Raft prototype
author Alan Hazelden
homepage www.draknek.org
noaction
norepeat_action
run_rules_on_level_start
(realtime_interval 0.5)
again_interval 0.1
(verbose_logging)
========
OBJECTS
========
Background
lightblue blue
11111
11101
11111
10111
11111
Target
DarkBlue Yellow Yellow
.111.
10201
12021
10201
.111.
Rock
Grey DarkGrey LightGrey
.....
..00.
.0001
.0111
...1.
ImmovableRock
DarkGrey DarkBrown
.00..
.001.
00011
00111
01111
Tree
Brown Green
..11.
111..
1.011
..0.1
..0..
RockInWater
DarkGrey DarkBrown LightGrey
.....
.111.
11111
11111
.111.
Land
#dfcc4f yellow
11111
01111
11101
11111
10111
Player
orange darkgreen #000000
..0..
.111.
01110
02220
.2.2.
(.000.
.000.
00000
.000.
.0.0.)
Crate
Brown Orange
.111.
10001
10001
10001
.111.
FloatingCrate
DarkBrown Brown
101.1
10101
10101
10101
10.01
(.111.
10001
10001
10001
.111.)
Teleporter
White
.....
.000.
.000.
.000.
.....
TeleportLineH
White
.....
.....
00000
.....
.....
TeleportLineV
White
..0..
..0..
..0..
..0..
..0..
Raft
DarkBrown Brown
101.1
10101
10101
10101
10.01
RaftOnLand
DarkBrown Brown
101.1
10101
10101
10101
10.01
Dragging
transparent
West
transparent
East
transparent
North
transparent
South
transparent
=======
LEGEND
=======
. = Background
_ = Raft
# = Land
P = Player and Land
* = Rock and Land
o = Crate and Land
! = Teleporter and Land
x = Target and Land
% = RockInWater
u = FloatingCrate
M = ImmovableRock and Land
T = Tree and Land
CanStand = Land or Raft or RockInWater or FloatingCrate
Obstacle = ImmovableRock or Tree
Pushable = Crate or Teleporter or Rock
Carryable = Pushable or Player
Floats = Raft or FloatingCrate
Solid = Obstacle or Pushable
TeleportLine = TeleportLineH or TeleportLineV
Direction = north or south or east or west
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
CanStand
RaftOnLand
Target
Pushable, Obstacle
Player
TeleportLine
Direction, Dragging
======
RULES
======
[ stationary Player ] [ stationary Direction ] -> [ Player ] [ action Direction ]
(finish up again rules from previous turn)
[ TeleportLine ] -> []
[ Player no CanStand ] -> []
[ Teleporter no CanStand ] -> [ RockInWater ]
[ Crate no CanStand ] -> [ FloatingCrate ]
[ Rock no CanStand ] -> [ RockInWater ]
[ Dragging | Raft ] -> [ RaftOnLand | ]
[ Dragging | Player ] -> [ Player | ]
(teleport - start)
[ > Player | Pushable | Teleporter ] -> [ > Player | > Pushable | > Teleporter ]
[ > Player | Teleporter ] -> [ > Player | > Teleporter ]
horizontal [ > Teleporter ] -> [ action Teleporter > TeleportLineH ]
vertical [ > Teleporter ] -> [ action Teleporter > TeleportLineV ]
[ > TeleportLine | no Solid ] -> [ TeleportLine | > TeleportLine ]
[ > TeleportLine | Teleporter ] -> [ TeleportLine | action Teleporter ]
(teleport - cancel)
[ > TeleportLine ] -> [ action TeleportLine ]
[ > Player | Pushable | action Teleporter | ... | action Teleporter | Solid ] -> [ Player | Pushable | Teleporter | ... | Teleporter action TeleportLineH | Solid ]
[ > Player | action Teleporter | ... | action Teleporter | Obstacle ] -> [ Player | Teleporter | ... | Teleporter action TeleportLineH | Obstacle ]
[ > Player | action Teleporter | ... | action Teleporter | Pushable | Solid ] -> [ Player | Teleporter | ... | Teleporter action TeleportLineH | Pushable | Solid ]
[ stationary TeleportLine | action TeleportLine ] -> [ action TeleportLine | ]
[ action TeleportLine ] -> []
(teleport - use)
[ > Player | Pushable | action Teleporter | ... | action Teleporter | no Pushable ] -> [ > Player | | Teleporter | ... | Teleporter | Pushable ]
[ > Player | action Teleporter | ... | action Teleporter | Pushable ] -> [ | Teleporter | ... | Teleporter | Player > Pushable ]
[ > Player | action Teleporter | ... | action Teleporter | ] -> [ | Teleporter | ... | Teleporter | Player ]
(teleport - push teleporter onto object)
horizontal [ > Player | Teleporter | Pushable ] -> [ > Player | action Teleporter < TeleportLineH | Pushable ]
vertical [ > Player | Teleporter | Pushable ] -> [ > Player | action Teleporter < TeleportLineV | Pushable ]
[ > TeleportLine | no Solid ] -> [ TeleportLine | > TeleportLine ]
[ > TeleportLine | Teleporter ] -> [ TeleportLine | action Teleporter ]
(teleport - cancel)
[ > TeleportLine ] -> [ action TeleportLine ]
[ Solid | action Teleporter | ... | > Player | action Teleporter | Pushable ] -> [ Solid | Teleporter action TeleportLineH | ... | Player | Teleporter | Pushable ]
[ stationary TeleportLine | action TeleportLine ] -> [ action TeleportLine | ]
[ action TeleportLine ] -> []
(teleport - use)
[ no Solid | action Teleporter | ... | > Player | action Teleporter | Pushable ] -> [ Pushable | Teleporter | ... | | Player | Teleporter ] again
(teleport - final cleanup)
[ TeleportLine Teleporter ] -> [ stationary Teleporter ] again
[ action Teleporter ] -> [ stationary Teleporter ] again
(movement)
[ no Floats no RaftOnLand > Player | no CanStand ] -> cancel
[ Floats > Player Direction | no CanStand ] -> cancel
[ > Player | Pushable ] -> [ > Player | > Pushable ]
[ > Player | Pushable | CanStand ] -> [ > Player | > Pushable | CanStand ]
[ > Player | Pushable RaftOnLand | no CanStand ] -> [ > Player | | Pushable Raft ]
[ RaftOnLand > Player | CanStand no Land ] -> [ RaftOnLand > Player | CanStand ] again
[ Raft > Player | Land ] -> [ action Raft | Land Player Dragging ] again
[ RaftOnLand > Player | no Land ] -> [ Player | Raft Dragging ] again
late [ Player no CanStand ] -> again
late [ Pushable no CanStand ] -> again
(Prevent large raft going onto land)
[ action Raft | Raft ] -> [ Raft | Raft ]
[ stationary Raft | Dragging ] -> [ Raft | ]
[ action Raft ] -> [ Raft ]
(Start raft moving)
([ CanStand | Floats no Raft > Player no Direction ] -> [ CanStand | > Floats > Player ]
[ CanStand no Raft | Raft > Player no Direction ] -> [ CanStand | > Raft > Player ])
[ Floats > Player no Direction ] -> [ > Floats > Player ]
[ > Player | Floats no Raft > Carryable ] -> [ > Player | > Floats > Carryable ]
[ > Player no Raft | Floats > Carryable ] -> [ > Player | > Floats > Carryable ]
[ moving Raft | stationary Raft ] -> [ moving Raft | moving Raft ]
[ left Floats ] -> [ Floats action West ]
[ right Floats ] -> [ Floats action East ]
[ up Floats ] -> [ Floats action North ]
[ down Floats ] -> [ Floats action South ]
(Cancel moves)
[ > Pushable | stationary Pushable ] -> cancel
[ > Player | Obstacle ] -> cancel
[ > Pushable | Obstacle ] -> cancel
[ > Player no Floats | no CanStand ] -> cancel
(Raft movement)
[ action North ] -> [ up North ]
[ action South ] -> [ down South ]
[ action East ] -> [ right East ]
[ action West ] -> [ left West ]
[ > Direction | CanStand no Direction ] -> [ action Direction | CanStand ]
[ action Direction | moving Direction ] -> [ action Direction | action Direction ]
[ action Direction ] -> []
[ > Direction Floats ] -> [ > Direction > Floats ]
[ > Floats Carryable ] -> [ > Floats > Carryable ]
[ > Floats ] -> again
(final cleanup)
[ > Player no Direction | Direction ] -> [ Player | Direction ]
[ > Player no Direction | no CanStand ] -> [ Player | ]
==============
WINCONDITIONS
==============
All Target on Player
All Player on Target
Some Player
=======
LEVELS
=======
..........................
....##....................
...####....#.###....###...
...#####...######..#####..
..##p###....#*#.....##x#..
..######u....##.....####..
....####.....###....####..
....###.......###....##...
....##..##..........##....
........#.......#...##..#.
.......###......##..#####.
.......####.....##...####.
......####....###.....###.
......###...#####.....###.
......##########....####..
.......#########....###...
........##..##......#.....
..........................
(..........................
....##.........##.........
...####....#.####...###...
...#####...#######.#####..
..##p###....#####...##x#..
..######__...###....####..
....####__...###....###...
....###......####....#....
....##........###.........
..............#.##........
.......##.......##........
.......####.....##........
......####....###.........
......###...#####.........
......########*#..........
.......#########..........
........##..##............
..........................)
..........................
....##....##...##.........
...#####...##.###...###...
...####....*######.#####..
..######...######...##x#..
..######u....###....####..
....####.....###....###...
....###.......###....#....
....##........###.........
.............##.##........
....#..##.......##........
...##..#p#......##........
..####*###....###.........
..#######...#####.........
...#..##...###*#..........
.......#..######..........
............##............
..........................
..........................
......###...##............
.......#########..........
.......#####!####.........
.........#####............
....##....................
...##.................##..
...###..............####..
....####............#####.
....#!###..###.......!###.
..#######..####.......##..
.########...!##...........
..##...##..#####...##..#..
.....!......####...######.
.##.###.....####..####!##.
.#p###.......##..##x####..
..###............####.....
..........................
(..........................
..........................
..........................
..........................
....................#.....
..####.............###....
.##p###...........#####...
.####!#...........!###....
..#####.....#.....#####...
...###.....####....#####..
..##*#....###!#....##.##..
..#.......#*#.............
.........#####.......##...
.........###*##.....####..
..........#.###....##x###.
............#.....#####.#.
....................##....
..........................)
..........................
...........##.#...........
....##....#####...........
...#####.######...........
...##!#...####............
..####.....#..............
..#####..........#.###....
..##p##..........##!##....
...#####.........######...
....###...........##*##...
...................###....
...........##.............
.........###!#............
.........#x###............
........####..............
.........##...............
..........................
..........................
..........................
....##.........##.........
...####....#.####.........
...#####...#######........
..######....###*#.........
..###!##u....###..........
....####......##..........
....###......####.........
....##.......#!##.........
..............##.......##.
..............#......###..
....................###...
.....!.......###....###...
.#.####...#######...##x#..
.#p####....#####....####..
.#####.......###.....#....
..##.#....................
..........................
..........................
.........#####............
........##*####...........
.........###!###..........
..........####............
...........u..............
..........................
...###....................
...####.............####..
...####.......#....##x#m..
..###!##....###.....##m##.
..#######..###.......!###.
...######...###.......##..
....####....!##...........
............####...##..#..
.....!m......###...######.
.##.###.....####..##!####.
.#p###.......##..#######..
..###............####.....
..........................
..........................
..........................
..........................
..........................
....................#.....
..####.............###....
.##p###...........#####...
.####!#...........!###....
..#####.....#.....#####...
...###.....####....#####..
..##*#....!###.....##.##..
..##......##..............
...#.....##*##.......##...
.........####*#.....####..
..........#.###....##x###.
............#.....#####.#.
....................##....
..........................
..........................
...##.............#.#.....
..#x###..........#####....
..######........######....
..#..##!........##..##....
......#..........#........
...........#..............
.....##...###..#..........
..##.###..###.###....##...
..#####...u#####....###...
...#!#......!#.......!##..
..####......###.....###...
..#p...............u####..
..##..............#######.
...##.............######..
...................###....
..........................
..........................
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment