Skip to content

Instantly share code, notes, and snippets.

@pancelor
Last active June 8, 2022 05:50
Show Gist options
  • Save pancelor/77efccad03902fa962a10cadae1334ce to your computer and use it in GitHub Desktop.
Save pancelor/77efccad03902fa962a10cadae1334ce to your computer and use it in GitHub Desktop.
Elephant-in-a-Room (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Elephant-in-a-Bottle
author pancelor
homepage pancelor.com
background_color #03191d
text_color #e9fcd9
(enable_level_select)
run_rules_on_level_start
( verbose_logging )
========
OBJECTS
========
Border
Green
Background
#56A019 GREEN
11111
01111
11101
11111
10111
wall
#90bf6a
...0.
..0..
.0...
0....
....0
bevell
#2e5714
0....
0....
0....
0....
0....
bevelr
#2e5714
....0
....0
....0
....0
....0
bevelu
#2e5714
00000
.....
.....
.....
.....
beveld
#2e5714
.....
.....
.....
.....
00000
el0
#fff2ee #c5c2c5 #949294
.....
.....
...11
.1121
11121
el1
#fff2ee #c5c2c5 #949294
.....
.....
111..
1111.
11110
el2
#fff2ee #c5c2c5 #949294
11121
11112
11112
11..1
10..1
el3
#fff2ee #c5c2c5 #949294
12001
12.11
22.11
1.11.
0....
targ0
#10505a
.....
.....
.....
....0
....0
targ1
#10505a #509374 #3d7f66
.....
..000
00012
02222
21222
targ2
#10505a #3d7f66 #509374
.....
0000.
11100
11110
12111
targ3
#10505a
.....
.....
.....
0....
0....
targ4
#10505a
....0
....0
....0
....0
....0
targ5
#3d7f66 #509374 #10505a
00000
10000
00010
00220
01220
targ6
#3d7f66 #509374 #10505a
00000
10200
02210
02002
02222
targ7
#10505a
0....
0....
0....
0....
.....
targ8
#10505a
....0
.....
.....
.....
.....
targ9
#10505a
00000
.....
.....
.....
.....
targ10
#10505a
00...
.....
.....
.....
.....
targ11
#10505a
.....
.....
.....
.....
.....
seld0
#182852
.0.0.
.....
.....
.....
.....
seld1
#182852
0.0.0
.....
.....
.....
.....
selr0
#182852
.....
0....
.....
0....
.....
selr1
#182852
0....
.....
0....
.....
0....
sell0
#182852
.....
....0
.....
....0
.....
sell1
#182852
....0
.....
....0
.....
....0
selu0
#182852
.....
.....
.....
.....
.0.0.
selu1
#182852
.....
.....
.....
.....
0.0.0
pokel0
#732c29 #ac5031
.....
.0...
11110
0010.
..0..
poker0
#732c29 #ac5031
...0.
01111
.0100
..0..
.....
pokeu0
#732c29 #ac5031
.01..
.010.
011..
.01..
..0..
poked0
#732c29 #ac5031
...0.
..01.
.011.
..010
..01.
pokel1
#732c29 #ac5031
.....
.....
00000
00000
.....
poker1
#732c29 #ac5031
.....
00000
00000
.....
.....
pokeu1
#732c29 #ac5031
.00..
.00..
.00..
.00..
.00..
poked1
#732c29 #ac5031
..00.
..00.
..00.
..00.
..00.
_0 (manual spacing shenanigans here)
#396e17
..000
..0.0
..0.0
..0.0
..000
_02 (manual spacing shenanigans here)
#396e17
000..
0.0..
0.0..
0.0..
000..
_12 (manual spacing shenanigans here)
#396e17
00...
.0...
.0...
.0...
000..
_22 (manual spacing shenanigans here)
#396e17
000..
..0..
000..
0....
000..
_1
#396e17
.00..
..0..
..0..
..0..
.000.
_2
#396e17
.000.
...0.
.000.
.0...
.000.
_3
#396e17
.000.
...0.
.000.
...0.
.000.
_4
#396e17
.0.0.
.0.0.
.000.
...0.
...0.
_5
#396e17
.000.
.0...
.000.
...0.
.000.
_6
#396e17
.0...
.0...
.000.
.0.0.
.000.
_7
#396e17
.000.
...0.
...0.
...0.
...0.
_8
#396e17
.000.
.0.0.
.000.
.0.0.
.000.
_9
#396e17
.000.
.0.0.
.000.
...0.
...0.
nomove
purple
nostarted
red
started
transparent
=======
LEGEND
=======
,=border
. = Background
# = Wall
0 = el0
1=el1
2=el2
3=el3
a=el0 and targ1
4=poker0
5=pokeu0
6=pokel0
7=poked0
h=pokel1
l=poker1
k=pokeu1
j=poked1
q=targ1
w=targ0
│=_0
┤=_1
╡=_2
╢=_3
╖=_4
╕=_5
╣=_6
║=_7
╗=_8
╝=_9
╜=_02
╛=_12
╞=_22
sell = sell0 or sell1
selr = selr0 or selr1
selu = selu0 or selu1
seld = seld0 or seld1
sel= sell or selr or selu or seld
num=_0 or _1 or _2 or _3 or _4 or _5 or _6 or _7 or _8 or _9 or _02 or _12 or _22
bevel=bevelu or beveld or bevell or bevelr
el = el0 or el1 or el2 or el3
targ=targ0 or targ1 or targ2 or targ3 or targ4 or targ5 or targ6 or targ7 or targ8 or targ9 or targ10 or targ11
( poke0=pokel0 or poker0 or pokeu0 or poked0 )
pokel=pokel0 or pokel1
poker=poker0 or poker1
pokeu=pokeu0 or pokeu1
poked=poked0 or poked1
pokeh=pokel or poker
pokev=pokeu or poked
poke=pokeh or pokev
player=poke
mover=poke or el
blocker=Wall or border or nomove
=======
SOUNDS
=======
sfx1 49144507 (push)
sfx2 69162504 (blocked)
EndLevel 20562505
================
COLLISIONLAYERS
================
Background
Border
num
(should never show up)
nomove
nostarted
started
targ
Wall
bevell
bevelr
bevelu
beveld
poke
el
sell
selr
selu
seld
======
RULES
======
(startup)
random [background] -> [background nostarted]
[started][nostarted] -> [started][]
(bevel walls)
[nostarted][wall] -> [nostarted][wall bevell bevelr bevelu beveld]
left [nostarted][bevell | bevelr] -> [nostarted][|]
right [nostarted][bevelr | bevell] -> [nostarted][|]
up [nostarted][bevelu | beveld] -> [nostarted][|]
down [nostarted][beveld | bevelu] -> [nostarted][|]
[nostarted] -> [started] checkpoint
(create target elephant)
right [|targ1]->[targ0|targ1]
down [targ0||]->[targ0|targ4|targ8]
right [targ0|||]->[targ0|targ1|targ2|targ3]
right [targ4|||]->[targ4|targ5|targ6|targ7]
right [targ8|||]->[targ8|targ9|targ10|targ11]
(A. player presses direction; game adds > tag to each relevant stick)
horizontal [> pokev] -> [pokev] (restrict poke directionality to relevant sticks only)
vertical [> pokeh] -> [pokeh]
(B. check every mover -- mark ones that can't move in player dir)
(nomove is a blocker, so it propagates)
[> player | ][mover | blocker] -> [> player | ][mover nomove | blocker]
+[el | el nomove] -> [el nomove | el nomove] (flood)
+up [nomove pokeu | pokeu1] -> [nomove pokeu | nomove pokeu1] (flood sticks)
+up [pokeu | nomove pokeu1] -> [nomove pokeu | nomove pokeu1] (+s are required)
+down [nomove poked | poked1] -> [nomove poked | nomove poked1]
+down [poked | nomove poked1] -> [nomove poked | nomove poked1]
+left [nomove pokel | pokel1] -> [nomove pokel | nomove pokel1]
+left [pokel | nomove pokel1] -> [nomove pokel | nomove pokel1]
+right [nomove poker | poker1] -> [nomove poker | nomove poker1]
+right [poker | nomove poker1] -> [nomove poker | nomove poker1]
(now, all movers that can't move are marked with a nomove tag)
(D. > tag evaporates on nomove tag)
[moving mover nomove] -> [mover nomove] sfx2
up [stationary pokeu | moving pokeu1] -> [pokeu | pokeu1] (flood sticks)
+up [moving pokeu | stationary pokeu1] -> [pokeu | pokeu1]
down [stationary poked | moving poked1] -> [poked | poked1]
+down [moving poked | stationary poked1] -> [poked | poked1]
left [stationary pokel | moving pokel1] -> [pokel | pokel1]
+left [moving pokel | stationary pokel1] -> [pokel | pokel1]
right [stationary poker | moving poker1] -> [poker | poker1]
+right [moving poker | stationary poker1] -> [poker | poker1]
(push)
[> mover | stationary mover no nomove] -> [> mover | > mover] sfx1
+[moving el | el] -> [moving el | moving el] (flood)
+up [moving pokeu | pokeu1 no nomove] -> [moving pokeu | moving pokeu1]
+up [pokeu no nomove | moving pokeu1] -> [moving pokeu | moving pokeu1]
+down [moving poked | poked1 no nomove] -> [moving poked | moving poked1]
+down [poked no nomove | moving poked1] -> [moving poked | moving poked1]
+left [moving pokel | pokel1 no nomove] -> [moving pokel | moving pokel1]
+left [pokel no nomove | moving pokel1] -> [moving pokel | moving pokel1]
+right [moving poker | poker1 no nomove] -> [moving poker | moving poker1]
+right [poker no nomove | moving poker1] -> [moving poker | moving poker1]
[nomove] -> []
(selection marquee)
late [sel]->[]
late right [|el|] -> [sell1 | el | selr1]
late up [|el|] -> [seld1 | el | selu1]
late [sel el] -> [el]
(solver help
late [el0 | el0][player]->[el0 | el0][]
late [el1 | el1][player]->[el1 | el1][]
late [el2 | el2][player]->[el2 | el2][]
late [el3 | el3][player]->[el3 | el3][]
late [el0 | el3][player]->[el0 | el3][]
late [el1 | el2][player]->[el1 | el2][]
late left [el0 | el1][player]->[el0 | el1][]
late up [el0 | el1][player]->[el0 | el1][]
late down [el0 | el1][player]->[el0 | el1][]
late left [el0 | el2][player]->[el0 | el2][]
late right [el0 | el2][player]->[el0 | el2][]
late up [el0 | el2][player]->[el0 | el2][]
late left [el1 | el3][player]->[el1 | el3][]
late right [el1 | el3][player]->[el1 | el3][]
late up [el1 | el3][player]->[el1 | el3][]
late left [el2 | el3][player]->[el2 | el3][]
late up [el2 | el3][player]->[el2 | el3][]
late down [el2 | el3][player]->[el2 | el3][]
)
==============
WINCONDITIONS
==============
All el0 on targ1
All el1 on targ2
All el2 on targ5
All el3 on targ6
=======
LEVELS
=======
(level_select_point)
message I am constructing an elephant in a bottle
(basic metaphor)
,,,,,,,,,,,,,,,,,,,,,
,.......│┤..........,
,..........########.,
,.....#..###......#.,
,.....####........#.,
,.4llllll.0..1wq..#.,
,.....####.2..3...#.,
,.....#..###......#.,
,..........########.,
,...................,
,,,,,,,,,,,,,,,,,,,,,
(level_select_point)
message the elephant is very sticky
(stickiness; also teaches stick ortho push)
,,,,,,,,,,,,,,
,............,
,....####....,
,...##..##...,
,....wq..#...,
,...#....#...,
,...#..1.hh6.,
,.4ll..3.#...,
,...#.0..#...,
,...##2.##...,
,....#k.#....,
,...##k.##...,
,.....5....│╡,
,............,
,,,,,,,,,,,,,,
(level_select_point)
(new level! has a bit of a twist but easyish to find)
,,,,,,,,,,,,,,,
,......7......,
,......j......,
,......j......,
,..####.###.#.,
,.##..01..###.,
,.#..q.....hh6,
,.#.....3.###.,
,.##...2..#.#.,
,..####.###...,
,......k......,
,..│╢..k......,
,......5......,
,,,,,,,,,,,,,,,
(level_select_point)
(teaching about movement basics in a level with a strong solve path)
,,,,,,,,,,,,,,,,,,,,,
,...................,
,.......##..........,
,.....7.#...........,
,.....j.##..........,
,........##...│╖....,
,..4l.....##........,
,..........#######..,
,.###............##.,
,.#.##............#.,
,....##...........#.,
,.....#..0wq..1...#.,
,.....##..2..3...##.,
,......###########..,
,...................,
,,,,,,,,,,,,,,,,,,,,,
(level_select_point)
(stick blocking)
,,,,,,,,,,,,,,,,
,..............,
,......7.......,
,......j.......,
,..####j###.#..,
,.##wq..0.###..,
,.#.....2..hh6.,
,.#.......#....,
,.#.....1..hh6.,
,.##....3.###..,
,..###k.###.#..,
,.....k........,
,.....5...│╕...,
,..............,
,,,,,,,,,,,,,,,,
( (possible but weirrrrd at end) )
( ,,,,,,,,,,,,,,,, )
( ,.............., )
( ,......7......., )
( ,......j......., )
( ,..###.j###.#.., )
( ,.##....0.###.., )
( ,.#.wq..2..hh6., )
( ,.#.......#...., )
( ,.#.....1..hh6., )
( ,.##....3.###.., )
( ,..###k.###.#.., )
( ,.....k........, )
( ,.....5...│...., )
( ,.............., )
( ,,,,,,,,,,,,,,,, )
(level_select_point)
message it would be better if the elephant were not so sticky
(need to push a stick for separation)
,,,,,,,,,,,,,,,,,,
,................,
,........######..,
,.....####.wq.#..,
,.....#.......#..,
,.....#.......#..,
,.│╣..#.......hh6,
,.....#.###.#.#..,
,..#..#.#.....#..,
,..####0....1.#..,
,4ll...2..3...#..,
,.....#.......#..,
,.4llll.......#..,
,..#######k####..,
,..#......5......,
,................,
,,,,,,,,,,,,,,,,,,
(level_select_point)
(need to leave goal to slurp trunk)
,,,,,,,,,,,,,,,,,,
,................,
,.│║......7......,
,......##.j..##..,
,....###..j...#..,
,....#...........,
,..#.#wa1.....#..,
,..###.2......#..,
,.4ll.......3.#..,
,..###........#..,
,..#.##...#####..,
,................,
,................,
,,,,,,,,,,,,,,,,,,
(level_select_point)
(must move piece _right_ first)
,,,,,,,,,,,,,,,,,
,..........7....,
,..........j....,
,.....#####j##..,
,.....#......#..,
,.#.###......#..,
,.###....1...#..,
,...#wa..3...h6.,
,...#.2......#..,
,.###........#..,
,.#.###......#..,
,.....#......#..,
,..│╗.###.####..,
,...............,
,,,,,,,,,,,,,,,,,
(level_select_point)
(side pushing)
,,,,,,,,,,,,,,,,,,
,................,
,................,
,....7........#..,
,...#j#########..,
,...#.......hhhh6,
,.###.#....0###..,
,.#.......#k#.#..,
,.#wq.1...#5#....,
,.#..23...#k.....,
,.#.......#5.....,
,.####.│╝.#k.....,
,..........5.....,
,,,,,,,,,,,,,,,,,,
(level_select_point)
(prep for final)
,,,,,,,,,,,,,,,,,
,...............,
,.....7.........,
,..###j####.....,
,..#......#.....,
,..#......###.#.,
,..#..2.....###.,
,.4l....wq1.#...,
,..#......3.#...,
,..#..0.....###.,
,..#......###.#.,
,..#......#.....,
,..####.###.┤╜..,
,...............,
,,,,,,,,,,,,,,,,,
(level_select_point)
message ah, this one reminds me of my early days
(nifty exit)
,,,,,,,,,,,,,,,,,,,,,,
,....................,
,...7................,
,...j........#######.,
,...j.......##.....##,
,...j.......#..┤╛...#,
,......01.#.#.......#,
,.4l......###..wq...#,
,.....2.3..........##,
,....#########k#####.,
,...k#........k......,
,...k.........k......,
,...5.........5......,
,,,,,,,,,,,,,,,,,,,,,,
( ,,,,,,,,,,,,,,,,,, )
( ,................, )
( ,................, )
( ,.##7....##......, )
( ,..#j.7..#...┤╛.., )
( ,..#j.j..#......., )
( ,..#j.j#.##.##..., )
( ,..#.........#..., )
( ,..#.....##..#..., )
( ,..#....01#..#..., )
( ,.4l..2#..#..#..., )
( ,..#.........###., )
( ,..#...3###.wq.#., )
( ,..#...........#., )
( ,..########k####., )
( ,..........k....., )
( ,..........5....., )
( ,,,,,,,,,,,,,,,,,, )
(level_select_point)
message the final bottle
,,,,,,,,,,,,,,,,
,########......,
,########......,
,##.wq.##......,
,##....##......,
,##....##.┤╞...,
,##....##......,
,##....########,
,##....########,
,##a1..k.....##,
,##23..5.h6..##,
,##.....01...##,
,##.....23...##,
,##....#####.##,
,##....#####.##,
,##....##..#.#.,
,##....##.##.##,
,########......,
,########......,
,,,,,,,,,,,,,,,,
message now all of the elephants are safely in their bottles
message at last, I can rest
(((
message level 3, hell version
(this is not the simplest solution)
(dllll rdrrd rrrdl llluu ulddl ruuur rrrdr rddru uluul lrrdd dulll urrdl lurdr rdddd lu)
,,,,,,,,,,,,,,,,,
,...............,
,.......j.......,
,.......j.......,
,...####j####...,
,...#...01..#...,
,...#.q.....hhh.,
,.lll.....3.#...,
,...#....2..#...,
,...#.......#...,
,...#####k###...,
,........k......,
,....┤╢..k......,
,...............,
,,,,,,,,,,,,,,,,,
message level 4, hell version
(dddrr rrlld rurdr rdrdd ddllu luurr ruuul uldrd luldr dlddd lulll uuurr rurrd ddlld dddru uurur ruuul uldrd ddlld llllu urrdd rurur ruuuu ldldr)
,,,,,,,,,,,,,,,
,.....7.......,
,.....j.......,
,..###j####.┤╖,
,..#......#...,
,..#......###.,
,..#..2.....#.,
,4ll.....q1.#.,
,..#......3.#.,
,..#..0.....#.,
,..#......###.,
,..#......#...,
,..####.###...,
,.............,
,,,,,,,,,,,,,,,
message level 5, hell version
(looks like it does some shenanigans with the pushers outside the bottle to get around the elephant in the way. wacky)
(rrrrr ddddr rrdll dddlu rulul uulll ldrdr drdru ulurr urrdd rurru uruuu lllld duuul lddll drurr rddld drrdl ddlld lullu lurrd ruulu uuurr dlddr drrdd ddlul uuuuu lluuu rrrru rrrdr dddlu uuldr dddll ll)
,,,,,,,,,,,,,,,,,
,...............,
,...............,
,.┤╕.....7......,
,........j......,
,...###..j##....,
,...#...........,
,...#w01.....#..,
,.....2......#..,
,.4ll......3.#..,
,...#........#..,
,...##...#####..,
,...............,
,...............,
,,,,,,,,,,,,,,,,,
(combined 2 levels, probably too much)
,,,,,,,,,,,,,,,,,,
,................,
,..........####..,
,..........#q.#..,
,.....######..#..,
,.....#.......#..,
,.│╕..........hh6,
,.....#.###.#.#..,
,..#..#.#.....#..,
,..####0....1.#..,
,...4ll2..3...#..,
,.....#.......#..,
,4lllll.......#..,
,..#######k####..,
,..#......5......,
,................,
,,,,,,,,,,,,,,,,,,
(ideas)
(
x swap sides
x use peg to block and desync other pegs
x use peg to widen push
x need to use peg to push but prevent sticking
x need to take already-correct pieces away to glom onto other needed pieces
take elephant out of the bottle
two elephants, both left halves in left bottle, both right halves in right bottle?
move sticks outside the bottle
annoying separate puzzle that restricts your movement in the main puzzle
kinda like jelly is sticky
x like croc level 18
lots of sticks to mega shovel very lateral
combine with that one level
x vanilla-looking sokoban, but with two 1-wide pushers. anything interesting here?
x tap-through mommentum is easy to tutorialize
ice tap level?
add sfx when two parts stick together
2 elephants - required to stick two together that looks like you lose
mechanic: pushable crates
)
(ice tap tutorial -- mechanics no longer work)
,,,,,,,,,,,,,,,
,.............,
,.....#######.,
,..#.##..wq.#.,
,..###.7....#.,
,......j.#..#.,
,......j0..1#.,
,.4ll..j2..3#.,
,..###.j...k#.,
,..#.##....5#.,
,.....#######.,
,.............,
,,,,,,,,,,,,,,,
(winnable)
,,,,,,,,,,,,,,,,
,..............,
,........7.....,
,........j.....,
,........j.....,
,..........hh6.,
,.4ll0.3.......,
,......q.......,
,.....k.2.1....,
,.....k........,
,.....5........,
,..............,
,..............,
,,,,,,,,,,,,,,,,
(variant; idk if winnable)
,,,,,,,,,,,,,,,,
,..............,
,........7.....,
,........j.....,
,...##...j.##..,
,...#......hh6.,
,.4ll0.3....#..,
,...........#..,
,...#.k.2.1.#..,
,...##k....##..,
,.....5........,
,..............,
,..............,
,,,,,,,,,,,,,,,,
(rejects)
(some cool solver solutions, but lol L*R* wins)
(lllrr rrrll ldlld luluu llrrd rr)
,,,,,,,,,,,,,,,,,,
,................,
,................,
,........j.......,
,...#####j###....,
,...#.......#....,
,..ll..0q.1..hh..,
,...#.2..3..#....,
,...#.......#....,
,...#####k###....,
,........k.......,
,................,
,................,
,,,,,,,,,,,,,,,,,,
(impossible?)
,,,,,,,,,,,,,,,,,,
,................,
,................,
,........j.......,
,...#####j###....,
,...#.......#....,
,...#..0q.1..hh..,
,...#.3..2..#....,
,..ll.......#....,
,...#####k###....,
,........k.......,
,................,
,................,
,,,,,,,,,,,,,,,,,,
(already have a level about swapping two el quarters)
,,,,,,,,,,,,,,,,,
,...............,
,.........j.....,
,...#####.j.##..,
,...#........#..,
,...#..0..3.....,
,..ll...q.......,
,...#...........,
,...#..2..1..#..,
,...#........#..,
,...#####...##..,
,...............,
,,,,,,,,,,,,,,,,,
(rejected version of level 7)
,,,,,,,,,,,,,,,,
,...7..........,
,...j..........,
,...j..........,
,..............,
,...01..######.,
,......##....#.,
,..........q.#.,
,...23..#....#.,
,..4l........#.,
,......###k###.,
,......#..k....,
,.........5....,
,..............,
,,,,,,,,,,,,,,,,
(beatable but meaner)
,,,,,,,,,,,,,,,
,.............,
,.....7.......,
,..###j####...,
,..#......###.,
,..#..2.....#.,
,.4l.....q1.#.,
,..#......3.#.,
,..#..0.....#.,
,..#......###.,
,..####.###...,
,.............,
,,,,,,,,,,,,,,,
(too open)
,,,,,,,,,,,,,,,,
,..............,
,......7.......,
,......j.......,
,..####j###.#..,
,.##..01..###..,
,.#wq......hh6.,
,.#.....3.#....,
,.#....2...hh6.,
,.##......###..,
,..####k###.#..,
,......k.......,
,..│╖..5.......,
,..............,
,,,,,,,,,,,,,,,,
(tech test map)
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,....................wq....3.,
,..kll.......................,
,..k.......llkll.............,
,..kk........k...............,
,...kll....##k........####...,
,.##k......##.........#.hh6..,
,.....................###....,
,....3k..................k...,
,....kklll...kll.........k...,
,....1k......5...........k...,
,...k3.......k...............,
,..1k......##5..........│╕...,
,.#3.......##................,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment