Skip to content

Instantly share code, notes, and snippets.

Created March 11, 2014 03:49
Show Gist options
  • Save anonymous/9479176 to your computer and use it in GitHub Desktop.
Save anonymous/9479176 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 Gobble Rush!
author Mark Richardson
again_interval 0.05
require_player_movement
run_rules_on_level_start
========
OBJECTS
========
Background
Black
Exit
White Black
01010
10101
01010
10101
01010
Wall
Brown
Player
Pink Blue Brown Red DarkBlue
.222.
.101.
33333
.444.
44.44
Enemy
LightBrown
.....
0..0.
.00..
0000.
0..0.
LoS
White
.....
.....
.....
.....
.....
Alert
Red
....0
....0
.....
....0
.....
MoveU
White
.....
.....
.....
.....
.....
MoveD
White
.....
.....
.....
.....
.....
MoveL
White
.....
.....
.....
.....
.....
MoveR
White
.....
.....
.....
.....
.....
CanMove
White
.....
.....
.....
.....
.....
=======
LEGEND
=======
. = Background
X = Exit
# = Wall
P = Player
E = Enemy
Move = MoveU or MoveD or MoveL or MoveR
Obstacle = Wall or Enemy
=======
SOUNDS
=======
SFX0 97542903 (enemy alerted)
Player Destroy 41368102 (player eaten)
Enemy Create 81259707 (enemy moving)
EndLevel 22595303
================
COLLISIONLAYERS
================
Background
Exit
Wall, Player, Enemy
LoS, Alert, Move
CanMove
======
RULES
======
(Tell alert enemies to move)
up [ Enemy Alert | ... | Player ] -> [ Enemy MoveU | ... | Player ]
down [ Enemy Alert | ... | Player ] -> [ Enemy MoveD | ... | Player ]
left [ Enemy Alert | ... | Player ] -> [ Enemy MoveL | ... | Player ]
right [ Enemy Alert | ... | Player ] -> [ Enemy MoveR | ... | Player ]
(Prime enemies)
[ Enemy Move ] -> [ Enemy CanMove Move ]
(Stop enemies)
late up [ Enemy CanMove MoveU | Obstacle no Move ] -> [ Enemy | Obstacle ]
late down [ Enemy CanMove MoveD | Obstacle no Move ] -> [ Enemy | Obstacle ]
late left [ Enemy CanMove MoveL | Obstacle no Move ] -> [ Enemy | Obstacle ]
late right [ Enemy CanMove MoveR | Obstacle no Move ] -> [ Enemy | Obstacle ]
late down [ Enemy CanMove MoveD | Enemy CanMove MoveU ] -> [ Enemy | Enemy ]
late right [ Enemy CanMove MoveR | Enemy CanMove MoveL ] -> [ Enemy | Enemy ]
(Move enemies)
late up [ Enemy CanMove MoveU | no Obstacle ] -> [ | Enemy MoveU ] again
late down [ Enemy CanMove MoveD | no Obstacle ] -> [ | Enemy MoveD ] again
late left [ Enemy CanMove MoveL | no Obstacle ] -> [ | Enemy MoveL ] again
late right [ Enemy CanMove MoveR | no Obstacle ] -> [ | Enemy MoveR ] again
late [ Enemy CanMove ] -> [ Enemy ]
(Create line of sight)
late [ Player | no Wall no Move no LoS ] -> [ Player | LoS ]
late [ Move ] [ LoS ] -> [ Move ] [ ]
late [ Player | ... | LoS | no Wall no LoS ] -> [ Player | ... | LoS | LoS ]
(Alert enemies)
late [ Enemy LoS | ... | Player ] -> [ Enemy Alert | ... | Player ] SFX0
late [ LoS ] -> [ ]
==============
WINCONDITIONS
==============
some Exit on Player
no Alert
no Move
=======
LEVELS
=======
#####..
#X..#..
#...###
#E....#
###...#
..#..P#
..#####
#######
#P....#
#.....#
#####.#
#EX...#
###...#
..#####
#######
#.....#
#..#..#
#.....#
#.P##E#
#..#XE#
#######
#######
#.....#
#.E...#
#.E...#
#.E...#
#XE.P.#
#######
#######
#..#.X#
#..E..#
##.#E##
#.....#
#P.#..#
#######
#######
#X...P#
##.#..#
#...#.#
#.....#
#.E#.E#
#######
######.
#P.#.##
#.X..E#
##.#..#
#.....#
##..E.#
.######
.####..
##..##.
#.P..##
#..X.E#
##...##
.##E##.
..###..
#######
#XE...#
#EE..##
#..P..#
#.....#
#.#...#
#######
#######
#P..#X#
#.....#
##....#
#.....#
#E..#E#
#######
(
#######
#.....#
#.....#
#.....#
#.....#
#.....#
#######
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment