Skip to content

Instantly share code, notes, and snippets.

@Draknek
Last active November 1, 2022 16:40
Show Gist options
  • Save Draknek/c85e43b9a3c6e61ad32890e1fd73b13d to your computer and use it in GitHub Desktop.
Save Draknek/c85e43b9a3c6e61ad32890e1fd73b13d to your computer and use it in GitHub Desktop.
Breeze Across These Seas, Please (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Breeze Across These Seas, Please
author Alan Hazelden
homepage alan.draknek.org
noaction
norepeat_action
run_rules_on_level_start
(realtime_interval 0.5)
again_interval 0.1
(verbose_logging)
========
OBJECTS
========
Background
#9ee7d7 #6ac0bd
11111
11101
11111
10111
11111
Target
#462c4b transparent transparent transparent
.111.
10201
12021
10201
.111.
Land
#fcebb6 #fcebb6
11111
01111
11101
11111
10111
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.
Player
#462c4b
.000.
00000
.000.
.0.0.
.....
(#462c4b #5889a2 #4e5e5e
..0..
.111.
01110
02220
.2.2.)
AbovePlayer
#462c4b
.....
.....
.....
.....
.000.
Crate
Brown Orange
.111.
10001
10001
10001
.111.
FloatingCrate
DarkBrown Brown
101.1
10101
10101
10101
10.01
(.111.
10001
10001
10001
.111.)
Teleporter
#4e5e5e transparent #462c4b
.020.
10201
10201
10001
.111.
AboveTeleporter
#4e5e5e #5889a2 #462c4b
.....
.111.
.111.
.111.
.000.
TeleportLineH
#4e5e5e
.....
.....
00000
.....
.....
TeleportLineV
#4e5e5e
..0..
..0..
..0..
..0..
..0..
Raft
#724254 #c18c72
101.1
10101
10101
10101
10.01
RaftOnLand
#724254 #c18c72
101.1
10101
10101
10101
10.01
AddLandLUD
#fcebb6
0....
.....
.....
.....
0....
AddLandLU
#fcebb6
0....
.....
.....
.....
.....
AddLandLD
#fcebb6
.....
.....
.....
.....
0....
AddLandRUD
#fcebb6
....0
.....
.....
.....
....0
AddLandRU
#fcebb6
....0
.....
.....
.....
.....
AddLandRD
#fcebb6
.....
.....
.....
.....
....0
RemoveLandLUD
#6ac0bd
0....
.....
.....
.....
0....
RemoveLandLU
#6ac0bd
0....
.....
.....
.....
.....
RemoveLandLD
#6ac0bd
.....
.....
.....
.....
0....
RemoveLandRUD
#6ac0bd
....0
.....
.....
.....
....0
RemoveLandRU
#6ac0bd
....0
.....
.....
.....
.....
RemoveLandRD
#6ac0bd
.....
.....
.....
.....
....0
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
AddLandL = AddLandLUD or AddLandLU or AddLandLD
AddLandR = AddLandRUD or AddLandRU or AddLandRD
RemoveLandL = RemoveLandLUD or RemoveLandLU or RemoveLandLD
RemoveLandR = RemoveLandRUD or RemoveLandRU or RemoveLandRD
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
AddLandL, RemoveLandL
AddLandR, RemoveLandR
RaftOnLand
Target
Pushable, Obstacle
Player
TeleportLine
AboveTeleporter, AbovePlayer
Direction, Dragging
======
RULES
======
late [ AboveTeleporter ] -> []
late up [ Teleporter | ] -> [ Teleporter | AboveTeleporter ]
late [ AbovePlayer ] -> []
late up [ Player | ] -> [ Player | AbovePlayer ]
[ stationary Player ] [ stationary Direction ] -> [ Player ] [ action Direction ]
(Island border)
left [ no Land no AddLandL | Land ] -> [ no Land AddLandLUD | Land ]
right [ no Land no AddLandR | Land ] -> [ no Land AddLandRUD | Land ]
up [ AddLandLUD | no Land ] -> [ AddLandLD | ]
up [ AddLandRUD | no Land ] -> [ AddLandRD | ]
down [ AddLandLUD | no Land ] -> [ AddLandLU | ]
down [ AddLandRUD | no Land ] -> [ AddLandRU | ]
down [ AddLandLD | no Land ] -> [ | ]
down [ AddLandRD | no Land ] -> [ | ]
left [ Land no RemoveLandL | no Land ] -> [ Land RemoveLandLUD | ]
right [ Land no RemoveLandR | no Land ] -> [ Land RemoveLandRUD | ]
up [ RemoveLandLUD | Land ] -> [ RemoveLandLD | Land ]
up [ RemoveLandRUD | Land ] -> [ RemoveLandRD | Land ]
down [ RemoveLandLUD | Land ] -> [ RemoveLandLU | Land ]
down [ RemoveLandRUD | Land ] -> [ RemoveLandRU | Land ]
down [ RemoveLandLD | Land ] -> [ | Land ]
down [ RemoveLandRD | Land ] -> [ | Land ]
(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####..
..###............####.....
..........................
(..........................
..........................
..........................
..........................
....................#.....
..####.............###....
.##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