Skip to content

Instantly share code, notes, and snippets.

Created January 27, 2018 09:04
Show Gist options
  • Save anonymous/efefea20d0606d5387c239d6c7dffe36 to your computer and use it in GitHub Desktop.
Save anonymous/efefea20d0606d5387c239d6c7dffe36 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 Hack the Net
author Alan Hazelden
homepage www.draknek.org
background_color #222
run_rules_on_level_start
(verbose_logging)
again_interval 0.06
noaction
========
OBJECTS
========
Background
black
failure
red
Node
white
Line
green
.....
.....
..0..
.....
.....
LineL
green
.....
.....
00...
.....
.....
LineR
green
.....
.....
...00
.....
.....
LineU
green
..0..
..0..
.....
.....
.....
LineD
green
.....
.....
.....
..0..
..0..
OneWayL
green
..0..
.00..
000..
.00..
..0..
OneWayR
green
..0..
..00.
..000
..00.
..0..
OneWayU
green
..0..
.000.
00000
.....
.....
OneWayD
green
.....
.....
00000
.000.
..0..
Player
Blue
.....
.000.
.000.
.000.
.....
Target
blue
00000
0...0
0...0
0...0
00000
Firewall
red
..0..
..0..
00000
..0..
..0..
=======
LEGEND
=======
. = Background
@ = Player and Node
* = Node
- = Line
L = OneWayL and Line
R = OneWayR and Line
U = OneWayU and Line
D = OneWayD and Line
! = Firewall and Line
$ = Target and Node
% = Target and Player and Node
LineDir = LineL or LineR or LineU or LineD
ConnectableTo = Line or Node
ConnectsL = LineL or OneWayL
ConnectsR = LineR or OneWayR
ConnectsU = LineU or OneWayU
ConnectsD = LineD or OneWayD
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
failure
Node, Line
Firewall, Target
ConnectsL
ConnectsR
ConnectsU
ConnectsD
Player
======
RULES
======
(detect failure)
[ failure ] -> restart
[ background ] -> [ background failure ]
[ Player ] [ failure ] -> [ Player ] []
(auto movement)
[ Player Firewall ] -> [ Firewall ]
[ stationary Player Line ] -> [ action Player Line ] again
left [ action Player ConnectsL | ] -> [ action Player ConnectsL | Player no ConnectsR ]
right [ action Player ConnectsR | ] -> [ action Player ConnectsR | Player no ConnectsL ]
up [ action Player ConnectsU | ] -> [ action Player ConnectsU | Player no ConnectsD ]
down [ action Player ConnectsD | ] -> [ action Player ConnectsD | Player no ConnectsU ]
[ action Player ] -> []
(player input)
[ > Player | no ConnectableTo ] -> [ Player | ]
left [ > Player | OneWayR ] -> [ Player | OneWayR ]
right [ > Player | OneWayL ] -> [ Player | OneWayL ]
up [ > Player | OneWayD ] -> [ Player | OneWayD ]
down [ > Player | OneWayU ] -> [ Player | OneWayU ]
left [ > Player Node | ConnectsR ] -> [ Node | Player ] again
right [ > Player Node | ConnectsL ] -> [ Node | Player ] again
up [ > Player Node | ConnectsD ] -> [ Node | Player ] again
down [ > Player Node | ConnectsU ] -> [ Node | Player ] again
(fix up lines)
left [ Line no Player no OneWayL | ConnectableTo no OneWayR ] -> [ Line LineL | ConnectableTo ]
right [ Line no Player no OneWayR | ConnectableTo no OneWayL ] -> [ Line LineR | ConnectableTo ]
up [ Line no Player no OneWayU | ConnectableTo no OneWayD ] -> [ Line LineU | ConnectableTo ]
down [ Line no Player no OneWayD | ConnectableTo no OneWayU ] -> [ Line LineD | ConnectableTo ]
==============
WINCONDITIONS
==============
all target on player
all player on target
some target
=======
LEVELS
=======
..........
...-*----.
...-..-.-.
.@--..*.*.
......-.-.
......---.
....$..-..
....---*..
..........
..........
..........
....--*-..
....-.-...
..@--.$-..
....-.....
....*-$...
....-.....
..........
..........
....@.....
....-.....
..*---$...
..-...-...
..-...-...
..*---*...
..........
..........
...........
.....@.....
.....-.....
...*---*...
.---...---.
.-...*...-.
.$--.-.--$.
.-.--$--.-.
.-.......-.
.---------.
...........
..........
.@-$---$-.
.-.-....-.
.---...--.
..-....-..
..-$...$..
...-----..
..........
........
....---.
..--$.-.
.%-.-.$-
..--$-..
...-.-..
...---..
........
..........
.......-..
..---*r$..
..-..-....
.@-..*r$-.
..-..-....
..---*r$..
.......-..
..........
............
........-...
...@----*--.
.---.-..-.-.
.-...-r--.$.
.-..*..-..-.
.--.-.--....
..-----.....
............
...........
.....--%...
.....-.....
...--$--...
..--.-.-...
..-..d.-...
..*----*-..
..-.....-..
..---$---..
.....-.....
...$--.....
...........
...........
...---*---.
...-.....-.
...-$---$-.
......u....
..--*---*..
..-.-...-..
[email protected]..
..-........
.---.......
.-.-.......
.*-*.......
...........
message Thanks for playing :)
(...........
.--@.......
.-.........
.-.--$--...
.$--...--$.
...-----...
.....-.....
.....$.....
...........)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment