Skip to content

Instantly share code, notes, and snippets.

Created March 30, 2015 01:48
Show Gist options
  • Save anonymous/963e9583aba612a80c5e to your computer and use it in GitHub Desktop.
Save anonymous/963e9583aba612a80c5e 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 Tetrobot Demake
author Alan Hazelden
homepage www.draknek.org
verbose_logging
again_interval 0.05
========
OBJECTS
========
Background
#d6d78b
Wall
#293021 #272e1e #2a2f21 #2a2d25 #2a2d26
01224
01014
02434
20341
23033
PlayerNormal
White DarkBlue Blue
.000.
00000
00100
00000
.000.
PlayerSucking
White DarkBlue Blue
.000.
00000
01110
00000
.000.
Wood
Brown DarkBrown
00000
01110
01110
01110
00000
Mesh
Grey LightGrey
10001
0...0
0...0
0...0
10001
SuckRay
LightBlue
.....
.....
..0..
.....
.....
ItemSlot
Black
00000
00000
00000
00000
00000
ActiveItem
Red
00.00
0...0
.....
0...0
00.00
ActiveItemHidden
DarkRed
0...0
.....
.....
.....
0...0
L
transparent
R
transparent
U
transparent
D
transparent
OnFloor
transparent
=======
LEGEND
=======
. = Background
# = Wall
P = PlayerNormal
* = Wood
@ = Mesh
? = ItemSlot
! = ItemSlot and ActiveItemHidden
Player = PlayerNormal or PlayerSucking
Item = Wood
Solid = Item or Wood or Player or Mesh or Wall
Direction = L or R or U or D
=======
SOUNDS
=======
Wood MOVE 36772507
================
COLLISIONLAYERS
================
Background
ItemSlot, SuckRay, OnFloor
Player, Wall, Wood
Mesh
ActiveItem, ActiveItemHidden, Direction
======
RULES
======
(toggle state)
[ action Player ] [ ActiveItemHidden ] -> [ PlayerSucking ] [ ActiveItem ]
[ action Player ] [ ActiveItem ] -> [ PlayerNormal ] [ ActiveItemHidden ]
(momentum)
[ L ] -> [ left L ]
[ R ] -> [ right R ]
[ D ] -> [ down D ]
[ > Direction Item no SuckRay | no Solid ] -> [ | Direction Item ]
[ > Direction Item no SuckRay | Solid ] -> [ Item | Solid ]
(throwing/sucking begin)
[ moving Player ] [ ActiveItem ] -> [ Player ] [ moving ActiveItem ]
(throwing)
left [ left ActiveItem Item ] [ Player | no Solid ] -> [ ActiveItemHidden ] [ PlayerNormal | left L Item ]
right [ right ActiveItem Item ] [ Player | no Solid ] -> [ ActiveItemHidden ] [ PlayerNormal | right R Item ]
(start sucking)
left [ left ActiveItem no Item ] [ Player ] -> [ ActiveItemHidden ] [ PlayerNormal left L SuckRay ]
right [ right ActiveItem no Item ] [ Player ] -> [ ActiveItemHidden ] [ PlayerNormal right R SuckRay ]
(continue sucking)
left [ > Direction SuckRay no Item | Item ] -> [ SuckRay | R SuckRay Item ]
right [ > Direction SuckRay no Item | Item ] -> [ SuckRay | L SuckRay Item ]
[ > Direction SuckRay no Item | no Solid no SuckRay ] -> [ SuckRay | Direction SuckRay ]
[ > Direction SuckRay no Item | Mesh no SuckRay ] -> [ SuckRay | Mesh Direction SuckRay ]
[ > Direction SuckRay Item | Player ] [ ActiveItemHidden ] -> [ | PlayerNormal no SuckRay ] [ ActiveItemHidden Item ]
[ > Direction SuckRay no Item | Player ] -> [ | PlayerNormal no SuckRay ]
[ > Direction SuckRay Item | SuckRay ] -> [ | Direction SuckRay Item ]
[ > Direction SuckRay | SuckRay ] -> [ | Direction SuckRay ]
[ > Direction SuckRay Player | Solid no Item ] -> [ PlayerNormal | Solid ]
left [ > Direction SuckRay no Item | Solid no Item ] -> [ R SuckRay | Solid ]
right [ > Direction SuckRay no Item | Solid no Item ] -> [ L SuckRay | Solid ]
(throwing/sucking cleanup)
[ > ActiveItem | no ItemSlot ] -> cancel
(throwing/sucking end)
(gravity)
startloop
down [ Item no SuckRay no Direction | Wall ] -> [ OnFloor Item | Wall ]
down [ Item no SuckRay no Direction | OnFloor ] -> [ OnFloor Item | OnFloor ]
[ Wood OnFloor | Wood no OnFloor no SuckRay ] -> [ Wood OnFloor | Wood OnFloor ]
[ Item Direction OnFloor ] -> [ Item OnFloor ]
[ Item no SuckRay no OnFloor no ItemSlot no Direction ] -> [ D Item ]
endloop
[ OnFloor ] -> []
[ moving Direction ] -> [ Direction ]
[ Direction ] -> again
[ > Player | Mesh ] -> cancel
==============
WINCONDITIONS
==============
=======
LEVELS
=======
!#############
?######**#####
?######*######
?#.....*.....#
?#.p.##*.....#
?#...##......#
#######.######
##############
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment