Skip to content

Instantly share code, notes, and snippets.

Created December 9, 2014 01:54
Show Gist options
  • Save anonymous/f4255395782430e9589e to your computer and use it in GitHub Desktop.
Save anonymous/f4255395782430e9589e 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 Play with the cat
author Alan Hazelden
homepage www.draknek.org
run_rules_on_level_start
realtime_interval 0.1
again_interval 0.75
(verbose_logging)
========
OBJECTS
========
Background
White White
11111
01111
11101
11111
10111
Wall
BROWN DARKBROWN
00010
11111
01000
11111
00010
PlayerNormal
#a46422 #493c2b #000000
..0..
.111.
01110
02220
.2.2.
PlayerHoldL
#a46422 #493c2b #000000 LightGrey Red
..0..
.111.
3400.
0222.
.2.2.
PlayerHoldR
#a46422 #493c2b #000000 LightGrey Red
..0..
.111.
01110
0222.
.2.2.
PlayerHoldU
#a46422 #493c2b #000000 LightGrey Red
..00..
.110.
0111.
0222.
.2.2.
PlayerHoldD
#a46422 #493c2b #000000 LightGrey Red
..0..
.111.
0110.
0242.
.232.
Dog1Left
DarkBrown
.00..
000.0
.000.
.0.0.
.....
Dog2Left
DarkBrown
.00..
000..
.0000
.0.0.
.....
Dog1Right
DarkBrown
..00.
0.000
.000.
.0.0.
.....
Dog2Right
DarkBrown
..00.
..000
0000.
.0.0.
.....
CatStill
Orange
0.0..
000.0
.0000
.000.
.....
(
orange #124f0f
0.0..
101..
000.0
000.0
0000.
)
(
Darkblue Darkgrey
0....
0.0.0
00101
00000
0...0
)
CatLeft
Orange
0.0..
000.0
.0000
.000.
.....
CatDown
Orange
0.0..
000.0
.0000
.000.
.....
CatRight
Orange
..0.0
0.000
0000.
.000.
.....
CatUp
Orange
..0.0
0.000
0000.
.000.
.....
Light
#2c2c2c
..0..
..0..
..0..
.....
.....
LightTop
#2c2c2c
00...
..0..
..0..
..0..
..0..
LightLeft
#2c2c2c
....0
...0.
..000
.....
.....
Poop
Brown
.....
.....
..0..
.000.
.....
TinselUp
LightGrey Red
..1..
..0..
..1..
.....
.....
TinselDown
LightGrey Red
.....
.....
..1..
..0..
..1..
TinselUpDown
LightGrey Red
..1..
..0..
..1..
..0..
..1..
TinselLeft
LightGrey Red
.....
.....
101..
.....
.....
TinselRight
LightGrey Red
.....
.....
..101
.....
.....
TinselLeftRight
LightGrey Red
.....
.....
10101
.....
.....
TinselStart
LightGrey Red
.....
.101.
...0.
.101.
.....
Darkness
Black
LightOnTopLeft
Yellow Orange DarkGrey Black
33332
33323
33222
33000
33000
LightOnTopRight
Yellow Orange DarkGrey Black
22333
33233
33233
33233
33233
LightOnBottomLeft
Yellow #e8d257 DarkGrey Black
30000
31111
11111
11111
31111
LightOnBottomRight
Yellow #e8d257 DarkGrey Black
03233
13233
11233
11333
13333
Footsteps
#f2f2f2
.....
...0.
.....
.0...
.....
TreeTop
Brown #1f762c Green
.....
..2..
.222.
22122
.111.
TreeTopTinsel
Brown #1f762c Green Red LightGrey
.....
..2..
.342.
22134
.341.
Tree
Brown #1f762c Green
11011
..0..
.000.
.....
.....
TreeTinsel
Brown #1f762c Green Red
31011
..0..
.000.
.....
.....
Pooped1
transparent
Pooped2
transparent
Fleeing
transparent
NextToPlayer
transparent
Chasing
transparent
Winning
transparent
Winning2
transparent
LOS
transparent
CatStillMarker1
transparent
CatStillMarker2
transparent
CatStillMarker3
transparent
PlayCounter
transparent
=======
LEGEND
=======
1 = Wall and PlayCounter
0 = Wall
. = Background
# = Wall
P = PlayerNormal
D = Dog1Left
L = Light
C = CatStill and CatStillMarker3
- = TinselStart
T = TreeTinsel
Cat = CatLeft or CatRight or CatUp or CatDown or CatStill
Dog = Dog1Left or Dog2Left or Dog1Right or Dog2Right
Pooped = Pooped1 or Pooped2
TinselLR = TinselLeft or TinselRight or TinselLeftRight
TinselUD = TinselUp or TinselDown or TinselUpDown
Tinsel = TinselLR or TinselUD or TinselStart
PlayerHold = PlayerHoldL or PlayerHoldR or PlayerHoldU or PlayerHoldD
Player = PlayerNormal or PlayerHold
CatStillMarker = CatStillMarker1 or CatStillMarker2 or CatStillMarker3
Night = LightOnTopLeft or LightOnTopRight or LightOnBottomLeft or LightOnBottomRight or Darkness
BlocksCat = Wall or Light or Player or Dog or Poop
BlocksSight = Wall or Tree
=======
SOUNDS
=======
sfx0 75423508 (poop)
sfx1 74660902 (bark)
Player Move 41624307 (move)
sfx2 18287507 (pick up Tinsel)
(CatStillMarker1 Destroy 9542309)
sfx3 92366509 (poke cat)
CatStillMarker3 Destroy 52806309
================
COLLISIONLAYERS
================
Pooped, Fleeing, Winning, Winning2, CatStillMarker
NextToPlayer, Chasing
Background
Footsteps
Poop, TinselLR
TinselUD, TinselStart
Player, Wall, Dog, Cat, Light, Tree, TreeTinsel
LOS
LightTop, LightLeft, TreeTop, TreeTopTinsel
Night, PlayCounter
======
RULES
======
(init)
down [ no LightTop | Light ] -> [ LightTop | Light ]
right [ no LightLeft | LightTop ] -> [ LightLeft | LightTop ]
late down [ no TreeTop | Tree ] -> [ TreeTop | Tree ]
late down [ no TreeTopTinsel | TreeTinsel ] -> [ TreeTopTinsel | TreeTinsel ]
[ Dog | Player ] -> [ Dog NextToPlayer | Player ]
(Winning)
[ Player ] -> [ Player Winning ]
[ Player ] [ no Wall no PlayCounter ] -> [ Player no Winning ] []
[ Winning ] -> win
([ Winning2 ] -> win
[ Winning ] -> [ Winning2 ]
late [ TreeTopTinsel no Winning2 ] -> [ TreeTopTinsel Winning ]
late [ Winning2 ] [ LightLeft ] -> [ Winning2 ] [ LightLeft LightOnTopLeft ]
late [ Winning2 ] [ LightTop ] -> [ Winning2 ] [ LightLeft LightOnTopRight ]
late [ Winning2 ] [ Light ] -> [ Winning2 ] [ Light LightOnBottomRight ]
late right [ Winning2 ] [ no LightOnBottomLeft | LightOnBottomRight ] -> [ Winning2 ] [ LightOnBottomLeft | LightOnBottomRight ]
late [ Winning2 ] [ no Night ] -> [ Winning2 ] [ Darkness ]
late [ Winning ] -> again
late [ Winning2 ] -> again)
(animation)
[ stationary Player ] [ stationary Dog1Left Pooped ] -> [ Player ] [ action Dog2Left Pooped ]
[ stationary Player ] [ stationary Dog2Left Pooped ] -> [ Player ] [ action Dog1Left Pooped ]
[ stationary Player ] [ stationary Dog1Right Pooped ] -> [ Player ] [ action Dog2Right Pooped ]
[ stationary Player ] [ stationary Dog2Right Pooped ] -> [ Player ] [ action Dog1Right Pooped ]
(cat)
[ stationary Player ] [ CatLeft ] -> [ Player ] [ left CatLeft ]
[ stationary Player ] [ CatRight ] -> [ Player ] [ right CatRight ]
[ stationary Player ] [ CatDown ] -> [ Player ] [ down CatDown ]
[ stationary Player ] [ CatUp ] -> [ Player ] [ up CatUp ]
[ Cat | ... | Dog ] -> [ Cat | ... | Dog < LOS ]
[ > LOS no Cat | no BlocksSight ] -> [ | > LOS ]
[ > LOS Cat ] -> [ > Cat Fleeing ]
[ LOS ] -> []
random [ > Cat Fleeing | BlocksCat ] -> [ v Cat Fleeing | BlocksCat ]
random [ > Cat Fleeing | BlocksCat ] -> [ < Cat Fleeing | BlocksCat ]
horizontal [ BlocksCat | > CatLeft Fleeing | BlocksCat ] -> [ BlocksCat | CatRight Fleeing | BlocksCat ]
horizontal [ BlocksCat | > CatRight Fleeing | BlocksCat ] -> [ BlocksCat | CatLeft Fleeing | BlocksCat ]
[ Cat no Fleeing | ... | Tinsel no TinselStart ] -> [ Cat | ... | Tinsel < LOS ]
[ > LOS no Cat | no BlocksSight ] -> [ | > LOS ]
[ > LOS Cat ] -> [ LOS < Cat ]
[ left Cat ] -> [ left CatLeft ]
[ right Cat ] -> [ right CatRight ]
[ down Cat ] -> [ down CatDown ]
[ up Cat ] -> [ up CatUp ]
[ Cat LOS no Fleeing ] -> [ stationary Cat LOS ]
[ Cat LOS no Fleeing no CatStillMarker ] -> [ stationary Cat CatStillMarker3 ]
[ LOS ] -> []
([ > Cat Fleeing | Player | no BlocksCat ] -> [ | Player | CatStill ]
[ BlocksCat | < Cat Fleeing | Player | no BlocksCat ] -> [ BlocksCat | | Player | CatStill ])
[ > Cat | BlocksCat ] -> [ Cat CatStillMarker3 | BlocksCat ]
random late [ CatStillMarker no Cat ] [ no Wall no PlayCounter ] -> [ CatStillMarker ] [ PlayCounter ]
late [ CatStillMarker no Cat ] -> []
([ > Player | stationary Cat ] -> [ CatStill | Player ])
[ > Player | Cat ] -> sfx3
[ Fleeing ] -> []
(dog)
[ Dog | ... | Cat ] -> [ Dog | ... | Cat < LOS ]
[ > LOS no Dog | no BlocksSight ] -> [ | > LOS ]
[ > LOS Dog Chasing ] -> [ < Dog1Left ]
[ Chasing ] -> []
[ LOS stationary Dog no NextToPlayer no Chasing ] -> [ Dog Chasing ]
[ LOS ] -> []
[ left Dog ] -> [ left Dog1Left ]
[ right Dog ] -> [ right Dog1Left ]
[ > Player | Poop ] -> [ Player | Poop ]
[ > Player | Pooped ] -> [ Player | Pooped ]
[ Pooped1 | Player ] -> [ action Pooped1 | Player ]
[ stationary Pooped1 ] -> [ Pooped2 ]
[ Dog no Pooped | Light ] -> [ Dog Pooped1 | Light ]
([ Dog no Pooped | Poop ] -> [ Dog Pooped1 | Poop ])
[ Dog Pooped1 ] -> [ action Dog Pooped1 ]
[ stationary Dog Pooped | moving Player ] -> [ > Dog1Left Pooped | moving Player ]
[ stationary Dog | moving Player ] -> [ > Dog | moving Player ]
late right [ Dog1Left | Player ] -> [ Dog1Right | Player ]
late left [ Dog1Right | Player ] -> [ Dog1Left | Player ]
[ > Dog | < Player ] -> [ Player | Dog ]
late [ Pooped no Dog ] -> [ Poop ]
[ NextToPlayer ] -> []
(Tinsel)
[ > PlayerHold | Tree ] -> [ action PlayerNormal | TreeTinsel ]
[ > Player | TreeTinsel ] -> [ PlayerHoldD TinselStart | Tree ]
[ action Player | Tinsel ] -> [ action Player | ]
[ action Player ] -> [ Player no Tinsel ]
[ moving Player Tinsel ] -> [ moving Player Tinsel NextToPlayer ]
[ Tinsel no TinselStart | moving Player ] -> [ Tinsel | moving Player TinselUp NextToPlayer ]
late [ Player NextToPlayer ] -> [ Player ]
late left [ Tinsel NextToPlayer | Player ] -> [ TinselLeft NextToPlayer | PlayerHoldR ]
late right [ Tinsel NextToPlayer | Player ] -> [ TinselRight NextToPlayer | PlayerHoldL ]
late up [ Tinsel NextToPlayer | Player ] -> [ TinselUp NextToPlayer | PlayerHoldD ]
late down [ Tinsel NextToPlayer | Player ] -> [ TinselDown NextToPlayer | PlayerHoldU ]
late horizontal [ TinselLR NextToPlayer | Tinsel no Player ] -> [ TinselLeftRight | no Tinsel ]
late vertical [ TinselUD NextToPlayer | Tinsel no Player ] -> [ TinselUpDown | no Tinsel ]
late left [ TinselUD NextToPlayer | Tinsel ] -> [ TinselUD TinselLeft | no Tinsel ]
late right [ TinselUD NextToPlayer | Tinsel ] -> [ TinselUD TinselRight | no Tinsel ]
late up [ TinselLR NextToPlayer | Tinsel ] -> [ TinselLR TinselUp | no Tinsel ]
late down [ TinselLR NextToPlayer | Tinsel ] -> [ TinselLR TinselDown | no Tinsel ]
[ > Player | TinselStart no Cat no Dog ] -> sfx2
(late [ Tinsel no NextToPlayer no TinselStart no Player ] -> [])
late [ Player Tinsel no TinselStart ] -> [ Player ]
(cleanup)
late [ NextToPlayer ] -> []
late [ Player no Footsteps ] -> [ Player Footsteps ]
late [ Cat no Footsteps ] -> [ Cat Footsteps ]
late [ Dog no Footsteps ] -> [ Dog Footsteps ]
==============
WINCONDITIONS
==============
=======
LEVELS
=======
#########
#..p..###
#.#...###
#.#.....#
#.#.t.#.#
#.#c..#.#
#.....#.#
#...l...#
#########
message Well done you played with the cat
message You are the best at playing
message Game over
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment