Skip to content

Instantly share code, notes, and snippets.

Created June 4, 2014 15:37
Show Gist options
  • Save anonymous/a99f87ee4e8993d5a3e2 to your computer and use it in GitHub Desktop.
Save anonymous/a99f87ee4e8993d5a3e2 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 Space Tug
author Benjamin Davis
homepage bnhw.co.uk
norepeat_action
run_rules_on_level_start
========
OBJECTS
========
Space
#0d0d0d
Parking
DarkGrey
Wall
LightGrey
TugUpOverlay
#f3f3f3 #e3d5d5 #575757 #413d3d #272323 #ff9e48 #ff8244 #ff5136
.....
.....
.....
55555
00000
TugUp
#f3f3f3 #e3d5d5 #575757 #413d3d #272323 #ff9e48 #ff8244 #ff5136
00000
12221
13331
13431
.333.
TugDownOverlay
#f3f3f3 #e3d5d5 #575757 #413d3d #272323 #ff9e48 #ff8244 #ff5136
.....
.....
.....
.333.
00000
TugDown
#f3f3f3 #e3d5d5 #575757 #413d3d #272323 #ff9e48 #ff8244 #ff5136
00000
55555
66666
67776
66666
TugLeftOverlay
#f3f3f3 #e3d5d5 #575757 #413d3d #272323 #ff9e48 #ff8244 #ff5136
.....
.....
.....
5000.
50002
TugLeft
#f3f3f3 #e3d5d5 #575757 #413d3d #272323 #ff9e48 #ff8244 #ff5136
50002
50002
61113
66113
6111.
TugRightOverlay
#f3f3f3 #e3d5d5 #575757 #413d3d #272323 #ff9e48 #ff8244 #ff5136
.....
.....
.....
.0005
20005
TugRight
#f3f3f3 #e3d5d5 #575757 #413d3d #272323 #ff9e48 #ff8244 #ff5136
20005
20005
31116
31166
.1116
Red
Red
Green
LightGreen
BeamHorizontal
#d8e6ea
.....
00000
.....
.....
.....
BeamVertical
#d8e6ea
..0..
..0..
..0..
..0..
..0..
BeamVerticalOverlap
#d8e6ea
.....
.....
.....
..0..
..0..
=======
LEGEND
=======
Beam = BeamHorizontal or BeamVertical
Tug = TugUp or TugDown or TugLeft or TugRight
Overlay = TugUpOverlay or TugDownOverlay or TugLeftOverlay or TugRightOverlay or BeamVerticalOverlap
Background = Space or Parking
Player = Tug
Ship = Red or Green
Blocking = Ship or Wall
. = Space
, = Parking
t = TugDown
r = Red
g = Green
# = Wall
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
Beam
Tug, Ship, Wall
Overlay
======
RULES
======
( Fill in parking)
[ Wall | ... | no Parking | Parking ] -> [ Wall | ... | Parking | Parking ]
( Cancel beam when no ship attached )
[ Beam ] -> [ action Beam ]
[ Tug | ... | action Beam Ship ] -> [ Tug | ... | Beam Ship ]
[ stationary Beam | action Beam ] -> [ Beam | Beam ]
( Cancel beam on action )
[ action Tug ] [ Beam ] -> [ Tug ] [ action Beam ]
( Cancel beam when Tug moves perpendicularly )
[ perpendicular Tug | Beam ] -> [ perpendicular Tug | action Beam ]
( Remove marked beams )
[ action Beam ] [ Beam ] -> [ action Beam ] [ action Beam ]
[ action Beam ] -> [ ]
( Throw beam )
up [ action TugDown | ] -> [ action TugDown BeamVertical | BeamVertical ]
up [ action TugDown | ... | BeamVertical no Ship | no Wall ] -> [ action TugDown BeamVertical | ... | BeamVertical | BeamVertical ]
down [ action TugUp | ] -> [ action TugUp BeamVertical | BeamVertical ]
down [ action TugUp | ... | BeamVertical no Ship | no Wall ] -> [ action TugUp BeamVertical | ... | BeamVertical | BeamVertical ]
left [ action TugRight | ] -> [ action TugRight BeamHorizontal | BeamHorizontal ]
left [ action TugRight | ... | BeamHorizontal no Ship | no Wall ] -> [ action TugRight BeamHorizontal | ... | BeamHorizontal | BeamHorizontal ]
right [ action TugLeft | ] -> [ action TugLeft BeamHorizontal | BeamHorizontal ]
right [ action TugLeft | ... | BeamHorizontal no Ship | no Wall ] -> [ action TugLeft BeamHorizontal | ... | BeamHorizontal | BeamHorizontal ]
[ action Tug ] -> [ Tug ]
([ up TugUp ] -> [ up TugUp ]
[ down TugUp ] -> [ down TugUp ]
[ left TugUp ] -> [ TugLeft ]
[ right TugUp ] -> [ TugRight ]
[ down TugDown ] -> [ up TugDown ]
[ up TugDown ] -> [ down TugDown ]
[ left TugDown ] -> [ TugRight ]
[ right TugDown ] -> [ TugLeft ]
[ left TugLeft ] -> [ TugDown ]
[ right TugLeft ] -> [ TugUp ]
[ up TugLeft ] -> [ left TugLeft ]
[ down TugLeft ] -> [ right TugLeft ]
[ left TugRight ] -> [ TugUp ]
[ right TugRight ] -> [ TugDown ]
[ up TugRight ] -> [ right TugRight ]
[ down TugRight ] -> [ left TugLeft ])
( Don't turn if blocked )
[ > Tug | Blocking ] -> [ Tug | Blocking ]
[ up Tug no Beam ] -> [ up TugUp ]
[ down Tug no Beam ] -> [ down TugDown ]
[ left Tug no Beam ] -> [ left TugLeft ]
[ right Tug no Beam ] -> [ right TugRight ]
( Remove beam behind Tug )
[ > Tug Beam | Beam no Ship ] -> [ > Tug | Beam ]
( Move ships with the beam )
rigid [ < Tug Beam ] -> [ < Tug < Beam ]
+ rigid [ < Beam | Beam ] -> [ < Beam | < Beam ]
+ rigid [ < Beam Ship ] -> [ < Beam < Ship ]
+ rigid [ moving Red | Red ] -> [ moving Red | moving Red ]
+ rigid [ moving Green | Green ] -> [ moving Green | moving Green ]
( Draw beam to Tug )
late [ Tug | ... | Beam Ship ] -> [ Tug Beam | ... | Beam Ship ]
( Draw overlays )
late [ Overlay ] -> [ ]
late [ TugUp Beam ] -> [ TugUp Beam BeamVerticalOverlap ]
late up [ Tug | ... | Beam Ship ] -> [ Tug | ... | Beam Ship BeamVerticalOverlap ]
late up [ TugUp | ] -> [ TugUp | TugUpOverlay ]
late up [ TugDown | ] -> [ TugDown | TugDownOverlay ]
late up [ TugLeft | ] -> [ TugLeft | TugLeftOverlay ]
late up [ TugRight | ] -> [ TugRight | TugRightOverlay ]
==============
WINCONDITIONS
==============
All Ship on Parking
(No Tug on Parking)
=======
LEVELS
=======
#####
#,,,#
#,,,#
#,,,#
##t##
.....
..r..
#####
#,#,#
#,,,#
#,,,#
#,t,#
.....
.r.g.
.r.gg
.#####.
.#,,,#.
.#,g,#.
.#,t,#.
.......
..rr...
..r....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment