-
-
Save raggy/36d432103bad741a06656bc23e9858c2 to your computer and use it in GitHub Desktop.
Animal Friends
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 | |
(verbose_logging) | |
======== | |
OBJECTS | |
======== | |
Background | |
Brown | |
Wall | |
White | |
Water | |
Blue | |
Food | |
Red LightRed | |
..... | |
.01.. | |
.00.. | |
..... | |
..... | |
Player | |
Transparent | |
0...0 | |
..... | |
..... | |
..... | |
0...0 | |
SnakeHeadD ╻ | |
DarkGreen DarkBlue | |
..... | |
..... | |
.10.. | |
.10.. | |
.10.. | |
SnakeHeadU ╹ | |
DarkGreen DarkBlue | |
.10.. | |
.11.. | |
..... | |
..... | |
..... | |
SnakeHeadR ╺ | |
DarkGreen DarkBlue | |
..... | |
..000 | |
..111 | |
..... | |
..... | |
SnakeHeadL ╸ | |
DarkGreen DarkBlue | |
..... | |
00... | |
11... | |
..... | |
..... | |
SnakeBodyUD ┃ | |
DarkGreen DarkBlue | |
.10.. | |
.10.. | |
.10.. | |
.10.. | |
.10.. | |
SnakeBodyLR ━ | |
DarkGreen DarkBlue | |
..... | |
00000 | |
11111 | |
..... | |
..... | |
SnakeBodyDL ┓ | |
DarkGreen DarkBlue | |
..... | |
00... | |
110.. | |
.10.. | |
.10.. | |
SnakeBodyDR ┏ | |
DarkGreen DarkBlue | |
..... | |
..000 | |
.1011 | |
.10.. | |
.10.. | |
SnakeBodyUL ┛ | |
DarkGreen DarkBlue | |
.10.. | |
000.. | |
11... | |
..... | |
..... | |
SnakeBodyUR ┗ | |
DarkGreen DarkBlue | |
.10.. | |
.1000 | |
..111 | |
..... | |
..... | |
SnakeTailD ╷ | |
DarkGreen DarkBlue | |
..... | |
..... | |
..... | |
.1... | |
.10.. | |
SnakeTailU ╵ | |
DarkGreen DarkBlue | |
.10.. | |
..1.. | |
..... | |
..... | |
..... | |
SnakeTailR ╶ | |
DarkGreen DarkBlue | |
..... | |
....0 | |
...11 | |
..... | |
..... | |
SnakeTailL ╴ | |
DarkGreen DarkBlue | |
..... | |
01... | |
1.... | |
..... | |
..... | |
======= | |
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 | |
o = Food | |
======= | |
SOUNDS | |
======= | |
================ | |
COLLISIONLAYERS | |
================ | |
Background | |
Water | |
SnakeTail Food | |
SnakeHead SnakeBody Wall | |
Player | |
====== | |
RULES | |
====== | |
( Create player initially ) | |
[ SnakeHead no Player ] -> [ SnakeHead Player ] | |
( Player moves the snake under it ) | |
[ moving Player SnakeHead ] -> [ moving Player moving 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 ] | |
( Grow when eating ) | |
up [ > SnakeHeadD | Food ] -> [ SnakeBodyUD | SnakeHeadD ] | |
up [ > SnakeHeadL | Food ] -> [ SnakeBodyUL | SnakeHeadD ] | |
up [ > SnakeHeadR | Food ] -> [ SnakeBodyUR | SnakeHeadD ] | |
down [ > SnakeHeadU | Food ] -> [ SnakeBodyUD | SnakeHeadU ] | |
down [ > SnakeHeadL | Food ] -> [ SnakeBodyDL | SnakeHeadU ] | |
down [ > SnakeHeadR | Food ] -> [ SnakeBodyDR | SnakeHeadU ] | |
left [ > SnakeHeadR | Food ] -> [ SnakeBodyLR | SnakeHeadR ] | |
left [ > SnakeHeadU | Food ] -> [ SnakeBodyUL | SnakeHeadR ] | |
left [ > SnakeHeadD | Food ] -> [ SnakeBodyDL | SnakeHeadR ] | |
right [ > SnakeHeadL | Food ] -> [ SnakeBodyLR | SnakeHeadL ] | |
right [ > SnakeHeadU | Food ] -> [ SnakeBodyUR | SnakeHeadL ] | |
right [ > SnakeHeadD | Food ] -> [ SnakeBodyDR | SnakeHeadL ] | |
( Shrink when pooing ) | |
( 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