Skip to content

Instantly share code, notes, and snippets.

@pancelor
Created July 4, 2021 21:36
Show Gist options
  • Save pancelor/d3d9c683942c62a248120a3ba0371249 to your computer and use it in GitHub Desktop.
Save pancelor/d3d9c683942c62a248120a3ba0371249 to your computer and use it in GitHub Desktop.
Simple Floor Cleaning Game (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title paint everything everywhere!
author increpare + pancelor
homepage www.increpare.com (pancelor.com)
again_interval 0.05
run_rules_on_level_start
========
OBJECTS
========
Background
#F5ECE0
Wall
#374F39 #478950
00010
11111
01000
11111
00010
Player
Black Orange White Blue
.000.
.111.
22222
.333.
.3.3.
Crate1Base
#CC2936
00000
0...0
0...0
0...0
00000
Crate1L0
#CC2936
00...
00...
00...
00...
00...
Crate1R0
#CC2936
...00
...00
...00
...00
...00
Crate1U0
#CC2936
00000
00000
.....
.....
.....
Crate1D0
#CC2936
.....
.....
.....
00000
00000
Crate1Z0
#CC2936
.....
.....
.....
.....
.....
Crate2Base
#37D2D2
00000
0...0
0...0
0...0
00000
Crate2L0
#37D2D2
00...
00...
00...
00...
00...
Crate2R0
#37D2D2
...00
...00
...00
...00
...00
Crate2U0
#37D2D2
00000
00000
.....
.....
.....
Crate2D0
#37D2D2
.....
.....
.....
00000
00000
Crate2Z0
#37D2D2
.....
.....
.....
.....
.....
Paint1
#DA4450
..00.
.00..
..00.
.00..
..00.
Paint2
#28AFB0
0...0
...00
..00.
.00..
00...
slideright
transparent
slidedown
transparent
slideleft
transparent
slideup
transparent
canvas
transparent
=======
LEGEND
=======
. = Background and canvas
# = Wall
P = Player
1 = Crate1Base and canvas
2 = Crate2Base and canvas
Crate1=Crate1Base or Crate1L0 or Crate1R0 or Crate1U0 or Crate1D0 or Crate1Z0
Crate2=Crate2Base or Crate2L0 or Crate2R0 or Crate2U0 or Crate2D0 or Crate2Z0
CrateL=Crate1L0 or Crate2L0
CrateR=Crate1R0 or Crate2R0
CrateU=Crate1U0 or Crate2U0
CrateD=Crate1D0 or Crate2D0
CrateZ=Crate1Z0 or Crate2Z0
Crate=Crate1 or Crate2
paint=paint1 or paint2
slidetag = slideleft or slideup or slideright or slidedown
obs = wall or crate
=======
SOUNDS
=======
Crate MOVE 30943107
( paint destroy 99909509 )
( sfx0 19998706 (paint1 ) )
( sfx1 382306 (paint2 ) )
sfx0 19045907
sfx1 56671706
endlevel 74970903
================
COLLISIONLAYERS
================
Background
canvas
paint1
paint2
Crate1Base,Crate2Base
Player
Wall, CrateZ
CrateL
CrateR
CrateU
CrateD
slidetag
======
RULES
======
(startup visuals)
[Crate1Base] -> [Crate1L0 Crate1R0 Crate1U0 Crate1D0 Crate1Z0]
left [Crate1L0|Crate1R0]->[|]
up [Crate1U0|Crate1D0]->[|]
[Crate2Base] -> [Crate2L0 Crate2R0 Crate2U0 Crate2D0 Crate2Z0]
left [Crate2L0|Crate2R0]->[|]
up [Crate2U0|Crate2D0]->[|]
[player] -> [player wall]
[> player slidetag]->[> player]
[ up player ] -> [ player slideup ] again
[ down player ] -> [ player slidedown ] again
[ left player ] -> [ player slideleft ] again
[ right player ] -> [ player slideright ] again
[ slideup ] [ crate ] -> [ slideup ] [ up crate ] again
[ slidedown ] [ crate ] -> [ slidedown ] [ down crate ] again
[ slideleft ] [ crate ] -> [ slideleft ] [ left crate ] again
[ slideright ] [ crate ] -> [ slideright ] [ right crate ] again
[ > crate | stationary obs ] -> [ crate | stationary obs ]
+ [ up crate1 | stationary crate1 ] -> [ stationary crate1 | stationary crate1 ]
+ [ up crate2 | stationary crate2 ] -> [ stationary crate2 | stationary crate2 ]
+ [ down crate1 | stationary crate1 ] -> [ stationary crate1 | stationary crate1 ]
+ [ down crate2 | stationary crate2 ] -> [ stationary crate2 | stationary crate2 ]
+ [ left crate1 | stationary crate1 ] -> [ stationary crate1 | stationary crate1 ]
+ [ left crate2 | stationary crate2 ] -> [ stationary crate2 | stationary crate2 ]
+ [ right crate1 | stationary crate1 ] -> [ stationary crate1 | stationary crate1 ]
+ [ right crate2 | stationary crate2 ] -> [ stationary crate2 | stationary crate2 ]
late [ crate1 no paint1 ] -> [ crate1 paint1 ] sfx0
late [ crate2 no paint2 ] -> [ crate2 paint2 ] sfx1
==============
WINCONDITIONS
==============
all canvas on Paint1
all canvas on paint2
=======
LEVELS
=======
(
(has a dead end :[ )
######p
#....##
#..222#
#....##
##...1#
#######)
######p
#.....#
#....##
##.#.1#
#..2..#
#######
######p
#.....#
#.....#
#..#..#
#...###
###1.2#
#######
###########p
###.......##
#.........##
#......22..#
#..11..22..#
#..11......#
##.........#
##.......###
############
###########p
#11.#......#
#11.#......#
#......#.22#
#......#.22#
#...####...#
#..........#
#..........#
############
###########p
#11........#
#11........#
#...#....22#
#..###...22#
#...#......#
#..........#
#......#...#
#.....###..#
#......#...#
#..........#
#..........#
############
#############p
#11..........#
#11..........#
#....#.......#
#....#.......#
#..######....#
#....####....#
#....####....#
#....####....#
#....######..#
#.......#....#
#.......#....#
#..........22#
#..........22#
##############
#############p
#11.........##
#11..........#
#............#
#........#...#
#............#
#............#
#............#
#............#
#............#
#...#........#
#............#
#..........22#
##.........22#
##############
((not as good as above level)
##########p
##.......##
#.........#
#..1...2..#
#.111#222.#
#..1...2..#
#.........#
##.......##
###########)
(bad because dead end)
( ######p )
( #..1.## )
( ##....# )
( #.....# )
( ##22..# )
( ####### )
(bad because dead end)
( ######p )
( ##....# )
( #.....# )
( #12...# )
( #1##..# )
( ####### )
###########p
#..........#
#..........#
#..........#
#..........#
############
###########p
#..........#
#..........#
#..........#
#..........#
############
######p
#.....#
#.....#
#.....#
#.....#
#.....#
#######
###########p
#..........#
#..........#
#..........#
#..........#
#..........#
#..........#
#..........#
#..........#
#..........#
############
message all clean!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment