Skip to content

Instantly share code, notes, and snippets.

@Draknek
Forked from anonymous/readme.txt
Last active April 15, 2017 20:36
Show Gist options
  • Save Draknek/f655a35c6ec3908e18e49e44e291eae9 to your computer and use it in GitHub Desktop.
Save Draknek/f655a35c6ec3908e18e49e44e291eae9 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
#242620
.000.
.000.
00000
.000.
.0.0.
Crate
Brown Orange
.111.
10001
10001
10001
.111.
FloatingCrate
DarkBrown Brown
.111.
10001
10001
10001
.111.
Teleporter
White
.....
.000.
.000.
.000.
.....
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
Direction = north or south or east or west
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
CanStand
RaftOnLand
Target
Pushable, Obstacle
Player
Direction, Dragging
======
RULES
======
[ stationary Player ] [ stationary Direction ] -> [ Player ] [ action Direction ]
(finish up again rules from previous turn)
[ Player no CanStand ] -> []
[ Teleporter no CanStand ] -> [ RockInWater ]
[ Crate no CanStand ] -> [ FloatingCrate ]
[ Rock no CanStand ] -> [ RockInWater ]
[ Dragging | Raft ] -> [ RaftOnLand | ]
[ Dragging | Player ] -> [ Player | ]
(teleport)
[ > Player | Pushable | Teleporter | ... | Teleporter | no Pushable ] -> [ > Player | | Teleporter | ... | Teleporter | Pushable ]
[ > Player | Teleporter | ... | Teleporter | Pushable ] -> [ | Teleporter | ... | Teleporter | Player > Pushable ]
[ > Player | Teleporter | ... | Teleporter | ] -> [ | Teleporter | ... | Teleporter | Player ]
(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 ]
[ > 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#..
..######_....###....####..
....####.....###....####..
....###......####....##...
....##..............##....
................#...##..#.
.......##.......##..#####.
.......####.....##...####.
......####....###.....###.
......###...#####.....###.
......##########....####..
.......#########....###...
........##..##......#.....
..........................
..........................
....##.........##.........
...####....#.####...###...
...#####...#######.#####..
..##p###....#####...##x#..
..######__...###....####..
....#*##__...###....###...
....###......####....#....
....##........###.........
..............#.##........
.......##.......##........
.......####.....##........
......####....###.........
......###...#####.........
......########*#..........
.......#########..........
........##..##............
..........................
..........................
......###...##............
.......#########..........
.......#####!####.........
.........#####............
....##....................
...##.................##..
...###..............####..
....####............#####.
....#!###..###.......!###.
..#######..####.......##..
...######...!##...........
.......##..#####...##..#..
.....!......####...######.
.##.###.....####..####!##.
.#p###.......##..##x####..
..###............####.....
..........................
..........................
..........................
..........................
..........................
....................#.....
..####.............###....
.##p###...........#####...
.####!#...........!###....
..#####.....#.....#####...
...###.....####....#####..
..##*#....###!#....##.##..
..#.......#*#.............
.........###*#.......##...
.........#*####.....####..
..........#.###....##x###.
............#.....#####.#.
....................##....
..........................
..........................
.........#####............
........##o#####..........
.........###!####.........
...........###............
...###....................
...####.............####..
...####............##x#m..
..###!##...###......##m##.
..#######..###.......!###.
...######...###.......##..
....####...#!##...........
............####...##..#..
.....!m.....####...######.
.##.###.....####..##!####.
.#p###.......##..#######..
..###............####.....
..........................
..........................
....##.........##.........
...####....#.####.........
...#####...#######........
..######....###*#.........
..###!##u....###..........
....####.....###..........
....###......####.........
....##........!##.........
..............##.......##.
..............#......###..
....................###...
.....!.......###....###...
.#.####...#######...##x#..
.#p####....#####....####..
.#####.......###.....#....
..##.#....................
..........................
..........................
...##...........#.#.......
..#x###........#####......
..######......######......
..#..##!.......#..##......
......#...................
.........#................
.....#..###..#............
..##.##.###.###....##.....
..#####..#####....###.....
...#!#....!#.......!##....
..####...u###.....###.....
..#p.............u####....
..##............#######...
...##...........######....
.................###......
..........................
..........................
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment