Skip to content

Instantly share code, notes, and snippets.

@aadenboy
Created January 13, 2024 21:49
Show Gist options
  • Select an option

  • Save aadenboy/f25154bcaa47ba8d2671354018eb8945 to your computer and use it in GitHub Desktop.

Select an option

Save aadenboy/f25154bcaa47ba8d2671354018eb8945 to your computer and use it in GitHub Desktop.
SokoGate (Puzzlescript Plus Script)
Play this game by pasting the script in https://auroriax.github.io/PuzzleScript/editor.html
title SokoGate
author aadenboy
sprite_size 10
background_color #555555
level_select
level_select_lock
level_select_unlocked_ahead 101
level_select_solve_symbol X
continue_is_level_select
text_controls WASD/Arrow keys to move\nSpace to wait\nZ to undo, R to restart
========
OBJECTS
========
background .
#777777
player p
#000000 #ffffff
.00000000.
0111111110
0100000010
0100101010
0101010010
0100101010
0101010010
0100000010
0111111110
.00000000.
playergoal l
#555555 #aaaaaa
..........
..........
..111111..
..1101010.
..1010110.
..1101010.
..1010110.
..1111110.
...000000.
..........
wall #
#555555
bool0 0
#000000 #ff0000
.00000000.
0111111110
0111001110
0110110110
0110110110
0110110110
0110110110
0111001110
0111111110
.00000000.
goal0 o
#550000 #aa0000
..........
..........
....11....
...1.01...
...10.10..
...10.10..
...10.10..
....11.0..
.....00...
..........
bool1 1
#000000 #00ff00
.00000000.
0111111110
0111101110
0111001110
0110101110
0111101110
0111101110
0110000110
0111111110
.00000000.
goal1 i
#005500 #00aa00
..........
..........
.....1....
....110...
...1.10...
....010...
.....10...
...1111...
....0000..
..........
boolp0
#000000
boolp1
#000000
booldestroy
#000000
trash ~
#8800aa #cc00ff
..........
..........
..1....1..
...1..1.0.
....11.0..
....110...
...1.01...
..1.0..1..
...0....0.
..........
kill copy:trash `
#880000 #ff0000
(
GATE 0 90 180 270
NOT 2 Q A Z
AND 3 W S X
OR 4 E D C
NAND 5 R F V
NOR 6 T G B
XOR 7 Y H N
XNOR 8 U J M
)
notgate0 2
#000000 #ff0000
00........
0100......
01110.....
011110.00.
0111110110
0111110110
011110.00.
01110.....
0100......
00........
notgate90 Q
#000000 #ff0000
....00....
...0110...
...0110...
....00....
...0110...
..011110..
.01111110.
.01111110.
0111111110
0000000000
notgate180 A
#000000 #ff0000
........00
......0010
.....01110
.00.011110
0110111110
0110111110
.00.011110
.....01110
......0010
........00
notgate270 Z
#000000 #ff0000
0000000000
0111111110
.01111110.
.01111110.
..011110..
...0110...
....00....
...0110...
...0110...
....00....
notfloor !
#aa0000 #ff0000
..........
..........
..1.......
..11.11...
..101.01..
..1010.10.
..11.11.0.
..100.00..
...0......
..........
andgate0 3
#000000 #0077ff
0000000...
011111100.
011111110.
0111111110
0111111110
0111111110
0111111110
011111110.
011111100.
0000000...
andgate90 W
#000000 #0077ff
...0000...
.00111100.
.01111110.
0111111110
0111111110
0111111110
0111111110
0111111110
0111111110
0000000000
andgate180 S
#000000 #0077ff
...0000000
.001111110
.011111110
0111111110
0111111110
0111111110
0111111110
.011111110
.001111110
...0000000
andgate270 X
#000000 #0077ff
0000000000
0111111110
0111111110
0111111110
0111111110
0111111110
0111111110
.01111110.
.00111100.
...0000...
andgatep0
#000000
andgatep1
#000000
orgate0 4
#000000 #00ff00
0000000...
011111100.
.01111110.
..01111110
..01111110
..01111110
..01111110
.01111110.
011111100.
0000000...
orgate90 E
#000000 #00ff00
...0000...
.00111100.
.01111110.
0111111110
0111111110
0111111110
0111111110
0110000110
010....010
00......00
orgate180 D
#000000 #00ff00
...0000000
.001111110
.01111110.
01111110..
01111110..
01111110..
01111110..
.01111110.
.001111110
...0000000
orgate270 C
#000000 #00ff00
00......00
010....010
0110000110
0111111110
0111111110
0111111110
0111111110
.01111110.
.00111100.
...0000...
orgatep0
#000000
orgatep1
#000000
(5rfv)
nandgate0 5
#000000 #0022aa
00000.....
0111100...
0111110...
011111100.
0111110110
0111110110
011111100.
0111110...
0111100...
00000.....
nandgate90 R
#000000 #0022aa
....00....
...0110...
...0110...
.00100100.
.01111110.
0111111110
0111111110
0111111110
0111111110
0000000000
nandgate180 F
#000000 #0022aa
.....00000
...0011110
...0111110
.001111110
0110111110
0110111110
.001111110
...0111110
...0011110
.....00000
nandgate270 V
#000000 #0022aa
0000000000
0111111110
0111111110
0111111110
0111111110
.01111110.
.00100100.
...0110...
...0110...
....00....
nandgatep0
#000000
nandgatep1
#000000
norgate0 6
#000000 #00aa00
00000.....
0111100...
.011110...
..0111100.
..01110110
..01110110
..0111100.
.011110...
0111100...
00000.....
norgate90 T
#000000 #00aa00
....00....
...0110...
...0110...
.00100100.
.01111110.
0111111110
0111111110
0110000110
010....010
00......00
norgate180 G
#000000 #00aa00
.....00000
...0011110
...011110.
.0011110..
01101110..
01101110..
.0011110..
...011110.
...0011110
.....00000
norgate270 B
#000000 #00aa00
00......00
010....010
0110000110
0111111110
0111111110
.01111110.
.00100100.
...0110...
...0110...
....00....
norgatep0
#000000
norgatep1
#000000
xorgate0 7
#000000 #ff00ff
0.00000...
0.0111100.
.0.011110.
..0.011110
..0.011110
..0.011110
..0.011110
.0.011110.
0.0111100.
0.00000...
xorgate90 Y
#000000 #ff00ff
...0000...
.00111100.
.01111110.
0111111110
0111111110
0110000110
010....010
00.0000.00
..0....0..
00......00
xorgate180 H
#000000 #ff00ff
...00000.0
.0011110.0
.011110.0.
011110.0..
011110.0..
011110.0..
011110.0..
.011110.0.
.0011110.0
...00000.0
xorgate270 N
#000000 #ff00ff
00......00
..0....0..
00.0000.00
010....010
0110000110
0111111110
0111111110
.01111110.
.00111100.
...0000...
xorgatep0
#000000
xorgatep1
#000000
(8ujm)
xnorgate0 8
#000000 #aa00aa
0.0000....
0.011100..
.0.01110..
..0.01100.
..0.010110
..0.010110
..0.01100.
.0.01110..
0.011100..
0.0000....
xnorgate90 U
#000000 #aa00aa
....00....
...0110...
.00011000.
.01100110.
0111111110
0110000110
010....010
00.0000.00
..0....0..
00......00
xnorgate180 J
#000000 #aa00aa
....0000.0
..001110.0
..01110.0.
.00110.0..
011010.0..
011010.0..
.00110.0..
..01110.0.
..001110.0
....0000.0
xnorgate270 M
#000000 #aa00aa
00......00
..0....0..
00.0000.00
010....010
0110000110
0111111110
.01100110.
.00011000.
...0110...
....00....
xnorgatep0
#000000
xnorgatep1
#000000
gateblocked
transparent
splitterv %
#aaaa00 #ffff00
..........
....11....
.....00...
....11....
...1.01...
...10.10..
....11.0..
.....00...
....11....
.....00...
splitterh $
#aaaa00 #ffff00
..........
..........
..........
....11....
.1.1.01.1.
.1010.1010
..0.11.0.0
.....00...
..........
..........
splittervp
#000000
splitterhp
#000000
notclone
#000000
=======
LEGEND
=======
@ = bool0 or bool1 or notgate0 or notgate90 or notgate180 or notgate270 or andgate0 or andgate90 or andgate180 or andgate270 or orgate0 or orgate90 or orgate180 or orgate270 or nandgate0 or nandgate90 or nandgate180 or nandgate270 or norgate0 or norgate90 or norgate180 or norgate270 or xorgate0 or xorgate90 or xorgate180 or xorgate270 or xnorgate0 or xnorgate90 or xnorgate180 or xnorgate270
allgate = notgate0 or notgate90 or notgate180 or notgate270 or andgate0 or andgate90 or andgate180 or andgate270 or orgate0 or orgate90 or orgate180 or orgate270 or nandgate0 or nandgate90 or nandgate180 or nandgate270 or norgate0 or norgate90 or norgate180 or norgate270 or xorgate0 or xorgate90 or xorgate180 or xorgate270 or xnorgate0 or xnorgate90 or xnorgate180 or xnorgate270
0gate = notgate0 or andgate0 or orgate0 or nandgate0 or norgate0 or xorgate0 or xnorgate0
90gate = notgate90 or andgate90 or orgate90 or nandgate90 or norgate90 or xorgate90 or xnorgate90
180gate = notgate180 or andgate180 or orgate180 or nandgate180 or norgate180 or xorgate180 or xnorgate180
270gate = notgate270 or andgate270 or orgate270 or nandgate270 or norgate270 or xorgate270 or xnorgate270
=======
SOUNDS
=======
player move 45191707
bool0 move 12984707
bool1 move 12984707
notgate0 move 12984707
notgate90 move 12984707
notgate180 move 12984707
notgate270 move 12984707
andgate0 move 12984707
andgate90 move 12984707
andgate180 move 12984707
andgate270 move 12984707
orgate0 move 12984707
orgate90 move 12984707
orgate180 move 12984707
orgate270 move 12984707
nandgate0 move 12984707
nandgate90 move 12984707
nandgate180 move 12984707
nandgate270 move 12984707
norgate0 move 12984707
norgate90 move 12984707
norgate180 move 12984707
norgate270 move 12984707
xorgate0 move 12984707
xorgate90 move 12984707
xorgate180 move 12984707
xorgate270 move 12984707
xnorgate0 move 12984707
xnorgate90 move 12984707
xnorgate180 move 12984707
xnorgate270 move 12984707
endlevel 37116908
closemessage 37116908
restart 90017902
undo 59243906
boolp0 create 12330505 (not gate)
boolp1 create 12330505 (not gate)
andgatep0 create 80364703 (and gate)
andgatep1 create 80364703 (and gate)
orgatep0 create 83669903 (or gate)
orgatep1 create 83669903 (or gate)
nandgatep0 create 15365603 (nand gate)
nandgatep1 create 15365603 (nand gate)
norgatep0 create 85770003 (nor gate)
norgatep1 create 85770003 (nor gate)
xorgatep0 create 48331103 (xor gate)
xorgatep1 create 48331103 (xor gate)
xnorgatep0 create 48351503 (xnor gate)
xnorgatep1 create 48351503 (xnor gate)
booldestroy destroy 58043108 (trash)
booldestroy destroy 58043108 (trash)
player destroy 58043108 (terminate)
wall destroy 58043108 (wall remove)
sfx0 35503509 (splitter)
sfx1 13370703 (de morgan 1 !(a gate b))
sfx2 16535703 (de morgan 2 !a gate !b)
sfx3 2151502 (not not)
(funny sound that is someone walking then turning around and walking back 88447308)
================
COLLISIONLAYERS
================
background
wall goal0 goal1 playergoal trash kill splitterv splitterh notfloor
player bool0 bool1 notgate0 notgate90 notgate180 notgate270 andgate0 andgate90 andgate180 andgate270 orgate0 orgate90 orgate180 orgate270 nandgate0 nandgate90 nandgate180 nandgate270 norgate0 norgate90 norgate180 norgate270 xorgate0 xorgate90 xorgate180 xorgate270 xnorgate0 xnorgate90 xnorgate180 xnorgate270
andgatep0 andgatep1
orgatep0 orgatep1
nandgatep0 nandgatep1
norgatep0 norgatep1
xorgatep0 xorgatep1
xnorgatep0 xnorgatep1
splittervp splitterhp notclone
boolp0 boolp1 booldestroy gateblocked
======
RULES
======
(basic collision)
[> player|wall] -> [player|wall]
(box movement + collision)
[> player|bool0] -> [> player|> bool0]
[> player|bool1] -> [> player|> bool1]
[> bool0|bool0] -> [> bool0|> bool0]
[> bool1|bool1] -> [> bool1|> bool1]
[> bool0|wall] -> [bool0|wall]
[> bool1|wall] -> [bool1|wall]
(trash)
late [bool0 trash] -> [booldestroy trash]
late [bool1 trash] -> [booldestroy trash]
late [booldestroy] -> []
(kill)
late [player kill] -> [kill]
(flag gates as blocked or not)
(reset all gateblocked objects)
late [gateblocked] -> []
(if gate output is blocked, give gateblocked object, otherwise don't)
late right [0gate|@] -> [0gate gateblocked|@]
late up [90gate|@] -> [90gate gateblocked|@]
late left [180gate|@] -> [180gate gateblocked|@]
late down [270gate|@] -> [270gate gateblocked|@]
(NOT gate)
(0 deg)
[> player|notgate0] -> [> player|> notgate0]
[> notgate0|notgate0] -> [> notgate0|> notgate0]
[> notgate0|wall] -> [notgate0|wall]
late right [bool0|notgate0|no @] -> [|notgate0|boolp1]
late right [bool1|notgate0|no @] -> [|notgate0|boolp0]
late right [notgate0|notgate0] -> [|] sfx3
(90 deg)
[> player|notgate90] -> [> player|> notgate90]
[> notgate90|notgate90] -> [> notgate90|> notgate90]
[> notgate90|wall] -> [notgate90|wall]
late up [bool0|notgate90|no @] -> [|notgate90|boolp1]
late up [bool1|notgate90|no @] -> [|notgate90|boolp0]
late up [notgate90|notgate90] -> [|] sfx3
(180 deg)
[> player|notgate180] -> [> player|> notgate180]
[> notgate180|notgate180] -> [> notgate180|> notgate180]
[> notgate180|wall] -> [notgate180|wall]
late left [bool0|notgate180|no @] -> [|notgate180|boolp1]
late left [bool1|notgate180|no @] -> [|notgate180|boolp0]
late left [notgate180|notgate180] -> [|] sfx3
(270 deg)
[> player|notgate270] -> [> player|> notgate270]
[> notgate270|notgate270] -> [> notgate270|> notgate270]
[> notgate270|wall] -> [notgate270|wall]
late down [bool0|notgate270|no @] -> [|notgate270|boolp1]
late down [bool1|notgate270|no @] -> [|notgate270|boolp0]
late down [notgate270|notgate270] -> [|] sfx3
(not floor)
late [notfloor bool0] -> [boolp1]
late [notfloor bool1] -> [boolp0]
(fix booleans)
late [boolp0] -> [bool0]
late [boolp1] -> [bool1]
(AND gate)
(0 deg)
[> player|andgate0] -> [> player|> andgate0]
[> andgate0|andgate0] -> [> andgate0|> andgate0]
[> andgate0|wall] -> [andgate0|wall]
late down [bool0|andgate0 no gateblocked|bool0] -> [|andgatep0|]
late down [bool0|andgate0 no gateblocked|bool1] -> [|andgatep0|]
late down [bool1|andgate0 no gateblocked|bool0] -> [|andgatep0|]
late down [bool1|andgate0 no gateblocked|bool1] -> [|andgatep1|]
late right [andgatep0|] -> [andgate0|bool0]
late right [andgatep1|] -> [andgate0|bool1]
late right [andgate0|notgate0] -> [nandgate0|] sfx1
late down [notgate0|andgate0|notgate0] -> [|norgate0|] sfx2
(90 deg)
[> player|andgate90] -> [> player|> andgate90]
[> andgate90|andgate90] -> [> andgate90|> andgate90]
[> andgate90|wall] -> [andgate90|wall]
late right [bool0|andgate90 no gateblocked|bool0] -> [|andgatep0|]
late right [bool0|andgate90 no gateblocked|bool1] -> [|andgatep0|]
late right [bool1|andgate90 no gateblocked|bool0] -> [|andgatep0|]
late right [bool1|andgate90 no gateblocked|bool1] -> [|andgatep1|]
late up [andgatep0|] -> [andgate90|bool0]
late up [andgatep1|] -> [andgate90|bool1]
late up [andgate90|notgate90] -> [nandgate90|] sfx1
late right [notgate90|andgate90|notgate90] -> [|norgate90|] sfx2
(180 deg)
[> player|andgate180] -> [> player|> andgate180]
[> andgate180|andgate180] -> [> andgate180|> andgate180]
[> andgate180|wall] -> [andgate180|wall]
late up [bool0|andgate180 no gateblocked|bool0] -> [|andgatep0|]
late up [bool0|andgate180 no gateblocked|bool1] -> [|andgatep0|]
late up [bool1|andgate180 no gateblocked|bool0] -> [|andgatep0|]
late up [bool1|andgate180 no gateblocked|bool1] -> [|andgatep1|]
late left [andgatep0|] -> [andgate180|bool0]
late left [andgatep1|] -> [andgate180|bool1]
late left [andgate180|notgate180] -> [nandgate180|] sfx1
late up [notgate180|andgate180|notgate180] -> [|norgate180|] sfx1
(270 deg)
[> player|andgate270] -> [> player|> andgate270]
[> andgate270|andgate270] -> [> andgate270|> andgate270]
[> andgate270|wall] -> [andgate270|wall]
late left [bool0|andgate270 no gateblocked|bool0] -> [|andgatep0|]
late left [bool0|andgate270 no gateblocked|bool1] -> [|andgatep0|]
late left [bool1|andgate270 no gateblocked|bool0] -> [|andgatep0|]
late left [bool1|andgate270 no gateblocked|bool1] -> [|andgatep1|]
late down [andgatep0|] -> [andgate270|bool0]
late down [andgatep1|] -> [andgate270|bool1]
late down [andgate270|notgate270] -> [nandgate270|] sfx1
late left [notgate270|andgate270|notgate270] -> [|norgate270|] sfx2
(OR gate)
(0 deg)
[> player|orgate0] -> [> player|> orgate0]
[> orgate0|orgate0] -> [> orgate0|> orgate0]
[> orgate0|wall] -> [orgate0|wall]
late down [bool0|orgate0 no gateblocked|bool0] -> [|orgatep0|]
late down [bool0|orgate0 no gateblocked|bool1] -> [|orgatep1|]
late down [bool1|orgate0 no gateblocked|bool0] -> [|orgatep1|]
late down [bool1|orgate0 no gateblocked|bool1] -> [|orgatep1|]
late right [orgatep0|] -> [orgate0|bool0]
late right [orgatep1|] -> [orgate0|bool1]
late right [orgate0|notgate0] -> [norgate0|] sfx1
late down [notgate0|orgate0|notgate0] -> [|nandgate0|] sfx2
(90 deg)
[> player|orgate90] -> [> player|> orgate90]
[> orgate90|orgate90] -> [> orgate90|> orgate90]
[> orgate90|wall] -> [orgate90|wall]
late right [bool0|orgate90 no gateblocked|bool0] -> [|orgatep0|]
late right [bool0|orgate90 no gateblocked|bool1] -> [|orgatep1|]
late right [bool1|orgate90 no gateblocked|bool0] -> [|orgatep1|]
late right [bool1|orgate90 no gateblocked|bool1] -> [|orgatep1|]
late up [orgatep0|] -> [orgate90|bool0]
late up [orgatep1|] -> [orgate90|bool1]
late up [orgate90|notgate90] -> [norgate90|] sfx1
late right [notgate90|orgate90|notgate90] -> [|nandgate90|] sfx2
(180 deg)
[> player|orgate180] -> [> player|> orgate180]
[> orgate180|orgate180] -> [> orgate180|> orgate180]
[> orgate180|wall] -> [orgate180|wall]
late up [bool0|orgate180 no gateblocked|bool0] -> [|orgatep0|]
late up [bool0|orgate180 no gateblocked|bool1] -> [|orgatep1|]
late up [bool1|orgate180 no gateblocked|bool0] -> [|orgatep1|]
late up [bool1|orgate180 no gateblocked|bool1] -> [|orgatep1|]
late left [orgatep0|] -> [orgate180|bool0]
late left [orgatep1|] -> [orgate180|bool1]
late left [orgate180|notgate180] -> [norgate180|] sfx1
late up [notgate180|orgate180|notgate180] -> [|nandgate180|] sfx2
(270 deg)
[> player|orgate270] -> [> player|> orgate270]
[> orgate270|orgate270] -> [> orgate270|> orgate270]
[> orgate270|wall] -> [orgate270|wall]
late left [bool0|orgate270 no gateblocked|bool0] -> [|orgatep0|]
late left [bool0|orgate270 no gateblocked|bool1] -> [|orgatep1|]
late left [bool1|orgate270 no gateblocked|bool0] -> [|orgatep1|]
late left [bool1|orgate270 no gateblocked|bool1] -> [|orgatep1|]
late down [orgatep0|] -> [orgate270|bool0]
late down [orgatep1|] -> [orgate270|bool1]
late down [orgate270|notgate270] -> [norgate270|] sfx1
late left [notgate270|orgate270|notgate270] -> [|nandgate270|] sfx2
(NAND gate)
(0 deg)
[> player|nandgate0] -> [> player|> nandgate0]
[> nandgate0|nandgate0] -> [> nandgate0|> nandgate0]
[> nandgate0|wall] -> [nandgate0|wall]
late down [bool0|nandgate0 no gateblocked|bool0] -> [|nandgatep1|]
late down [bool0|nandgate0 no gateblocked|bool1] -> [|nandgatep1|]
late down [bool1|nandgate0 no gateblocked|bool0] -> [|nandgatep1|]
late down [bool1|nandgate0 no gateblocked|bool1] -> [|nandgatep0|]
late right [nandgatep0|] -> [nandgate0|bool0]
late right [nandgatep1|] -> [nandgate0|bool1]
late right [nandgate0|notgate0] -> [andgate0|] sfx1
late down [notgate0|nandgate0|notgate0] -> [|orgate0|] sfx2
(90 deg)
[> player|nandgate90] -> [> player|> nandgate90]
[> nandgate90|nandgate90] -> [> nandgate90|> nandgate90]
[> nandgate90|wall] -> [nandgate90|wall]
late right [bool0|nandgate90 no gateblocked|bool0] -> [|nandgatep1|]
late right [bool0|nandgate90 no gateblocked|bool1] -> [|nandgatep1|]
late right [bool1|nandgate90 no gateblocked|bool0] -> [|nandgatep1|]
late right [bool1|nandgate90 no gateblocked|bool1] -> [|nandgatep0|]
late up [nandgatep0|] -> [nandgate90|bool0]
late up [nandgatep1|] -> [nandgate90|bool1]
late up [nandgate90|notgate90] -> [andgate90|] sfx1
late right [notgate90|nandgate90|notgate90] -> [|orgate90|] sfx2
(180 deg)
[> player|nandgate180] -> [> player|> nandgate180]
[> nandgate180|nandgate180] -> [> nandgate180|> nandgate180]
[> nandgate180|wall] -> [nandgate180|wall]
late up [bool0|nandgate180 no gateblocked|bool0] -> [|nandgatep1|]
late up [bool0|nandgate180 no gateblocked|bool1] -> [|nandgatep1|]
late up [bool1|nandgate180 no gateblocked|bool0] -> [|nandgatep1|]
late up [bool1|nandgate180 no gateblocked|bool1] -> [|nandgatep0|]
late left [nandgatep0|] -> [nandgate180|bool0]
late left [nandgatep1|] -> [nandgate180|bool1]
late left [nandgate180|notgate180] -> [andgate180|] sfx1
late up [notgate180|nandgate180|notgate180] -> [|orgate180|] sfx2
(270 deg)
[> player|nandgate270] -> [> player|> nandgate270]
[> nandgate270|nandgate270] -> [> nandgate270|> nandgate270]
[> nandgate270|wall] -> [nandgate270|wall]
late left [bool0|nandgate270 no gateblocked|bool0] -> [|nandgatep1|]
late left [bool0|nandgate270 no gateblocked|bool1] -> [|nandgatep1|]
late left [bool1|nandgate270 no gateblocked|bool0] -> [|nandgatep1|]
late left [bool1|nandgate270 no gateblocked|bool1] -> [|nandgatep0|]
late down [nandgatep0|] -> [nandgate270|bool0]
late down [nandgatep1|] -> [nandgate270|bool1]
late down [nandgate270|notgate270] -> [andgate270|] sfx1
late left [notgate270|nandgate270|notgate270] -> [|orgate270|] sfx2
(NOR gate)
(0 deg)
[> player|norgate0] -> [> player|> norgate0]
[> norgate0|norgate0] -> [> norgate0|> norgate0]
[> norgate0|wall] -> [norgate0|wall]
late down [bool0|norgate0 no gateblocked|bool0] -> [|norgatep1|]
late down [bool0|norgate0 no gateblocked|bool1] -> [|norgatep0|]
late down [bool1|norgate0 no gateblocked|bool0] -> [|norgatep0|]
late down [bool1|norgate0 no gateblocked|bool1] -> [|norgatep0|]
late right [norgatep0|] -> [norgate0|bool0]
late right [norgatep1|] -> [norgate0|bool1]
late right [norgate0|notgate0] -> [orgate0|] sfx1
late down [notgate0|norgate0|notgate0] -> [|andgate0|] sfx2
(90 deg)
[> player|norgate90] -> [> player|> norgate90]
[> norgate90|norgate90] -> [> norgate90|> norgate90]
[> norgate90|wall] -> [norgate90|wall]
late right [bool0|norgate90 no gateblocked|bool0] -> [|norgatep1|]
late right [bool0|norgate90 no gateblocked|bool1] -> [|norgatep0|]
late right [bool1|norgate90 no gateblocked|bool0] -> [|norgatep0|]
late right [bool1|norgate90 no gateblocked|bool1] -> [|norgatep0|]
late up [norgatep0|] -> [norgate90|bool0]
late up [norgatep1|] -> [norgate90|bool1]
late up [norgate90|notgate90] -> [orgate90|] sfx1
late right [notgate90|norgate90|notgate90] -> [|andgate90|] sfx2
(180 deg)
[> player|norgate180] -> [> player|> norgate180]
[> norgate180|norgate180] -> [> norgate180|> norgate180]
[> norgate180|wall] -> [norgate180|wall]
late up [bool0|norgate180 no gateblocked|bool0] -> [|norgatep1|]
late up [bool0|norgate180 no gateblocked|bool1] -> [|norgatep0|]
late up [bool1|norgate180 no gateblocked|bool0] -> [|norgatep0|]
late up [bool1|norgate180 no gateblocked|bool1] -> [|norgatep0|]
late left [norgatep0|] -> [norgate180|bool0]
late left [norgatep1|] -> [norgate180|bool1]
late left [norgate180|notgate180] -> [orgate180|] sfx1
late up [notgate180|norgate180|notgate180] -> [|andgate180|] sfx2
(270 deg)
[> player|norgate270] -> [> player|> norgate270]
[> norgate270|norgate270] -> [> norgate270|> norgate270]
[> norgate270|wall] -> [norgate270|wall]
late left [bool0|norgate270 no gateblocked|bool0] -> [|norgatep1|]
late left [bool0|norgate270 no gateblocked|bool1] -> [|norgatep0|]
late left [bool1|norgate270 no gateblocked|bool0] -> [|norgatep0|]
late left [bool1|norgate270 no gateblocked|bool1] -> [|norgatep0|]
late down [norgatep0|] -> [norgate270|bool0]
late down [norgatep1|] -> [norgate270|bool1]
late down [norgate270|notgate270] -> [orgate270|] sfx1
late left [notgate270|norgate270|notgate270] -> [|andgate270|] sfx2
(XOR gate)
(0 deg)
[> player|xorgate0] -> [> player|> xorgate0]
[> xorgate0|xorgate0] -> [> xorgate0|> xorgate0]
[> xorgate0|wall] -> [xorgate0|wall]
late down [bool0|xorgate0 no gateblocked|bool0] -> [|xorgatep0|]
late down [bool0|xorgate0 no gateblocked|bool1] -> [|xorgatep1|]
late down [bool1|xorgate0 no gateblocked|bool0] -> [|xorgatep1|]
late down [bool1|xorgate0 no gateblocked|bool1] -> [|xorgatep0|]
late right [xorgatep0|] -> [xorgate0|bool0]
late right [xorgatep1|] -> [xorgate0|bool1]
late right [xorgate0|notgate0] -> [xnorgate0|] sfx1
(90 deg)
[> player|xorgate90] -> [> player|> xorgate90]
[> xorgate90|xorgate90] -> [> xorgate90|> xorgate90]
[> xorgate90|wall] -> [xorgate90|wall]
late right [bool0|xorgate90 no gateblocked|bool0] -> [|xorgatep0|]
late right [bool0|xorgate90 no gateblocked|bool1] -> [|xorgatep1|]
late right [bool1|xorgate90 no gateblocked|bool0] -> [|xorgatep1|]
late right [bool1|xorgate90 no gateblocked|bool1] -> [|xorgatep0|]
late up [xorgatep0|] -> [xorgate90|bool0]
late up [xorgatep1|] -> [xorgate90|bool1]
late up [xorgate90|notgate90] -> [xnorgate90|] sfx1
(180 deg)
[> player|xorgate180] -> [> player|> xorgate180]
[> xorgate180|xorgate180] -> [> xorgate180|> xorgate180]
[> xorgate180|wall] -> [xorgate180|wall]
late up [bool0|xorgate180 no gateblocked|bool0] -> [|xorgatep0|]
late up [bool0|xorgate180 no gateblocked|bool1] -> [|xorgatep1|]
late up [bool1|xorgate180 no gateblocked|bool0] -> [|xorgatep1|]
late up [bool1|xorgate180 no gateblocked|bool1] -> [|xorgatep0|]
late left [xorgatep0|] -> [xorgate180|bool0]
late left [xorgatep1|] -> [xorgate180|bool1]
late left [xorgate180|notgate180] -> [xnorgate180|] sfx1
(270 deg)
[> player|xorgate270] -> [> player|> xorgate270]
[> xorgate270|xorgate270] -> [> xorgate270|> xorgate270]
[> xorgate270|wall] -> [xorgate270|wall]
late left [bool0|xorgate270 no gateblocked|bool0] -> [|xorgatep0|]
late left [bool0|xorgate270 no gateblocked|bool1] -> [|xorgatep1|]
late left [bool1|xorgate270 no gateblocked|bool0] -> [|xorgatep1|]
late left [bool1|xorgate270 no gateblocked|bool1] -> [|xorgatep0|]
late down [xorgatep0|] -> [xorgate270|bool0]
late down [xorgatep1|] -> [xorgate270|bool1]
late down [xorgate270|notgate270] -> [xnorgate270|] sfx1
(XNOR gate)
(0 deg)
[> player|xnorgate0] -> [> player|> xnorgate0]
[> xnorgate0|xnorgate0] -> [> xnorgate0|> xnorgate0]
[> xnorgate0|wall] -> [xnorgate0|wall]
late down [bool0|xnorgate0 no gateblocked|bool0] -> [|xnorgatep1|]
late down [bool0|xnorgate0 no gateblocked|bool1] -> [|xnorgatep0|]
late down [bool1|xnorgate0 no gateblocked|bool0] -> [|xnorgatep0|]
late down [bool1|xnorgate0 no gateblocked|bool1] -> [|xnorgatep1|]
late right [xnorgatep0|] -> [xnorgate0|bool0]
late right [xnorgatep1|] -> [xnorgate0|bool1]
late right [xnorgate0|notgate0] -> [xorgate0|] sfx1
(90 deg)
[> player|xnorgate90] -> [> player|> xnorgate90]
[> xnorgate90|xnorgate90] -> [> xnorgate90|> xnorgate90]
[> xnorgate90|wall] -> [xnorgate90|wall]
late right [bool0|xnorgate90 no gateblocked|bool0] -> [|xnorgatep1|]
late right [bool0|xnorgate90 no gateblocked|bool1] -> [|xnorgatep0|]
late right [bool1|xnorgate90 no gateblocked|bool0] -> [|xnorgatep0|]
late right [bool1|xnorgate90 no gateblocked|bool1] -> [|xnorgatep1|]
late up [xnorgatep0|] -> [xnorgate90|bool0]
late up [xnorgatep1|] -> [xnorgate90|bool1]
late up [xnorgate90|notgate90] -> [xorgate90|] sfx1
(180 deg)
[> player|xnorgate180] -> [> player|> xnorgate180]
[> xnorgate180|xnorgate180] -> [> xnorgate180|> xnorgate180]
[> xnorgate180|wall] -> [xnorgate180|wall]
late up [bool0|xnorgate180 no gateblocked|bool0] -> [|xnorgatep1|]
late up [bool0|xnorgate180 no gateblocked|bool1] -> [|xnorgatep0|]
late up [bool1|xnorgate180 no gateblocked|bool0] -> [|xnorgatep0|]
late up [bool1|xnorgate180 no gateblocked|bool1] -> [|xnorgatep1|]
late left [xnorgatep0|] -> [xnorgate180|bool0]
late left [xnorgatep1|] -> [xnorgate180|bool1]
late left [xnorgate180|notgate180] -> [xorgate180|] sfx1
(270 deg)
[> player|xnorgate270] -> [> player|> xnorgate270]
[> xnorgate270|xnorgate270] -> [> xnorgate270|> xnorgate270]
[> xnorgate270|wall] -> [xnorgate270|wall]
late left [bool0|xnorgate270 no gateblocked|bool0] -> [|xnorgatep1|]
late left [bool0|xnorgate270 no gateblocked|bool1] -> [|xnorgatep0|]
late left [bool1|xnorgate270 no gateblocked|bool0] -> [|xnorgatep0|]
late left [bool1|xnorgate270 no gateblocked|bool1] -> [|xnorgatep1|]
late down [xnorgatep0|] -> [xnorgate270|bool0]
late down [xnorgatep1|] -> [xnorgate270|bool1]
late down [xnorgate270|notgate270] -> [xorgate270|] sfx1
(splitters)
(vertical)
late [splitterv @] -> [splittervp @]
late up [splittervp|@] -> [splittervp|@ notclone]
late down [splittervp|@] -> [splittervp|@ notclone]
late up [splittervp @|no @] -> [splittervp @|@] sfx0
late down [splittervp @|no @] -> [splittervp @|@] sfx0
late up [notclone|splittervp|notclone] -> [|splitterv|]
late vertical [notclone|splittervp @|@] -> [||@]
late vertical [@|splittervp @|@] -> [@||@]
(horizontal)
late [splitterh @] -> [splitterhp @]
late right [splitterhp|@] -> [splitterhp|@ notclone]
late left [splitterhp|@] -> [splitterhp|@ notclone]
late right [splitterhp @|no @] -> [splitterhp @|@] sfx0
late left [splitterhp @|no @] -> [splitterhp @|@] sfx0
late right [notclone|splitterhp|notclone] -> [|splitterh|]
late horizontal [notclone|splitterhp @|@] -> [||@]
late horizontal [@|splitterhp @|@] -> [@||@]
(fix leftover)
late [splittervp] -> []
late [splitterhp] -> []
late [notclone] -> []
(wall remove)
late [wall @] -> [@]
==============
WINCONDITIONS
==============
all bool0 on goal0
all goal0 on bool0
all bool1 on goal1
all goal1 on bool1
all player on playergoal
all playergoal on player
no splitterv
no splittervp
no splitterh
no splitterhp
=======
LEVELS
=======
section MOVE
message WELCOME
message YOU WILL CONTROL THE OPERATIONS OF THIS COMPUTER
message BUT FIRST YOU NEED TO BE PROGRAMMED
message GET TO YOUR STATION
p.....l
section PUSH
message GOOD JOB
message YOUR ACTIONS ARE MEANINGLESS FOR NOW
message INPUT A 0
...#o...
.p.###..
...0....
.l.#....
...#....
section SEPARATE
message ONE BOOLEAN WAS NOT SO HARD, WAS IT
message TOO BAD EVERYTHING TAKES BILLIONS AND BILLIONS OF INPUTS
message I NEED THREE BOOLEANS FROM YOU
####...o
p000....
###....o
l.......
####...o
section POSITIVE
message ALRIGHT, I WILL DO NOTHING WITH THESE
message IF YOU'RE WONDERING ABOUT THE 0 ON THE BOOLEAN
message HERE'S YOUR ANSWER
..#..###
..0..#i#
p.#..#o#
..1...l.
..#.....
..#.....
section BLOCKED
message IF YOU HAVEN'T NOTICED ALREADY YOU CANNOT PUSH DIFFERENT ONES AT THE SAME TIME
message IF YOU REALLY WANT TO, LOSE HOPE
p#i....l
.110..i.
.00.....
o#o....o
section SORT
message IF AT ANY POINT YOU MESS UP
message JUST HIT THE R KEY, AND WE WILL REPLACE YOU WITH A BETTER YOU
message YEAH, THAT'S HOW A RESET WORKS
message ANYWAYS, SORT THESE BOOLEANS
....pl....
..........
.10100110.
..........
..........
..........
.ooioioii.
section REMOVE
message THESE BOOLEANS GET IN THE WAY SOMETIMES
message GO AHEAD AND REMOVE THEM
p0000.~#
####~1.#
i..~.00.
.#00.~..
l..~..~.
section TERMINATE
message THERE'S SOME PLACES THAT YOU SHOULDN'T ACCESS
message HENCE THE TERMINATORS
p`.....
.`.```0
.`.`l`.
.`.`.~.
...`..o
section INVERT
message OKAY, YOU'RE READY
message CONSTANT BOOLEANS SUCK, SO LETS ACTUALLY COMPUTE STUFF
message NOT\n\nA|O\n-+-\n0|1\n1|0
p......
.2..0i.
.......
......l
section TIMING
message BY THE WAY, AN OBJECT CAN PUSH ANOTHER OBJECT ONLY IF IT IS THE SAME
message THIS MEANS YOU CAN'T HAVE A NOT GATE PUSH A ROTATED NOT GATE
message ALSO, TRY NOT TO BE IN THE WAY OF THE OUTPUT OR YOU WILL BE OVERWRITTEN
##o2.###
##q#z###
p.0.0.lo
##q#z###
##.a.###
section CANCEL
message NOT GATE INVERTS
message BUT A NOT GATE NEXT TO A NOT GATE DOESN'T INVERT
message SO THEY CANCEL EACH OTHER OUT
##~~~~.....
##.2......l
##q~z#~~..~
##1a.~~~..~
#####~~~..~
#####.....~
p2.2.z~...~
#####.~.~~~
#####~~.~~~
####i...~~~
section AND
message WE CAN FINALLY GET TO THE FUN PART
message I'LL START INTRODUCING YOU TO THE REST OF THE GATES
message AND\n\nA|B|O\n-+-+-\n0|0|0\n0|1|0\n1|0|0\n1|1|1
p~#1####
.1#3.###
....3.2i
.0##1###
l~######
section OR
message OR\n\nA|B|O\n-+-+-\n0|0|0\n0|1|1\n1|0|1\n1|1|1
...0.1.##
.d.p.l.`#
...1.1.3o
.s.....`#
...1.0.##
section NAND
message NAND\n\nA|B|O\n-+-+-\n0|0|1\n0|1|1\n1|0|1\n1|1|0
i.o.i
.1.1.
..p..
50.0.
..l..
.1.1.
.....
section NOR
message NOR\n\nA|B|O\n-+-+-\n0|0|1\n0|1|0\n1|0|0\n1|1|0
p.......l
.........
.0.6.f..0
.........
.........
0...#...1
...`b`...
####i####
section NEGATE
message NOT GATES DON'T ONLY INVERT BOOLEANS
message THEY LIKE TO INVERT EVERYTHING THEY CAN
l..~.i#
...~..1
..a~0.g
...~..`
p..~..#
section FLIP
message THE INPUT CAN BE MODIFIED TOO
####.......#
####.......#
#.p#.......#
#.z#...z....
#..#..##.##.
#..#`.#0~1..
#..bz.##.###
#..#`.#lz###
#.....#..i##
#.....######
section MORGAN
message HOPEFULLY I PROGRAMMED YOU ENOUGH SO YOU CAN DO BOTH OPERATIONS
....#####
..2.##o##
..2.#0q1#
p.2.....i
....#1#1#
..3.#####
.....####
####.####
.....####
..2.##i##
..2.#0q1#
l.2.....i
....#1#1#
..4.#####
....#####
section EXCLUSIVE
message XOR AND XNOR, THE FINAL STEP TOWARDS COMPLEXITY
message THIS WON'T BE THAT HARD, IT'S ONLY EXCLUSIVITY
message XOR\n\nA|B|O\n-+-+-\n0|0|1\n0|1|0\n1|0|0\n1|1|1
message XNOR\n\nA|B|O\n-+-+-\n0|0|0\n0|1|1\n1|0|1\n1|1|0
########1#
.....##07o
..0..##3`.
.......`#.
.p.l.####.
.....####.
..2.......
..........
section PARALLEL
message YOU ARE ALMOST READY
message YOU'LL NEED TO WORK EFFICIENTLY, LUCKILY YOU CAN CONTROL MULTIPLE INSTANCES OF YOURSELF AT ONCE
message THIS IS PERFECT FOR WORKING IN PARALLEL
message TRY DOING SO HERE
message HINT:\nYOU'LL NEED TO UTILIZE CONDITIONED MULTI-PUSHING IN ORDER TO DE-SYNC YOUR INSTANCES
~~~~~#~~~~~
~.p.~#~.p.~
~1..~#~1..~
~1.o~#~0.i~
~0..~#~0..~
~.l.~#~.l.~
~~~~~#~~~~~
section CONDITIONED
message UNFORTUNATELY TWO ISN'T ENOUGH TO DO MUCH AT A TIME, SO LETS INCREMENT FURTHER UP
p..~#p..~
.0..#.1..
.00.#.00.
o..l#o..l
#########
````#p..~
````#.1..
````#.01.
````#i..l
section DESYNC
message HERE'S A CHALLENGE
message YOU WILL NEED TO USE SOME LOGIC GATES THIS TIME
message EACH BOX WILL CONTAIN DIFFERENT LOGIC GATES, BUT SOME MAY FUNCTION ENTIRELY THE SAME
.~~~l#.~~~l
.x.c.#.b.z.
..i..#..i..
.0.1.#.1.0.
p.#..#p.#..
###########
.~~~l#.~~~l
.n.c.#.v.x.
..o..#..i..
.0.0.#.1.1.
p.#..#p.#..
section CANCEL
message NOTHING MUCH HERE, JUST GIVE ME 0 FOR ALL OF THEM
~~~~~~~#~~~~~~~
~.000.~#~.001.~
~.....~#~.....~
~p...l~#~p...l~
~.....~#~.....~
~..o..~#~..o..~
~~~~~~~#~~~~~~~
###############
~~~~~~~#~~~~~~~
~.010.~#~.100.~
~.....~#~.....~
~p...l~#~p...l~
~.....~#~.....~
~..o..~#~..o..~
~~~~~~~#~~~~~~~
section COMPACT
message GIVE ME THE MAJORITY OF ALL THE BOOLEANS
~~~~~#~~~~~#~~~~~#~~~~~
~000~#~001~#~010~#~011~
~pol~#~pol~#~pol~#~pil~
~~~~~#~~~~~#~~~~~#~~~~~
#######################
~~~~~#~~~~~#~~~~~#~~~~~
~100~#~101~#~110~#~111~
~pol~#~pil~#~pil~#~pil~
~~~~~#~~~~~#~~~~~#~~~~~
section BREACH
message YOU KNOW HOW LOGIC GATES CAN OVERWRITE YOU
message WELL, THEY CAN ALSO OVERWRITE WALLS
message WHILE THIS MIGHT NOT GET YOU ANYWHERE AT TIMES, IT'S GOOD FOR BREACHING ONE TILE LONG WALLS
message BY THE WAY, YOU WILL NEED TO OVERWRITE YOURSELF HERE
p....i#p....o
......#..131.
.2a11.#..x...
......#..1.1.
......#l.....
#############
1....i#p....o
6.....#......
.1111.#..~~..
......#......
......#......
section SPLIT
message ALRIGHT, THAT'S ENOUGH FOR NOW
message LUCKILY FOR YOU, I'VE ALREADY CONFIRMED MULTIPLE TIMES THAT YOU'RE A SIMPLE PROGRAM AND NOT A HUMAN WHO JUST SO HAPPENS TO BE CONTROLLING THIS JUNK OF BYTES
message SO YOU AREN'T PRONE TO THE MIND-BOGGLING EFFECTS OF PAYING ATTENTION TO MULTIPLE TASKS AT ONCE
message BUT THAT'S BESIDES THE POINT
message HERE'S A SPLITTER
p...##....
....#o...o
..0.%#.$$.
....#o...o
....##...l
section SHIFT
message SPLITTERS FOLLOW THE SAME RULES AS REGULAR GATES, OUTPUT ONLY IF IT ISN'T BLOCKED
message THOUGH YOU DO NEED TO BE CAREFUL, IT DOESN'T SPLIT ONLY IF BOTH OUTPUTS ARE BLOCKED
message HOWEVER YOU CAN USE IT TO SHIFT AN OBJECT AGAINST A WALL WITHOUT CREATING ANOTHER COPY
#``~~~~~
#%..1~i~
`$.~~~.~
......p.
.www....
......l.
section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment