Skip to content

Instantly share code, notes, and snippets.

Created May 13, 2016 23:17
Show Gist options
  • Save anonymous/507cb68c87d5b989e4c869b6ea3669f7 to your computer and use it in GitHub Desktop.
Save anonymous/507cb68c87d5b989e4c869b6ea3669f7 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 Boxing Glove Boxes Love
author Alan Hazelden
homepage www.draknek.org
again_interval 0.16
(verbose_logging)
noaction
run_rules_on_level_start
========
OBJECTS
========
Background
Black DarkBlue
00000
01110
01110
01110
00000
Target
White
.....
.000.
.0.0.
.000.
.....
Wall
Grey
Player
#a46422 #495e2b #493c2b #000000
..0..
.111.
01110
02220
.2.2.
BoxL L
#eb8931 #e8872f #e5842d #e1812b #de7e28 #d67823 #d37521 #cf721e #ce711e #d9c554
01234
92345
93456
94567
45678
BoxR R
#eb8931 #e8872f #e5842d #e1812b #de7e28 #d67823 #d37521 #cf721e #ce711e #edd964
01234
12349
23459
34569
45678
BoxU U
#eb8931 #e8872f #e5842d #e1812b #de7e28 #d67823 #d37521 #cf721e #ce711e #d9c554
09994
12345
23456
34567
45678
BoxD D
#eb8931 #e8872f #e5842d #e1812b #de7e28 #d67823 #d37521 #cf721e #ce711e #edd964
01234
12345
23456
34567
49998
SplatL
red
0....
0....
0....
0....
0....
SplatR
red
....0
....0
....0
....0
....0
SplatU
red
00000
.....
.....
.....
.....
SplatD
red
.....
.....
.....
.....
00000
SplatL2
red
0....
0.0..
00...
0.0..
0....
SplatR2
red
....0
..0.0
...00
..0.0
....0
SplatU2
red
00000
..0..
.0.0.
.....
.....
SplatD2
red
.....
.....
.0.0.
..0..
00000
GloveL
#f2de68 #edd964 #e9d460 #e4cf5b #dfca57 #d9c554 #d5c14f #e5842d
.012.
01734
12777
23756
.456.
GloveR
#f2de68 #edd964 #e9d460 #e4cf5b #dfca57 #d9c554 #d5c14f #d37521
.012.
01734
77745
23756
.456.
GloveU
#f2de68 #edd964 #e9d460 #e4cf5b #dfca57 #d9c554 #d5c14f #e5842d
.012.
01234
17775
23756
.476.
GloveD
#f2de68 #edd964 #e9d460 #e4cf5b #dfca57 #d9c554 #d5c14f #d37521
.072.
01734
17775
23456
.456.
CantTrigger
transparent
TriggeredTemp
#eb8931 #e8872f #e5842d #e1812b #de7e28 #d67823 #d37521 #cf721e #ce711e #d9c554
..2..
.234.
23456
.456.
..6..
TriggeredFinal
#eb8931 #e8872f #e5842d #e1812b #de7e28 #d67823 #d37521 Brown White
..2..
.777.
27876
.777.
..6..
Priority1
transparent
Priority2
transparent
Priority3
transparent
Priority4
transparent
TriggerCheck
transparent
MoveHere
transparent
WallL
DarkGrey
0....
0....
0....
0....
0....
WallR
DarkGrey
....0
....0
....0
....0
....0
WallU
DarkGrey
00000
.....
.....
.....
.....
WallD
DarkGrey
.....
.....
.....
.....
00000
WallLR
DarkGrey
0...0
0...0
0...0
0...0
0...0
WallUD
DarkGrey
00000
.....
.....
.....
00000
WallUL
DarkGrey
0....
.....
.....
.....
.....
WallUR
DarkGrey
....0
.....
.....
.....
.....
WallDL
DarkGrey
.....
.....
.....
.....
0....
WallDR
DarkGrey
.....
.....
.....
.....
....0
WallDLR
DarkGrey
.....
.....
.....
.....
0...0
WallULR
DarkGrey
0...0
.....
.....
.....
.....
WallLUD
DarkGrey
0....
.....
.....
.....
0....
WallRUD
DarkGrey
....0
.....
.....
.....
....0
Zero
DarkGreen
.000.
.0.0.
.0.0.
.0.0.
.000.
One
DarkGreen
.00..
..0..
..0..
..0..
.000.
Two
DarkGreen
.000.
...0.
.000.
.0...
.000.
Three
DarkGreen
.000.
...0.
.000.
...0.
.000.
Four
DarkGreen
.0.0.
.0.0.
.000.
...0.
...0.
Five
DarkGreen
.000.
.0...
.000.
...0.
.000.
Six
DarkGreen
.000.
.0...
.000.
.0.0.
.000.
Seven
DarkGreen
.000.
...0.
...0.
...0.
...0.
Eight
DarkGreen
.000.
.0.0.
.000.
.0.0.
.000.
Nine
DarkGreen
.000.
.0.0.
.000.
...0.
.000.
Once
Brown #dddddd
.....
.000.
.010.
.000.
.....
=======
LEGEND
=======
Counter = Once
Crate = BoxL or BoxR or BoxU or BoxD
Glove = GloveL or GloveR or GloveU or GloveD
Hittable = Crate or Player or Glove
Pushable = Crate or Glove
Solid = Crate or Wall or Glove
Splat1 = SplatL or SplatR or SplatU or SplatD
Splat2 = SplatL2 or SplatR2 or SplatU2 or SplatD2
Priority = Priority1 or Priority2 or Priority3 or Priority4
Triggered = TriggeredTemp or TriggeredFinal
. = Background
# = Wall
P = Player
* = Target
A = BoxL and Once
B = BoxR and Once
C = BoxU and Once
E = BoxD and Once
WallCoverLR = WallL or WallR or WallLR
WallCoverUD = WallU or WallD or WallUD
WallCoverCorner = WallUL or WallUR or WallDL or WallDR or WallDLR or WallLUD or WallRUD or WallULR
WallCover = WallCoverLR or WallCoverUD or WallCoverCorner
CoverLR = WallCoverLR
CoverUD = WallCoverUD
0 = Zero and Wall
1 = One and Wall
2 = Two and Wall
3 = Three and Wall
4 = Four and Wall
5 = Five and Wall
6 = Six and Wall
7 = Seven and Wall
8 = Eight and Wall
9 = Nine and Wall
Number = Zero or One or Two or Three or Four or Five or Six or Seven or Eight or Nine
=======
SOUNDS
=======
restart 26040109
undo 54997907
Player move 88095307
Crate move 5814507
Glove create 55998304
Splat1 create 2968302
(67932504)
sfx1 32201704 ( can't move )
================
COLLISIONLAYERS
================
Background
Target
Player, Wall, Crate, Glove
Triggered, CantTrigger, Priority
TriggerCheck, MoveHere
WallCoverUD, Number
WallCoverCorner, Counter
WallCoverLR
Splat1, Splat2
======
RULES
======
( Splat )
[ SplatL ] -> [ SplatL2 ]
[ SplatR ] -> [ SplatR2 ]
[ SplatU ] -> [ SplatU2 ]
[ SplatD ] -> [ SplatD2 ]
( Set up temporary info we use for choosing a box )
[ BoxL ] -> [ left BoxL ]
[ BoxR ] -> [ right BoxR ]
[ BoxU ] -> [ up BoxU ]
[ BoxD ] -> [ down BoxD ]
[ stationary Player ] -> [ action Player ]
[ action Player Priority1 ] [ BoxL no Triggered no CantTrigger ] -> [ action Player Priority1 ] [ BoxL Priority1 ]
[ action Player Priority1 ] [ BoxR no Triggered no CantTrigger ] -> [ action Player Priority1 ] [ BoxR Priority2 ]
[ action Player Priority1 ] [ BoxU no Triggered no CantTrigger ] -> [ action Player Priority1 ] [ BoxU Priority4 ]
[ action Player Priority1 ] [ BoxD no Triggered no CantTrigger ] -> [ action Player Priority1 ] [ BoxD Priority3 ]
[ action Player Priority2 ] [ BoxL no Triggered no CantTrigger ] -> [ action Player Priority2 ] [ BoxL Priority2 ]
[ action Player Priority2 ] [ BoxR no Triggered no CantTrigger ] -> [ action Player Priority2 ] [ BoxR Priority1 ]
[ action Player Priority2 ] [ BoxU no Triggered no CantTrigger ] -> [ action Player Priority2 ] [ BoxU Priority4 ]
[ action Player Priority2 ] [ BoxD no Triggered no CantTrigger ] -> [ action Player Priority2 ] [ BoxD Priority3 ]
[ action Player Priority3 ] [ BoxL no Triggered no CantTrigger ] -> [ action Player Priority3 ] [ BoxL Priority3 ]
[ action Player Priority3 ] [ BoxR no Triggered no CantTrigger ] -> [ action Player Priority3 ] [ BoxR Priority4 ]
[ action Player Priority3 ] [ BoxU no Triggered no CantTrigger ] -> [ action Player Priority3 ] [ BoxU Priority1 ]
[ action Player Priority3 ] [ BoxD no Triggered no CantTrigger ] -> [ action Player Priority3 ] [ BoxD Priority2 ]
[ action Player Priority4 ] [ BoxL no Triggered no CantTrigger ] -> [ action Player Priority4 ] [ BoxL Priority3 ]
[ action Player Priority4 ] [ BoxR no Triggered no CantTrigger ] -> [ action Player Priority4 ] [ BoxR Priority4 ]
[ action Player Priority4 ] [ BoxU no Triggered no CantTrigger ] -> [ action Player Priority4 ] [ BoxU Priority2 ]
[ action Player Priority4 ] [ BoxD no Triggered no CantTrigger ] -> [ action Player Priority4 ] [ BoxD Priority1 ]
( Loop until we've chosen a box to trigger )
startloop
( Choose a box )
random [ action Player ] [ > Crate Priority1 | Hittable ] -> [ Player ] [ > Crate action TriggeredTemp | Hittable ]
random [ action Player ] [ > Crate Priority2 | Hittable ] -> [ Player ] [ > Crate action TriggeredTemp | Hittable ]
random [ action Player ] [ > Crate Priority3 | Hittable ] -> [ Player ] [ > Crate action TriggeredTemp | Hittable ]
random [ action Player ] [ > Crate Priority4 | Hittable ] -> [ Player ] [ > Crate action TriggeredTemp | Hittable ]
( Once we've chosen a box, choose the box behind it if that can also trigger )
[ > Crate Priority | > Crate action Triggered ] -> [ > Crate action Triggered | > Crate Priority ]
( Check if this box has space to push things forwards )
( N.B. we use stationary TriggerCheck on the active box to prevent this loop thinking things are always going on )
[ > Crate action Triggered no TriggerCheck | ] -> [ > Crate action Triggered TriggerCheck | > TriggerCheck ]
[ > TriggerCheck Pushable | no MoveHere ] -> [ > TriggerCheck Pushable | > TriggerCheck ]
+ [ perpendicular TriggerCheck Glove | no TriggerCheck < Crate Triggered ] -> [ perpendicular TriggerCheck Glove | perpendicular TriggerCheck < Crate Triggered ]
+ [ perpendicular TriggerCheck > Crate Triggered | no TriggerCheck Glove ] -> [ perpendicular TriggerCheck > Crate Triggered | perpendicular TriggerCheck Glove ]
( If can't move forwards )
[ TriggerCheck Wall ] [ > TriggerCheck no Wall ] -> [ TriggerCheck Wall ] []
[ TriggerCheck Wall ] -> [ action Wall ]
( If can move forwards )
[ > TriggerCheck no Solid ] -> [ > MoveHere ]
( If can't move forwards, check if this box has space to push things backwards )
random [ action Wall ] [ | > Crate action Triggered ] -> [ Wall ] [ < TriggerCheck | > Crate action Triggered ]
[ action Wall ] -> [ Wall ]
[ > TriggerCheck Pushable | no MoveHere ] -> [ > TriggerCheck Pushable | > TriggerCheck ]
+ [ perpendicular TriggerCheck Glove | no TriggerCheck < Crate Triggered ] -> [ perpendicular TriggerCheck Glove | perpendicular TriggerCheck < Crate Triggered ]
+ [ perpendicular TriggerCheck > Crate Triggered | no TriggerCheck Glove ] -> [ perpendicular TriggerCheck > Crate Triggered | perpendicular TriggerCheck Glove ]
( If can't move backwards )
[ TriggerCheck Wall ] [ Crate action Triggered ] -> [ TriggerCheck Wall ] [ Crate CantTrigger ]
[ TriggerCheck Wall ] [ TriggerCheck no Wall ] -> [ TriggerCheck Wall ] []
[ TriggerCheck Wall ] [ stationary Player ] -> [ Wall ] [ action Player ]
[ TriggerCheck Wall ] -> [ Wall ]
( If can move backwards )
[ > TriggerCheck no Solid ] [ Crate action Triggered ] -> [ > MoveHere ] [ Crate > Triggered ]
[ > TriggerCheck no Solid ] -> [ > MoveHere ]
endloop
[ moving TriggeredTemp Once ] -> [ moving TriggeredFinal ]
[ > Crate TriggeredFinal | Glove ] -> [ > Crate TriggeredFinal | action Glove ]
( now we've chosen a box or there's no suitable boxes )
[ Priority no Player ] -> []
[ moving Crate ] -> [ Crate ]
( If all boxes triggered, remove all boxing gloves )
[ action Player ] [ stationary Glove ] -> [ action Player ] []
[ action Player ] [ TriggeredTemp ] -> [ action Player ] []
[ action Player ] [ CantTrigger ] -> [ action Player ] []
( Move/kill player )
[ > MoveHere Player | BoxL Counter | no Solid ] -> [ > MoveHere no Priority | Player Priority1 | BoxL Counter ]
[ > MoveHere Player | BoxR Counter | no Solid ] -> [ > MoveHere no Priority | Player Priority2 | BoxR Counter ]
[ > MoveHere Player | BoxU Counter | no Solid ] -> [ > MoveHere no Priority | Player Priority3 | BoxU Counter ]
[ > MoveHere Player | BoxD Counter | no Solid ] -> [ > MoveHere no Priority | Player Priority4 | BoxD Counter ]
[ > MoveHere Player | BoxL no TriggeredFinal | no Solid ] -> [ > MoveHere no Priority | Player Priority1 | BoxL ]
[ > MoveHere Player | BoxR no TriggeredFinal | no Solid ] -> [ > MoveHere no Priority | Player Priority2 | BoxR ]
[ > MoveHere Player | BoxU no TriggeredFinal | no Solid ] -> [ > MoveHere no Priority | Player Priority3 | BoxU ]
[ > MoveHere Player | BoxD no TriggeredFinal | no Solid ] -> [ > MoveHere no Priority | Player Priority4 | BoxD ]
left [ > MoveHere Player | Solid ] -> [ > MoveHere SplatL | Solid SplatR ]
right [ > MoveHere Player | Solid ] -> [ > MoveHere SplatR | Solid SplatL ]
up [ > MoveHere Player | Solid ] -> [ > MoveHere SplatU | Solid SplatD ]
down [ > MoveHere Player | Solid ] -> [ > MoveHere SplatD | Solid SplatU ]
right [ > MoveHere Player | no Solid ] -> [ > MoveHere no Priority | Player Priority1 ]
left [ > MoveHere Player | no Solid ] -> [ > MoveHere no Priority | Player Priority2 ]
up [ > MoveHere Player | no Solid ] -> [ > MoveHere no Priority | Player Priority3 ]
down [ > MoveHere Player | no Solid ] -> [ > MoveHere no Priority | Player Priority4 ]
( Move boxes )
[ > TriggerCheck Counter ] -> [ > TriggerCheck > Counter ]
[ < MoveHere | < TriggerCheck Pushable no Triggered ] -> [ Pushable | < MoveHere ]
+ [ < MoveHere | < TriggerCheck Pushable stationary Triggered ] -> [ Pushable Triggered | < MoveHere ]
left [ < MoveHere | Pushable < Triggered ] -> [ Pushable Triggered | GloveL ]
right [ < MoveHere | Pushable < Triggered ] -> [ Pushable Triggered | GloveR ]
up [ < MoveHere | Pushable < Triggered ] -> [ Pushable Triggered | GloveU ]
down [ < MoveHere | Pushable < Triggered ] -> [ Pushable Triggered | GloveD ]
left [ < MoveHere | Pushable action Triggered ] -> [ GloveR | Pushable Triggered ]
right [ < MoveHere | Pushable action Triggered ] -> [ GloveL | Pushable Triggered ]
up [ < MoveHere | Pushable action Triggered ] -> [ GloveD | Pushable Triggered ]
down [ < MoveHere | Pushable action Triggered ] -> [ GloveU | Pushable Triggered ]
( Player movement )
[ > Player | BoxL no TriggeredFinal ] -> [ > Player Priority1 | > BoxL ]
[ > Player | BoxR no TriggeredFinal ] -> [ > Player Priority2 | > BoxR ]
[ > Player | BoxU no TriggeredFinal ] -> [ > Player Priority3 | > BoxU ]
[ > Player | BoxD no TriggeredFinal ] -> [ > Player Priority4 | > BoxD ]
right [ > Player | no Crate ] -> [ > Player Priority1 | ]
left [ > Player | no Crate ] -> [ > Player Priority2 | ]
down [ > Player | no Crate ] -> [ > Player Priority3 | ]
up [ > Player | no Crate ] -> [ > Player Priority4 | ]
( Trigger responses )
late left [ BoxL | Hittable ] -> again
late right [ BoxR | Hittable ] -> again
late up [ BoxU | Hittable ] -> again
late down [ BoxD | Hittable ] -> again
[ Glove ] -> again
[ Splat1 ] -> again
[ > Crate | stationary Solid ] -> [ Crate | Solid ]
[ > Player | stationary Solid ] -> [ Player | Solid ] sfx1 ( can't move )
[ > Player Priority ] -> [ > Player > Priority ]
[ > Crate Counter ] -> [ > Crate > Counter ]
[ > Crate TriggeredFinal ] -> [ > Crate > TriggeredFinal ]
[ TriggerCheck ] -> []
[ MoveHere ] -> []
(Wall borders)
left [ Wall no WallCoverLR | no Wall ] -> [ Wall WallL | ]
right [ Wall no WallCoverLR | no Wall ] -> [ Wall WallR | ]
right [ Wall WallL | no Wall ] -> [ Wall WallLR | ]
up [ Wall no WallCoverUD | no Wall ] -> [ Wall WallU | ]
down [ Wall no WallCoverUD | no Wall ] -> [ Wall WallD | ]
down [ Wall WallU | no Wall ] -> [ Wall WallUD | ]
left [ Wall no WallCoverCorner no WallUD | WallUD ] -> [ Wall WallLUD | WallUD ]
right [ Wall no WallCoverCorner no WallUD | WallUD ] -> [ Wall WallRUD | WallUD ]
up [ Wall no WallCoverCorner no WallLR | WallLR ] -> [ Wall WallULR | WallLR ]
down [ Wall no WallCoverCorner no WallLR | WallLR ] -> [ Wall WallDLR | WallLR ]
right [ WallD | Wall no WallCoverCorner no WallCoverUD ] -> [ WallD | Wall WallDL ]
left [ WallD | Wall no WallCoverCorner no WallCoverUD ] -> [ WallD | Wall WallDR ]
right [ WallU | Wall no WallCoverCorner no WallCoverUD ] -> [ WallU | Wall WallUL ]
left [ WallU | Wall no WallCoverCorner no WallCoverUD ] -> [ WallU | Wall WallUR ]
==============
WINCONDITIONS
==============
All target on player
=======
LEVELS
=======
#########1
#....d...#
#..u.....#
#.###.##.#
#.....##.*
###p######
#####*#2
#.....##
#.#.####
#d..l..#
#...#..#
#r.....#
#...u..#
##p#####
##########3
#..r......#
#..d..#uu.#
p.....#...#
#..u..#...#
#r...l#...*
###########
(###########
#..r......#
#..d..#uu.#
p.....#...#
#..u..#...#
#..r..#...*
###########)
(###########*#
#......#..#.#
#.r.d.....#.#
p.....u#r...#
#.r.u.##.l..#
#.........###
#############)
############*#
#.....#.#..#.#
#.r.d......#.#
p.....#u#r...#
#.r.u.###.l..#
#..........###
#############4
(############*#
#.....#.#....#
#.r.d.....##.#
p.....#u#r...#
#.r.u.###.l..#
#..........###
##############)
##########5
#.....#####
#.r.l..d.##
#.........*
#..u..u..##
#.....#..l#
###p#######
######p########6
#...........####
#.u.d.#.....####
#.....#.l.l.####
###.........####
######......#..*
###..r......#..#
###.........#d.#
###............#
################
##########7
#r..#######
#...###d###
*...#....##
#...#...u##
##d##..#.##
#.........#
#..r...l..#
#.........#
##p########
###########8
#####d######
#.dd.......p
#......r...#
#..#.......#
*..#...lu###
####...#####
####...#####
############
############9
#....##d#####
#.r.........*
p....a..u...#
#.r..####.###
#....####.###
#############
message Thanks for playing :)
( debug levels
##############
#.........##*#
#....dr.r.####
#...d.....####
#........d...#
#pr.r.r.u....#
#........#####
##############
##############
#...#.....##*#
#....dr.r.####
#...u.....####
#........d...#
#pr.r.r.u....#
#........#####
##############
###########
#.....#####
#.p......##
#........#*
#.r......##
#r.l#######
###########
############
############
####..######
####..##d.##
####..#...r#
#.....#r..r#
#...*.##ur##
#.....###.##
#########p##
############
###########
#.....###*#
#.p.r.d####
#......d###
####r...d##
#####r....#
######r...#
#######...#
###########
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment