Skip to content

Instantly share code, notes, and snippets.

Created January 5, 2016 01:56
Show Gist options
  • Save anonymous/5dac369a65f39429bce9 to your computer and use it in GitHub Desktop.
Save anonymous/5dac369a65f39429bce9 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 Junker 2
author Benjamin Davis
homepage benjamindav.is
run_rules_on_level_start
(debug)
(verbose_logging)
========
OBJECTS
========
Background
Black
Wall
DarkBlue
Player
Orange White
00000
01110
00100
01110
00000
Red
Grey Red
11111
11011
10001
11011
11111
(Green
Green
.....
.000.
.000.
.000.
.....
Pink
Pink
.....
.000.
.000.
.000.
.....
Yellow
Yellow
.....
.000.
.000.
.000.
.....)
NotFused
Transparent
FusedUp
Grey
.000.
.0.0.
.....
.....
.....
FusedDown
Grey
.....
.....
.....
.0.0.
.000.
FusedLeft
Grey
.....
00...
0....
00...
.....
FusedRight
Grey
.....
...00
....0
...00
.....
MaleConnectorUp
Grey
.....
..0..
..0..
..00.
.000.
MaleConnectorDown
Grey
.000.
.00..
..0..
..0..
.....
MaleConnectorLeft
Grey
.....
...00
.0000
....0
.....
MaleConnectorRight
Grey
.....
0....
0000.
00...
.....
FemaleConnectorUp
DarkGrey
.....
...0.
.0.0.
.0.0.
.000.
FemaleConnectorDown
DarkGrey
.000.
.0.0.
.0.0.
.0...
.....
FemaleConnectorLeft
DarkGrey
.....
.0000
....0
..000
.....
FemaleConnectorRight
DarkGrey
.....
000..
0....
0000.
.....
=======
LEGEND
=======
Ship = Red
Fused = NotFused or FusedUp or FusedDown or FusedLeft or FusedRight
MaleConnector = MaleConnectorUp or MaleConnectorDown or MaleConnectorLeft or MaleConnectorRight
MaleConnectorNotUp = MaleConnectorDown or MaleConnectorLeft or MaleConnectorRight
MaleConnectorNotDown = MaleConnectorUp or MaleConnectorLeft or MaleConnectorRight
MaleConnectorNotLeft = MaleConnectorUp or MaleConnectorDown or MaleConnectorRight
MaleConnectorNotRight = MaleConnectorUp or MaleConnectorDown or MaleConnectorLeft
MaleConnectorHorizontal = MaleConnectorLeft or MaleConnectorRight
MaleConnectorVertical = MaleConnectorUp or MaleConnectorDown
FemaleConnector = FemaleConnectorUp or FemaleConnectorDown or FemaleConnectorLeft or FemaleConnectorRight
FemaleConnectorNotUp = FemaleConnectorDown or FemaleConnectorLeft or FemaleConnectorRight
FemaleConnectorNotDown = FemaleConnectorUp or FemaleConnectorLeft or FemaleConnectorRight
FemaleConnectorNotLeft = FemaleConnectorUp or FemaleConnectorDown or FemaleConnectorRight
FemaleConnectorNotRight = FemaleConnectorUp or FemaleConnectorDown or FemaleConnectorLeft
FemaleConnectorHorizontal = FemaleConnectorLeft or FemaleConnectorRight
FemaleConnectorVertical = FemaleConnectorUp or FemaleConnectorDown
Connector = MaleConnector or FemaleConnector
ConnectorUp = MaleConnectorUp or FemaleConnectorUp
ConnectorDown = MaleConnectorDown or FemaleConnectorDown
ConnectorLeft = MaleConnectorLeft or FemaleConnectorLeft
ConnectorRight = MaleConnectorRight or FemaleConnectorRight
Attachment = Connector
AttachmentUp = ConnectorUp
AttachmentDown = ConnectorDown
AttachmentLeft = ConnectorLeft
AttachmentRight = ConnectorRight
. = Background
▓ = Wall
@ = Player
r = Red
┴ = MaleConnectorUp
┬ = MaleConnectorDown
┤ = MaleConnectorLeft
├ = MaleConnectorRight
╨ = FemaleConnectorUp
╥ = FemaleConnectorDown
╡ = FemaleConnectorLeft
╞ = FemaleConnectorRight
║ = MaleConnectorUp and FemaleConnectorDown
│ = MaleConnectorDown and FemaleConnectorUp
═ = MaleConnectorLeft and FemaleConnectorRight
─ = MaleConnectorRight and FemaleConnectorLeft
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
Wall, Player, Ship
FusedUp, NotFused, MaleConnector
FusedDown, FemaleConnector
FusedLeft
FusedRight
======
RULES
======
( Mark ship parts for fusing )
[ Ship no Fused ] -> [ action Ship ]
( Fuse adjacent parts together )
up [ action Ship | Ship ] -> [ action Ship FusedUp | Ship ]
down [ action Ship | Ship ] -> [ action Ship FusedDown | Ship ]
left [ action Ship | Ship ] -> [ action Ship FusedLeft | Ship ]
right [ action Ship | Ship ] -> [ action Ship FusedRight | Ship ]
( Permanently mark parts with no adjacency )
[ action Ship no Fused ] -> [ action Ship NotFused ]
( Reset fusing marks )
[ action Ship ] -> [ Ship ]
( Push ship parts )
[ > Player | Ship ] -> [ > Player | > Ship ]
( Push attachments )
[ > Player | Attachment ] -> [ > Player | > Attachment ]
startloop
( Ship parts pull fused parts with them )
up [ moving Ship FusedUp | Ship ] -> [ moving Ship FusedUp | moving Ship ]
+ down [ moving Ship FusedDown | Ship ] -> [ moving Ship FusedDown | moving Ship ]
+ left [ moving Ship FusedLeft | Ship ] -> [ moving Ship FusedLeft | moving Ship ]
+ right [ moving Ship FusedRight | Ship ] -> [ moving Ship FusedRight | moving Ship ]
( Ship parts pull attachments with them )
up [ moving Ship | AttachmentUp ] -> [ moving Ship | moving AttachmentUp ]
down [ moving Ship | AttachmentDown ] -> [ moving Ship | moving AttachmentDown ]
left [ moving Ship | AttachmentLeft ] -> [ moving Ship | moving AttachmentLeft ]
right [ moving Ship | AttachmentRight ] -> [ moving Ship | moving AttachmentRight ]
( Attachments pull ship parts with them )
up [ Ship | moving AttachmentUp ] -> [ moving Ship | moving AttachmentUp ]
down [ Ship | moving AttachmentDown ] -> [ moving Ship | moving AttachmentDown ]
left [ Ship | moving AttachmentLeft ] -> [ moving Ship | moving AttachmentLeft ]
right [ Ship | moving AttachmentRight ] -> [ moving Ship | moving AttachmentRight ]
( Ships push other ships )
[ > Ship | Ship ] -> [ > Ship | > Ship ]
( Attachments push ships )
[ > Attachment | Ship ] -> [ > Attachment | > Ship ]
( Ships push attachments )
[ > Ship | Attachment ] -> [ > Ship | > Attachment ]
( Male connectors push male connectors )
[ > MaleConnector | stationary MaleConnector ] -> [ > MaleConnector | > MaleConnector ]
( Female connectors push female connectors )
[ > FemaleConnector | stationary FemaleConnector ] -> [ > FemaleConnector | > FemaleConnector ]
( Connectors push differently-orientated connectors )
[ > MaleConnectorUp | stationary FemaleConnectorNotDown ] -> [ > MaleConnectorUp | > FemaleConnectorNotDown ]
[ > MaleConnectorDown | stationary FemaleConnectorNotUp ] -> [ > MaleConnectorDown | > FemaleConnectorNotUp ]
[ > MaleConnectorLeft | stationary FemaleConnectorNotRight ] -> [ > MaleConnectorLeft | > FemaleConnectorNotRight ]
[ > MaleConnectorRight | stationary FemaleConnectorNotLeft ] -> [ > MaleConnectorRight | > FemaleConnectorNotLeft ]
[ > FemaleConnectorUp | stationary MaleConnectorNotDown ] -> [ > FemaleConnectorUp | > MaleConnectorNotDown ]
[ > FemaleConnectorDown | stationary MaleConnectorNotUp ] -> [ > FemaleConnectorDown | > MaleConnectorNotUp ]
[ > FemaleConnectorLeft | stationary MaleConnectorNotRight ] -> [ > FemaleConnectorLeft | > MaleConnectorNotRight ]
[ > FemaleConnectorRight | stationary MaleConnectorNotLeft ] -> [ > FemaleConnectorRight | > MaleConnectorNotLeft ]
( Connectors push correctly-orientated connectors from wrong direction )
vertical [ > MaleConnectorLeft | stationary FemaleConnectorRight ] -> [ > MaleConnectorLeft | > FemaleConnectorRight ]
vertical [ > MaleConnectorRight | stationary FemaleConnectorLeft ] -> [ > MaleConnectorRight | > FemaleConnectorLeft ]
horizontal [ > MaleConnectorUp | stationary FemaleConnectorDown ] -> [ > MaleConnectorUp | > FemaleConnectorDown ]
horizontal [ > MaleConnectorDown | stationary FemaleConnectorUp ] -> [ > MaleConnectorDown | > FemaleConnectorUp ]
vertical [ > FemaleConnectorLeft | stationary MaleConnectorRight ] -> [ > FemaleConnectorLeft | > MaleConnectorRight ]
vertical [ > FemaleConnectorRight | stationary MaleConnectorLeft ] -> [ > FemaleConnectorRight | > MaleConnectorLeft ]
horizontal [ > FemaleConnectorUp | stationary MaleConnectorDown ] -> [ > FemaleConnectorUp | > MaleConnectorDown ]
horizontal [ > FemaleConnectorDown | stationary MaleConnectorUp ] -> [ > FemaleConnectorDown | > MaleConnectorUp ]
( Connectors move connected connectors )
[ orthogonal MaleConnector stationary FemaleConnector ] -> [ orthogonal MaleConnector orthogonal FemaleConnector ]
[ stationary MaleConnector orthogonal FemaleConnector ] -> [ orthogonal MaleConnector orthogonal FemaleConnector ]
endloop
( Ship parts stop against walls )
[ > Ship | Wall ] -> [ Ship | Wall ]
( Attachments stop against walls )
[ > Attachment | Wall ] -> [ Attachment | Wall ]
startloop
( Ship parts stop when fused parts stop )
up [ stationary Ship FusedUp | moving Ship ] -> [ Ship FusedUp | Ship ]
down [ stationary Ship FusedDown | moving Ship ] -> [ Ship FusedDown | Ship ]
left [ stationary Ship FusedLeft | moving Ship ] -> [ Ship FusedLeft | Ship ]
right [ stationary Ship FusedRight | moving Ship ] -> [ Ship FusedRight | Ship ]
( Ship parts stop when attachments stop )
up [ moving Ship | stationary AttachmentUp ] -> [ Ship | AttachmentUp ]
down [ moving Ship | stationary AttachmentDown ] -> [ Ship | AttachmentDown ]
left [ moving Ship | stationary AttachmentLeft ] -> [ Ship | AttachmentLeft ]
right [ moving Ship | stationary AttachmentRight ] -> [ Ship | AttachmentRight ]
( Attachments stop when ship parts stop )
up [ stationary Ship | moving AttachmentUp ] -> [ Ship | AttachmentUp ]
down [ stationary Ship | moving AttachmentDown ] -> [ Ship | AttachmentDown ]
left [ stationary Ship | moving AttachmentLeft ] -> [ Ship | AttachmentLeft ]
right [ stationary Ship | moving AttachmentRight ] -> [ Ship | AttachmentRight ]
( Ship stop against stopped ships )
[ > Ship | stationary Ship ] -> [ Ship | Ship ]
( Attachments stop against stopped ships )
[ > Attachment | stationary Ship ] -> [ Attachment | Ship ]
( Ships stop against stopped attachments )
[ > Ship | stationary Attachment ] -> [ Ship | Attachment ]
endloop
( Player stops against stationary ship parts )
[ > Player | stationary Ship ] -> [ Player | Ship ]
( Player stops against stationary attachments )
[ > Player | stationary Attachment ] -> [ Player | Attachment ]
( No movement when player is stopped )
[ stationary Player ] [ moving Ship ] -> [ Player ] [ Ship ]
( Move fused markers with ships )
[ > Ship Fused ] -> [ > Ship > Fused ]
==============
WINCONDITIONS
==============
=======
LEVELS
=======
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓.............▓
▓...........r.▓
▓...........r.▓
▓.....┴.....r.▓
▓.....r.....r.▓
▓...┤rrr├r....▓
▓.....r▓rrr...▓
▓.....│..r....▓
▓....@r.......▓
▓....rrr......▓
▓.....r.......▓
▓.............▓
▓.............▓
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment