Created
January 28, 2018 01:45
-
-
Save anonymous/4e310d326cc7396598fdd3305b81b13e to your computer and use it in GitHub Desktop.
title
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 Animal Friends | |
author doggo garden | |
homepage doggo.garden | |
run_rules_on_level_start | |
(verbose_logging) | |
======== | |
OBJECTS | |
======== | |
Background | |
Brown | |
Wall | |
White | |
Water | |
Blue | |
Player | |
Transparent | |
0...0 | |
..... | |
..... | |
..... | |
0...0 | |
SnakeHeadD ╻ | |
DarkGreen | |
..... | |
..... | |
.00.. | |
.00.. | |
.00.. | |
SnakeHeadU ╹ | |
DarkGreen | |
.00.. | |
.00.. | |
..... | |
..... | |
..... | |
SnakeHeadR ╺ | |
DarkGreen | |
..... | |
..000 | |
..000 | |
..... | |
..... | |
SnakeHeadL ╸ | |
DarkGreen | |
..... | |
00... | |
00... | |
..... | |
..... | |
SnakeBodyUD ┃ | |
DarkGreen | |
.00.. | |
.00.. | |
.00.. | |
.00.. | |
.00.. | |
SnakeBodyLR ━ | |
DarkGreen | |
..... | |
00000 | |
00000 | |
..... | |
..... | |
SnakeBodyDL ┓ | |
DarkGreen | |
..... | |
00... | |
000.. | |
.00.. | |
.00.. | |
SnakeBodyDR ┏ | |
DarkGreen | |
..... | |
..000 | |
.0000 | |
.00.. | |
.00.. | |
SnakeBodyUL ┛ | |
DarkGreen | |
.00.. | |
000.. | |
00... | |
..... | |
..... | |
SnakeBodyUR ┗ | |
DarkGreen | |
.00.. | |
.0000 | |
..000 | |
..... | |
..... | |
SnakeTailD ╷ | |
DarkGreen | |
..... | |
..... | |
..... | |
.0... | |
.00.. | |
SnakeTailU ╵ | |
DarkGreen | |
.00.. | |
..0.. | |
..... | |
..... | |
..... | |
SnakeTailR ╶ | |
DarkGreen | |
..... | |
....0 | |
...00 | |
..... | |
..... | |
SnakeTailL ╴ | |
DarkGreen | |
..... | |
00... | |
0.... | |
..... | |
..... | |
======= | |
LEGEND | |
======= | |
SnakeHead = SnakeHeadU or SnakeHeadD or SnakeHeadL or SnakeHeadR | |
SnakeBody = SnakeBodyUD or SnakeBodyLR or SnakeBodyDL or SnakeBodyDR or SnakeBodyUL or SnakeBodyUR | |
SnakeTail = SnakeTailU or SnakeTailD or SnakeTailL or SnakeTailR | |
SnakeBodyU = SnakeBodyUD or SnakeBodyUL or SnakeBodyUR | |
SnakeBodyD = SnakeBodyUD or SnakeBodyDL or SnakeBodyDR | |
SnakeBodyL = SnakeBodyLR or SnakeBodyUL or SnakeBodyDL | |
SnakeBodyR = SnakeBodyLR or SnakeBodyUR or SnakeBodyDR | |
SnakeU = SnakeHeadU or SnakeBodyU | |
SnakeD = SnakeHeadD or SnakeBodyD | |
SnakeL = SnakeHeadL or SnakeBodyL | |
SnakeR = SnakeHeadR or SnakeBodyR | |
Snake = SnakeHead or SnakeBody or SnakeTail | |
Obstacle = SnakeBody or Wall | |
. = Background | |
_ = Water | |
# = Wall | |
P = Player | |
======= | |
SOUNDS | |
======= | |
================ | |
COLLISIONLAYERS | |
================ | |
Background | |
Water | |
SnakeTail | |
SnakeBody | |
SnakeHead Wall | |
Player | |
====== | |
RULES | |
====== | |
( Create player initially ) | |
[ SnakeHead no Player ] -> [ SnakeHead Player ] | |
( Player moves the snake under it ) | |
[ orthogonal Player SnakeHead ] -> [ orthogonal Player orthogonal SnakeHead ] | |
( Can't move back on itself ) | |
up [ > SnakeHeadU ] -> [ SnakeHeadU ] | |
down [ > SnakeHeadD ] -> [ SnakeHeadD ] | |
left [ > SnakeHeadL ] -> [ SnakeHeadL ] | |
right [ > SnakeHeadR ] -> [ SnakeHeadR ] | |
( Stop when moving into obstacle ) | |
[ > SnakeHead | Obstacle ] -> [ SnakeHead | Obstacle ] | |
( Stop when moving into water and not supported by enough land ) | |
[ > SnakeHead Background Water ] [ SnakeBody no Water ] -> [ > SnakeHead action Background Water ] [ SnakeBody ] | |
[ > SnakeHead stationary Background Water ] -> [ SnakeHead Background Water ] | |
[ action Background ] -> [ Background ] | |
( Stop player when snake not moving ) | |
[ > Player stationary SnakeHead ] -> [ Player SnakeHead ] | |
( Body follows head ) | |
up [ orthogonal SnakeU | stationary SnakeBodyD ] -> [ orthogonal SnakeU | < SnakeBodyD ] | |
+ down [ orthogonal SnakeD | stationary SnakeBodyU ] -> [ orthogonal SnakeD | < SnakeBodyU ] | |
+ left [ orthogonal SnakeL | stationary SnakeBodyR ] -> [ orthogonal SnakeL | < SnakeBodyR ] | |
+ right [ orthogonal SnakeR | stationary SnakeBodyL ] -> [ orthogonal SnakeR | < SnakeBodyL ] | |
( Tail follows body ) | |
up [ orthogonal SnakeU | stationary SnakeTailD ] -> [ orthogonal SnakeU | < SnakeTailD ] | |
down [ orthogonal SnakeD | stationary SnakeTailU ] -> [ orthogonal SnakeD | < SnakeTailU ] | |
left [ orthogonal SnakeL | stationary SnakeTailR ] -> [ orthogonal SnakeL | < SnakeTailR ] | |
right [ orthogonal SnakeR | stationary SnakeTailL ] -> [ orthogonal SnakeR | < SnakeTailL ] | |
( Reorient head ) | |
up [ > SnakeHead ] -> [ > SnakeHeadD ] | |
down [ > SnakeHead ] -> [ > SnakeHeadU ] | |
left [ > SnakeHead ] -> [ > SnakeHeadR ] | |
right [ > SnakeHead ] -> [ > SnakeHeadL ] | |
( Reorient body ) | |
up [ < Snake | < SnakeBodyD stationary Background ] -> [ < Snake | < SnakeBodyUD action Background ] | |
up [ v Snake | < SnakeBodyD stationary Background ] -> [ v Snake | < SnakeBodyUR action Background ] | |
up [ ^ Snake | < SnakeBodyD stationary Background ] -> [ ^ Snake | < SnakeBodyUL action Background ] | |
down [ < Snake | < SnakeBodyU stationary Background ] -> [ < Snake | < SnakeBodyUD action Background ] | |
down [ v Snake | < SnakeBodyU stationary Background ] -> [ v Snake | < SnakeBodyDL action Background ] | |
down [ ^ Snake | < SnakeBodyU stationary Background ] -> [ ^ Snake | < SnakeBodyDR action Background ] | |
left [ < Snake | < SnakeBodyR stationary Background ] -> [ < Snake | < SnakeBodyLR action Background ] | |
left [ v Snake | < SnakeBodyR stationary Background ] -> [ v Snake | < SnakeBodyUL action Background ] | |
left [ ^ Snake | < SnakeBodyR stationary Background ] -> [ ^ Snake | < SnakeBodyDL action Background ] | |
right [ < Snake | < SnakeBodyL stationary Background ] -> [ < Snake | < SnakeBodyLR action Background ] | |
right [ v Snake | < SnakeBodyL stationary Background ] -> [ v Snake | < SnakeBodyDR action Background ] | |
right [ ^ Snake | < SnakeBodyL stationary Background ] -> [ ^ Snake | < SnakeBodyUR action Background ] | |
( Reorient tail ) | |
[ up Snake | < SnakeTail stationary Background ] -> [ up Snake | < SnakeTailU action Background ] | |
[ down Snake | < SnakeTail stationary Background ] -> [ down Snake | < SnakeTailD action Background ] | |
[ left Snake | < SnakeTail stationary Background ] -> [ left Snake | < SnakeTailL action Background ] | |
[ right Snake | < SnakeTail stationary Background ] -> [ right Snake | < SnakeTailR action Background ] | |
[ action Background ] -> [ Background ] | |
============== | |
WINCONDITIONS | |
============== | |
======= | |
LEVELS | |
======= | |
............. | |
.....#######. | |
.....#.....#. | |
....##...._#. | |
...##._____#. | |
.###┏╴_____#. | |
.#..┃_____.#. | |
.#..╹._....#. | |
.#.........#. | |
.###########. | |
............. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment