Created
December 21, 2018 01:06
-
-
Save dario-zubovic/00b04f456c4d222c6d80b95f3add9264 to your computer and use it in GitHub Desktop.
Conway's Game of Sokoban (PuzzleScript Script)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title Conway's Game of Sokoban | |
author Jack Kutilek | |
homepage jackkutilek.itch.io | |
(verbose_logging) | |
key_repeat_interval .07 | |
require_player_movement | |
======== | |
OBJECTS | |
======== | |
Background | |
GREEN GREEN | |
11111 | |
01111 | |
11101 | |
11111 | |
10111 | |
Target | |
DarkBlue | |
..... | |
.000. | |
.0.0. | |
.000. | |
..... | |
Wall | |
BROWN | |
Player | |
Black Orange White Blue | |
.000. | |
.111. | |
22222 | |
.333. | |
.3.3. | |
Crate | |
Orange Yellow | |
00000 | |
0...0 | |
0...0 | |
0...0 | |
00000 | |
onCell | |
blue | |
offcell | |
transparent | |
hasUp | |
transparent | |
hasDown | |
transparent | |
hasLeft | |
transparent | |
hasRight | |
transparent | |
hasUpRight | |
transparent | |
hasUpLeft | |
transparent | |
hasDownRight | |
transparent | |
hasDownLeft | |
transparent | |
leftSpread | |
transparent | |
rightSpread | |
transparent | |
counter1 | |
transparent | |
counter2 | |
transparent | |
counter3 | |
transparent | |
counter4 | |
transparent | |
playerToken | |
transparent | |
======= | |
LEGEND | |
======= | |
. = Background | |
# = Wall | |
P = Player | |
* = Crate | |
@ = Crate and Target | |
O = Target | |
C = oncell | |
has = hasRight or hasup or hasLeft or hasDown or hasDownleft or hasDownRight or hasUpRight or hasUpLeft | |
spread = leftSpread or rightSpread | |
counter = counter1 or counter2 or counter3 or counter4 | |
cell = onCell or offcell | |
======= | |
SOUNDS | |
======= | |
================ | |
COLLISIONLAYERS | |
================ | |
Background | |
Target | |
Player, Wall, Crate, oncell | |
offcell | |
counter | |
playerToken | |
leftSpread | |
rightSpread | |
hasup | |
hasDown | |
hasLeft | |
hasRight | |
hasUpRight | |
hasUpLeft | |
hasDownRight | |
hasDownLeft | |
====== | |
RULES | |
====== | |
[ > Player | Crate ] -> [ > Player | > Crate ] | |
[player ] -> [player playerToken] | |
late [player playerToken] -> cancel | |
late [no oncell no offcell] -> [offcell] | |
late right [ | oncell | ] -> [leftSpread | oncell | rightSpread] | |
late down [oncell | cell] -> [oncell | cell hasup] | |
late down [cell | oncell] -> [cell hasdown | oncell] | |
late down [leftSpread | cell] -> [leftSpread | cell hasUpRight] | |
late down [rightSpread | cell] -> [rightSpread | cell hasUpLeft] | |
late down [cell | leftSpread] -> [cell hasdownright | leftSpread] | |
late down [cell | rightSpread] -> [cell hasdownleft | rightSpread] | |
late right [oncell | cell] -> [oncell | cell hasLeft] | |
late right [cell | oncell] -> [cell hasRight | oncell] | |
late [cell has no counter] -> [cell counter1] | |
late [cell has counter1] -> [cell counter2] | |
late [cell has counter2] -> [cell counter3] | |
late [cell has counter3] -> [cell counter4] | |
late [oncell no counter] -> [offcell] | |
late [oncell counter1] -> [offcell] | |
late [oncell counter4] -> [offcell] | |
late [offcell counter3 player] -> [ offcell no player] | |
late [offcell counter3 crate] -> [ oncell no crate] | |
late [offcell counter3] -> [oncell] | |
late [counter] -> [] | |
late [has] -> [] | |
late [spread] -> [] | |
late [playerToken] -> [] | |
============== | |
WINCONDITIONS | |
============== | |
All Target on Crate | |
======= | |
LEVELS | |
======= | |
message level 1 of 7 | |
############# | |
##.........## | |
#...........# | |
#.p.........# | |
#..........o# | |
#...........# | |
#.*.........# | |
#...........# | |
#..cc.......# | |
#.c.c.......# | |
##..c......## | |
############# | |
message level 2 of 7 | |
############################################# | |
######################.###########......##### | |
#####################...#########.........### | |
#####################...#########..........## | |
####################..c..#######...........## | |
####################..c..#######............# | |
###################..c.c..######............# | |
###################...c...######....o.......# | |
##################....c....#####............# | |
##################....c....#####............# | |
###################...c...#####.............# | |
###################..c.c..#####.......o.....# | |
####################..c..######.............# | |
####################..c..######.............# | |
#####################...######.............## | |
########..###########...####...............## | |
######......#######....####...............### | |
####..........##......###................#### | |
##.c..c....c..c.......................####### | |
#ccc..cccccc..ccc..c.............############ | |
##.c..c....c..c.#...c...........############# | |
####..........####ccc..........####..######## | |
######......#####.............###......###### | |
########..###...............###..........#### | |
###########.................#....c....c....## | |
#########......................cc.cccc.cc...# | |
#######....*.....................c....c....## | |
######........*...............#..........#### | |
#####......................######......###### | |
#####......p.............##########..######## | |
######.................###################### | |
#########...........######################### | |
############################################# | |
message level 3 of 7 | |
####################################### | |
####################################### | |
#######################..c...########## | |
#####################..c.c.....####.### | |
#########....cc#.##..cc..........#.cc## | |
##.####.....c...c....cc............cc## | |
#cc.#......c.....c..occ.............### | |
#cc........c...c.cc....c.c..........### | |
##.........c.....c.......c...####.##### | |
##..........c...c.......######..####### | |
####.####....cc###...............###### | |
######################..c.####.o.###### | |
#######################..cc############ | |
########################cc..########### | |
#########################....########## | |
#######################........######## | |
#######.......########...........###### | |
###.................................### | |
##...................................## | |
##.............................c.c...## | |
##.......*......................cc....# | |
#...............................c.....# | |
##...p.*...........#..................# | |
##..............##########............# | |
###...........#################......cc | |
######.....######################....cc | |
####################################### | |
message level 4 of 7 | |
##########.#################################################################################################################.########## | |
#########...###############################################################################################################...######### | |
#########...###############################################################################################################...######### | |
###cc##.......###########################################################################################################.......##cc### | |
#..cc.#.......###########################################################################################################.......#.cc..# | |
#....##.......###########################################################################################################.......##....# | |
#......#.....#############################################################################################################.....#......# | |
#............c..c..........................................c..c....#....c..c..........................................c..c............# | |
###....#.........c...................cccc......................c...#...c......................cccc...................c.........#....### | |
##...........c...c..................c...c..................c...c...#...c...c..................c...c..................c...c...........## | |
##............cccc......................c...................cccc...#...cccc...................c......................cccc............## | |
#...................................c..c..........................###..........................c..c...................................# | |
##.....#.....####....########################################....#####....########################################....####.....#.....## | |
#......#......####....######################################....#######....######################################....####......#......# | |
#......#......#####....####################################....#########.....###################################....#####......#......# | |
#......#......######....#############...........................###.#.#.....................................###....######......#......# | |
#......#......#######....####.....................................................................................#######......#......# | |
#..cc..#..cc..########.....#.....................................................................................########..cc..#..cc..# | |
#.c..c.#.c..c.#########................................c.......................c...................................######.c..c.#.c..c.# | |
#..c..c#c..c..##########...c...........................c.c...................c.c...........................c.......######..c..c#c..c..# | |
#.....c#c.....###########.cc...........................cc.....................cc...........................cc.......#####.....c#c.....# | |
#...ccc#ccc...###########.c.c.............................................................................c.c.......#####...ccc#ccc...# | |
##ccc..#..ccc###########............................................................................................######ccc..#..ccc## | |
#.cc.......cc.##########............................................................................................#####.cc.......cc.# | |
##cc.......cc.##########............................................................................................#####.cc.......cc## | |
##.c.cc.cc.c..#########..............................................................................................####..c.cc.cc.c.## | |
###ccc.#.ccc.##########..............................................................................................#####.ccc.#.ccc### | |
#...c.....c...#########..............................................................................................####...c.....c...# | |
#......#.....#########...p.*..........................................................................................####.....#......# | |
#....##.......########......................c.............................................c...........................###.......##....# | |
#..cc.#.......#######......................c...............................................c.........................####.......#.cc..# | |
###cc##.......#######.................cc...ccc...........................................ccc...cc............o........###.......##cc### | |
#########...#########................cc.........................................................cc....................#####...######### | |
#########...#########..................c.......................................................c......................#####...######### | |
##########.##########................................................................................................#######.########## | |
#########...########..................................................................................................#####...######### | |
#########...########.................................................................................................######...######### | |
###cc##.......#######................................................................................................####.......##cc### | |
#..cc.#.......#######................................................................................................####.......#.cc..# | |
#....##.......#######................................................................................................####.......##....# | |
#......#.....#########..............................................................................................######.....#......# | |
#.............########..........c.....................................................................c..............####.............# | |
###....#.....#########..........c.c...............c.................................c...............c.c.............######.....#....### | |
##............#########.........cc...............cc.................................cc...............cc.............#####............## | |
##............##########.........................c.c...............................c.c..............................#####............## | |
#.............###########..........................................................................................######.............# | |
##.....#.....#############.........................................................................................#######.....#.....## | |
#......#......############........................................................................................#######......#......# | |
#......#......###########........................................................................................########......#......# | |
#......#......##########....##...................................................................................########......#......# | |
#......#......#########....######...............................................................................#########......#......# | |
#..cc..#..cc..########....##################.....................................................................########..cc..#..cc..# | |
#.c..c.#.c..c.#######c...###########################.#.##.........#.##................#.##...######..#########...c#######.c..c.#.c..c.# | |
#..c..c#c..c..######c...##################################....###########....##################################...c######..c..c#c..c..# | |
#.....c#c.....#####.ccc####################################..cc#########cc..####################################ccc.#####.....c#c.....# | |
#...ccc#ccc...####....######################################cc..#######..cc######################################....####...ccc#ccc...# | |
##ccc..#..ccc####....########################################.c..#####..c.########################################....####ccc..#..ccc## | |
#.cc.......cc....................................cc...............###...............cc....................................cc.......cc.# | |
##cc.......cc..............cc...................cccc...............#...............cccc...................cc..............cc.......cc## | |
##.c.cc.cc.c.............cc.cc..................cc.cc..............#..............cc.cc..................cc.cc.............c.cc.cc.c.## | |
###ccc.#.ccc.............cccc.....................cc...............#...............cc.....................cccc.............ccc.#.ccc### | |
#...c.....c...............cc.......................................#.......................................cc...............c.....c...# | |
#......#.....#############################################################################################################.....#......# | |
#....##.......###########################################################################################################.......##....# | |
#..cc.#.......###########################################################################################################.......#.cc..# | |
###cc##.......###########################################################################################################.......##cc### | |
#########...###############################################################################################################...######### | |
#########...###############################################################################################################...######### | |
##########.#################################################################################################################.########## | |
message level 5 of 7 | |
########################## | |
#........................# | |
#..............*.........# | |
#..c.cc.cc.c.cc.cc.c.cc..# | |
#..cc.c.c.ccc.c.c.cc.c...# | |
#.....c.c.....c.c.....c..# | |
#..cc.c.cccccc.c.cccccc..# | |
#...c.co.....c.c.co......# | |
#..c..cccccc.c.c.c.cccc..# | |
#..ccc.....c.c.c.c.c..c..# | |
#.*...cccc.c.c.c.c.c.c...# | |
#..ccc...c.c.c.c.c.c.cc..# | |
#..c..cc.c.c.c.c.c.c.c...# | |
#...c.c.c.c.c.c.cc.c..c..# | |
#..cc.c.c.c.c.c....cccc..# | |
#p..c.c.c.c.c.ccccc......# | |
#..c..c.c.c.c......cccc..# | |
#..cccc.c.c.cccccc.c..c..# | |
#.......c.c......c.c.c...# | |
#..cccccc.cccccc.c.c.cc..# | |
#..co....c.....c.c.c.c...# | |
#...c.cc*c.ccc.c.c.c..c..# | |
#..cc.cc.cc.c.cc.cc..cc..# | |
#........................# | |
#........................# | |
########################## | |
message level 6 of 7 | |
############## | |
##cc##..###### | |
###c#.*p.##### | |
##c##....##### | |
##cc#....##cc# | |
####c....c##c# | |
##cc..cc..cc## | |
#c##c....c#### | |
#cc##....#cc## | |
#####....##c## | |
#####....#c### | |
######.o##cc## | |
############## | |
message level 7 of 7 | |
################## | |
#######....####### | |
#####...p....##### | |
####..........#### | |
####..........#### | |
####..........#### | |
##....c....c....## | |
#...cc.cccc.cc...# | |
##....c....c....## | |
####..........#### | |
#####........##### | |
######......###### | |
#######.o*.####### | |
################## | |
message good luck! | |
################### | |
#.#...#..##..##..## | |
#.#...#.#.#.#.#...# | |
#.#.#.#...#.#.###.# | |
#.#.#.#.####..#...# | |
################### | |
###.............### | |
##.....p..*......## | |
#.................# | |
#.................# | |
#....cc.cccccc....# | |
#....cc.cccccc....# | |
#....cc...........# | |
#....cc.....cc....# | |
#....cc..o..cc....# | |
#....cc.....cc....# | |
#...........cc....# | |
#....cccccc.cc....# | |
#....cccccc.cc....# | |
#.................# | |
#.................# | |
##...............## | |
###.............### | |
################### | |
#..##.#..##.###...# | |
#...#.#...#.###..## | |
###.#.#.#.#.###.### | |
#...#.#...#...#...# | |
################### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment