Created
June 18, 2023 23:37
-
-
Save octoConnors/51fa66c6b62146e65d57e734387c44da to your computer and use it in GitHub Desktop.
Snake (PuzzleScript Script)
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 Snake | |
author Connorses | |
homepage www.puzzlescript.net | |
======== | |
OBJECTS | |
======== | |
background | |
black | |
player | |
green darkgrey yellow | |
00000 | |
00000 | |
21012 | |
00000 | |
00000 | |
snakeDead | |
white darkgrey | |
00000 | |
10001 | |
01010 | |
10001 | |
00000 | |
snakeU | |
green | |
(white | |
..0.. | |
.000. | |
0.0.0 | |
..0.. | |
..0..) | |
snakeD | |
green | |
(white | |
..0.. | |
..0.. | |
0.0.0 | |
.000. | |
..0..) | |
snakeL | |
green | |
(white | |
..0.. | |
.0... | |
00000 | |
.0... | |
..0..) | |
snakeR | |
green | |
(white | |
..0.. | |
...0. | |
00000 | |
...0. | |
..0..) | |
wall | |
white | |
food | |
red | |
spawn | |
transparent | |
======= | |
LEGEND | |
======= | |
. = background | |
# = wall | |
p = player | |
snake = player or snakeU or snakeD or snakeL or snakeR or snakedead | |
snakeBody = snakeU or snakeD or snakeL or snakeR | |
f = food | |
solid = snake or wall | |
======= | |
SOUNDS | |
======= | |
================ | |
COLLISIONLAYERS | |
================ | |
background | |
food, spawn | |
wall, snakeBody | |
player, snakedead | |
====== | |
RULES | |
====== | |
up [> player|food] -> [snakeU|player spawn] | |
down [> player|food] -> [snakeD|player spawn] | |
left [> player|food] -> [snakeL|player spawn] | |
right [> player|food] -> [snakeR|player spawn] | |
up [stationary snakeU|up snake] -> [up snakeU|up snake] | |
+ up [stationary snakeU|left snake] -> [> snakeL|left snake] | |
+ up [stationary snakeU|right snake] -> [> snakeR|right snake] | |
+ down [stationary snakeD|down snake] -> [down snakeD|down snake] | |
+ down [stationary snakeD|left snake] -> [> snakeL|left snake] | |
+ down [stationary snakeD|right snake] -> [> snakeR|right snake] | |
+ left [stationary snakeL|left snake] -> [left snakeL|left snake] | |
+ left [stationary snakeL|up snake] -> [> snakeU|up snake] | |
+ left [stationary snakeL|down snake] -> [> snakeD| down snake] | |
+ right [stationary snakeR|right snake] -> [right snakeR|right snake] | |
+ right [stationary snakeR|up snake] -> [> snakeU| up snake] | |
+ right [stationary snakeR|down snake] -> [> snakeD|down snake] | |
random [spawn] [no food no solid] -> [ ] [food] | |
late [player solid] -> [snakeDead solid] | |
============== | |
WINCONDITIONS | |
============== | |
======= | |
LEVELS | |
======= | |
########## | |
#........# | |
#.....f..# | |
#........# | |
#........# | |
#...p....# | |
#........# | |
#........# | |
#........# | |
########## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment