Skip to content

Instantly share code, notes, and snippets.

Created February 20, 2014 18:31
Show Gist options
  • Save anonymous/9120193 to your computer and use it in GitHub Desktop.
Save anonymous/9120193 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 Threes: The Demake
author Benjamin Davis
homepage threesgame.com
again_interval 0.5
background_color #F9F9F9
color_palette arnecolors
flickscreen 11x6
key_repeat_interval 0.25
noaction
noundo
text_color #777E8C
run_rules_on_level_start
========
OBJECTS
========
1
#F9F9F9
000.0
000.0
000.0
000.0
000.0
2
#F9F9F9
....0
000.0
....0
.0000
....0
3
#F9F9F9
....0
000.0
0...0
000.0
....0
4
#F9F9F9
.00.0
.00.0
....0
000.0
000.0
5
#F9F9F9
....0
.0000
....0
000.0
....0
6
#F9F9F9
.0000
.0000
....0
.00.0
....0
7
#F9F9F9
....0
000.0
000.0
000.0
000.0
8
#F9F9F9
....0
.00.0
....0
.00.0
....0
9
#F9F9F9
....0
.00.0
....0
000.0
000.0
0
#F9F9F9
....0
.00.0
.00.0
.00.0
....0
Carry
#F9F9F9
00000
00.00
0...0
00.00
00000
Block1
#65CDFF #5DAAFA
.000.
.000.
.000.
.111.
.....
Block2
#FF6780 #CA4F7B
.000.
.000.
.000.
.111.
.....
Block1Grey
#999999 #666666
.000.
.000.
.000.
.111.
.....
Block2Grey
#666666 #333333
.000.
.000.
.000.
.111.
.....
Block3
White #F8CB66 LightGrey #D8A667
.200.
.000.
.000.
.111.
.....
Block6
White #F8CB66 LightGrey #D8A667
.220.
.000.
.000.
.111.
.....
Block12
White #F8CB66 LightGrey #D8A667
.222.
.000.
.000.
.111.
.....
Block24
White #F8CB66 LightGrey #D8A667
.222.
.200.
.000.
.111.
.....
Block48
White #F8CB66 LightGrey #D8A667
.222.
.220.
.000.
.111.
.....
Block96
White #F8CB66 LightGrey #D8A667
.222.
.222.
.000.
.111.
.....
Block192
White #F8CB66 LightGrey #D8A667
.222.
.222.
.200.
.311.
.....
Block384
White #F8CB66 LightGrey #D8A667
.222.
.222.
.220.
.331.
.....
Block768
White #F8CB66 LightGrey #D8A667
.222.
.222.
.222.
.333.
.....
Scored
#999999
.....
.....
.....
.000.
.....
Scoring
#FF6780 #CA4F7B
.0.0.
.....
.0.0.
.1.1.
.....
Background
#505050 #484848 #414141 #3A3A3A #333333
00000
11111
22222
33333
44444
Grid
#D2E5DF #BBD9D9
00000
01110
01110
01110
00000
Spawn
#D2E5DF
Wall
#F9F9F9
Grey
#999999 #919191 #8A8A8A #838383 #7B7B7B
00000
11111
22222
33333
44444
Player
Black
.....
.....
.....
.....
.....
=======
LEGEND
=======
Block = Block1 or Block2 or Block3 or Block6 or Block12 or Block24 or Block48 or Block96 or Block192 or Block384 or Block768 or Block1Grey or Block2Grey
Lost = Grey
Stopped = Grey
Number = 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 0
. = Grid and Spawn
s = Spawn
# = Wall
+ = Carry
=======
SOUNDS
=======
Player Move 58475507
SFX0 2494907
SFX1 98118707
================
COLLISIONLAYERS
================
Background
Spawn Grey
Grid Carry
Block
Player Number Scored
Wall Scoring
======
RULES
======
( Spawn 9 random 1, 2, 3s at the start )
random [ Grid Spawn no Block ] -> [ Grid Player Block1 ]
random [ Grid Spawn no Block ] -> [ Grid Player Block2 ]
random [ Grid Spawn no Block ] -> [ Grid Player Block3 ]
random [ Grid Spawn no Block ] -> [ Grid Player random Block1 random Block2 random Block3 ]
random [ Grid Spawn no Block ] -> [ Grid Player random Block1 random Block2 random Block3 ]
random [ Grid Spawn no Block ] -> [ Grid Player random Block1 random Block2 random Block3 ]
random [ Grid Spawn no Block ] -> [ Grid Player random Block1 random Block2 random Block3 ]
random [ Grid Spawn no Block ] -> [ Grid Player random Block1 random Block2 random Block3 ]
random [ Grid Spawn no Block ] -> [ Grid Player random Block1 random Block2 random Block3 ]
( Clear Spawns at start )
[ Grid Spawn ] -> [ Grid No Spawn ]
( Move Block when Player moves )
[ Moving Player Stationary Block ] -> [ Moving Player Moving Block ]
( Stop when we hit a Wall )
[ > Block | Wall ] -> [ Block Stopped | Wall ]
startloop
[ > Block1 | Player Stationary Block2 ] -> [ > Block3 | ] SFX0
[ > Block2 | Player Stationary Block1 ] -> [ > Block3 | ] SFX0
[ > Block3 | Player Stationary Block3 ] -> [ > Block6 | ] SFX0
[ > Block6 | Player Stationary Block6 ] -> [ > Block12 | ] SFX0
[ > Block12 | Player Stationary Block12 ] -> [ > Block24 | ] SFX0
[ > Block24 | Player Stationary Block24 ] -> [ > Block48 | ] SFX0
[ > Block48 | Player Stationary Block48 ] -> [ > Block96 | ] SFX0
[ > Block96 | Player Stationary Block96 ] -> [ > Block192 | ] SFX0
[ > Block192 | Player Stationary Block192 ] -> [ > Block384 | ] SFX0
[ > Block384 | Player Stationary Block384 ] -> [ > Block768 | ] SFX0
( Stop when we hit a stationary Block )
[ > Block | Stationary Block ] -> [ action Block | Block ]
[ action Block ] -> [ Block Stopped ]
endloop
( Stop Player when Block stops )
[ Moving Player Stationary Block ] -> [ Stationary Player Stationary Block ]
( Move block from spawn to side )
up random [ up Block ] [ Spawn Block1 ] [ Wall | Grid no Stopped ] -> [ up Block ] [ Spawn ] [ Wall up Block1 up Player | Grid ]
up random [ up Block ] [ Spawn Block2 ] [ Wall | Grid no Stopped ] -> [ up Block ] [ Spawn ] [ Wall up Block2 up Player | Grid ]
up random [ up Block ] [ Spawn Block3 ] [ Wall | Grid no Stopped ] -> [ up Block ] [ Spawn ] [ Wall up Block3 up Player | Grid ]
down random [ down Block ] [ Spawn Block1 ] [ Wall | Grid no Stopped ] -> [ down Block ] [ Spawn ] [ Wall down Block1 down Player | Grid ]
down random [ down Block ] [ Spawn Block2 ] [ Wall | Grid no Stopped ] -> [ down Block ] [ Spawn ] [ Wall down Block2 down Player | Grid ]
down random [ down Block ] [ Spawn Block3 ] [ Wall | Grid no Stopped ] -> [ down Block ] [ Spawn ] [ Wall down Block3 down Player | Grid ]
left random [ left Block ] [ Spawn Block1 ] [ Wall | Grid no Stopped ] -> [ left Block ] [ Spawn ] [ Wall left Block1 left Player | Grid ]
left random [ left Block ] [ Spawn Block2 ] [ Wall | Grid no Stopped ] -> [ left Block ] [ Spawn ] [ Wall left Block2 left Player | Grid ]
left random [ left Block ] [ Spawn Block3 ] [ Wall | Grid no Stopped ] -> [ left Block ] [ Spawn ] [ Wall left Block3 left Player | Grid ]
right random [ right Block ] [ Spawn Block1 ] [ Wall | Grid no Stopped ] -> [ right Block ] [ Spawn ] [ Wall right Block1 right Player | Grid ]
right random [ right Block ] [ Spawn Block2 ] [ Wall | Grid no Stopped ] -> [ right Block ] [ Spawn ] [ Wall right Block2 right Player | Grid ]
right random [ right Block ] [ Spawn Block3 ] [ Wall | Grid no Stopped ] -> [ right Block ] [ Spawn ] [ Wall right Block3 right Player | Grid ]
( Clear "Stopped" markers )
[ Stopped ] -> [ No Stopped ]
( Spawn new block )
[ Wall | Spawn No Block No Number | Wall ] -> [ Wall | Spawn random Block1 random Block2 random Block3 | Wall ]
( Lose condition: All Grids have Blocks on and there are no compatible blocks next to each other [e.g. 1 | 2 or 3 | 3 )
( Set as lost )
Late [ Grid No Lost ] -> [ Grid Lost ]
( Check for conditions which mean it's not lost )
Late [ Lost Grid No Block ] -> [ Grid ]
Late [ Lost Block1 | Block2 ] -> [ Block1 | Block2 ]
Late [ Lost Block3 | Block3 ] -> [ Block3 | Block3 ]
Late [ Lost Block6 | Block6 ] -> [ Block6 | Block6 ]
Late [ Lost Block12 | Block12 ] -> [ Block12 | Block12 ]
Late [ Lost Block24 | Block24 ] -> [ Block24 | Block24 ]
Late [ Lost Block48 | Block48 ] -> [ Block48 | Block48 ]
Late [ Lost Block96 | Block96 ] -> [ Block96 | Block96 ]
Late [ Lost Block192 | Block192 ] -> [ Block192 | Block192 ]
Late [ Lost Block384 | Block384 ] -> [ Block384 | Block384 ]
( If there are any tiles without a Lost, remove all Losts)
Late [ Grid No Lost | Grid Lost ] -> [ Grid | Grid ]
( Remove Block spawn )
Late [ Lost ] [ Wall | Block Spawn | Wall ] -> [ Lost ] [ Wall | Wall | Wall ]
( Move grid )
Late [ Lost Grid Block Player | | | | | | | Spawn ] -> [ Wall | | | | | | | Lost Grid Block Player ]
( Remove Player from Block1 or Block2 )
Late [ Lost Player Block1 ] -> [ Lost Block1 ]
Late [ Lost Player Block2 ] -> [ Lost Block2 ]
( Turn 1s and 2s grey )
Late [ Lost ] [ Block1 ] -> [ Lost ] [ Block1Grey ]
Late [ Lost ] [ Block2 ] -> [ Lost ] [ Block2Grey ]
( Add )
late down [ 1 | ... | 0 ] -> [ 0 | ... | 1 ]
late down [ 2 | ... | 0 ] -> [ 0 | ... | 2 ]
late down [ 3 | ... | 0 ] -> [ 0 | ... | 3 ]
late down [ 4 | ... | 0 ] -> [ 0 | ... | 4 ]
late down [ 5 | ... | 0 ] -> [ 0 | ... | 5 ]
late down [ 6 | ... | 0 ] -> [ 0 | ... | 6 ]
late down [ 7 | ... | 0 ] -> [ 0 | ... | 7 ]
late down [ 8 | ... | 0 ] -> [ 0 | ... | 8 ]
late down [ 9 | ... | 0 ] -> [ 0 | ... | 9 ]
late down [ 1 | ... | 1 ] -> [ 0 | ... | 2 ]
late down [ 2 | ... | 1 ] -> [ 0 | ... | 3 ]
late down [ 3 | ... | 1 ] -> [ 0 | ... | 4 ]
late down [ 4 | ... | 1 ] -> [ 0 | ... | 5 ]
late down [ 5 | ... | 1 ] -> [ 0 | ... | 6 ]
late down [ 6 | ... | 1 ] -> [ 0 | ... | 7 ]
late down [ 7 | ... | 1 ] -> [ 0 | ... | 8 ]
late down [ 8 | ... | 1 ] -> [ 0 | ... | 9 ]
late down [ 9 | ... | 1 ] -> [ 0 | ... | 0 Carry ]
late down [ 1 | ... | 2 ] -> [ 0 | ... | 3 ]
late down [ 2 | ... | 2 ] -> [ 0 | ... | 4 ]
late down [ 3 | ... | 2 ] -> [ 0 | ... | 5 ]
late down [ 4 | ... | 2 ] -> [ 0 | ... | 6 ]
late down [ 5 | ... | 2 ] -> [ 0 | ... | 7 ]
late down [ 6 | ... | 2 ] -> [ 0 | ... | 8 ]
late down [ 7 | ... | 2 ] -> [ 0 | ... | 9 ]
late down [ 8 | ... | 2 ] -> [ 0 | ... | 0 Carry ]
late down [ 9 | ... | 2 ] -> [ 0 | ... | 1 Carry ]
late down [ 1 | ... | 3 ] -> [ 0 | ... | 4 ]
late down [ 2 | ... | 3 ] -> [ 0 | ... | 5 ]
late down [ 3 | ... | 3 ] -> [ 0 | ... | 6 ]
late down [ 4 | ... | 3 ] -> [ 0 | ... | 7 ]
late down [ 5 | ... | 3 ] -> [ 0 | ... | 8 ]
late down [ 6 | ... | 3 ] -> [ 0 | ... | 9 ]
late down [ 7 | ... | 3 ] -> [ 0 | ... | 0 Carry ]
late down [ 8 | ... | 3 ] -> [ 0 | ... | 1 Carry ]
late down [ 9 | ... | 3 ] -> [ 0 | ... | 2 Carry ]
late down [ 1 | ... | 4 ] -> [ 0 | ... | 5 ]
late down [ 2 | ... | 4 ] -> [ 0 | ... | 6 ]
late down [ 3 | ... | 4 ] -> [ 0 | ... | 7 ]
late down [ 4 | ... | 4 ] -> [ 0 | ... | 8 ]
late down [ 5 | ... | 4 ] -> [ 0 | ... | 9 ]
late down [ 6 | ... | 4 ] -> [ 0 | ... | 0 Carry ]
late down [ 7 | ... | 4 ] -> [ 0 | ... | 1 Carry ]
late down [ 8 | ... | 4 ] -> [ 0 | ... | 2 Carry ]
late down [ 9 | ... | 4 ] -> [ 0 | ... | 3 Carry ]
late down [ 1 | ... | 5 ] -> [ 0 | ... | 6 ]
late down [ 2 | ... | 5 ] -> [ 0 | ... | 7 ]
late down [ 3 | ... | 5 ] -> [ 0 | ... | 8 ]
late down [ 4 | ... | 5 ] -> [ 0 | ... | 9 ]
late down [ 5 | ... | 5 ] -> [ 0 | ... | 0 Carry ]
late down [ 6 | ... | 5 ] -> [ 0 | ... | 1 Carry ]
late down [ 7 | ... | 5 ] -> [ 0 | ... | 2 Carry ]
late down [ 8 | ... | 5 ] -> [ 0 | ... | 3 Carry ]
late down [ 9 | ... | 5 ] -> [ 0 | ... | 4 Carry ]
late down [ 1 | ... | 6 ] -> [ 0 | ... | 7 ]
late down [ 2 | ... | 6 ] -> [ 0 | ... | 8 ]
late down [ 3 | ... | 6 ] -> [ 0 | ... | 9 ]
late down [ 4 | ... | 6 ] -> [ 0 | ... | 0 Carry ]
late down [ 5 | ... | 6 ] -> [ 0 | ... | 1 Carry ]
late down [ 6 | ... | 6 ] -> [ 0 | ... | 2 Carry ]
late down [ 7 | ... | 6 ] -> [ 0 | ... | 3 Carry ]
late down [ 8 | ... | 6 ] -> [ 0 | ... | 4 Carry ]
late down [ 9 | ... | 6 ] -> [ 0 | ... | 5 Carry ]
late down [ 1 | ... | 7 ] -> [ 0 | ... | 8 ]
late down [ 2 | ... | 7 ] -> [ 0 | ... | 9 ]
late down [ 3 | ... | 7 ] -> [ 0 | ... | 0 Carry ]
late down [ 4 | ... | 7 ] -> [ 0 | ... | 1 Carry ]
late down [ 5 | ... | 7 ] -> [ 0 | ... | 2 Carry ]
late down [ 6 | ... | 7 ] -> [ 0 | ... | 3 Carry ]
late down [ 7 | ... | 7 ] -> [ 0 | ... | 4 Carry ]
late down [ 8 | ... | 7 ] -> [ 0 | ... | 5 Carry ]
late down [ 9 | ... | 7 ] -> [ 0 | ... | 6 Carry ]
late down [ 1 | ... | 8 ] -> [ 0 | ... | 9 ]
late down [ 2 | ... | 8 ] -> [ 0 | ... | 0 Carry ]
late down [ 3 | ... | 8 ] -> [ 0 | ... | 1 Carry ]
late down [ 4 | ... | 8 ] -> [ 0 | ... | 2 Carry ]
late down [ 5 | ... | 8 ] -> [ 0 | ... | 3 Carry ]
late down [ 6 | ... | 8 ] -> [ 0 | ... | 4 Carry ]
late down [ 7 | ... | 8 ] -> [ 0 | ... | 5 Carry ]
late down [ 8 | ... | 8 ] -> [ 0 | ... | 6 Carry ]
late down [ 9 | ... | 8 ] -> [ 0 | ... | 7 Carry ]
late down [ 1 | ... | 9 ] -> [ 0 | ... | 0 Carry ]
late down [ 2 | ... | 9 ] -> [ 0 | ... | 1 Carry ]
late down [ 3 | ... | 9 ] -> [ 0 | ... | 2 Carry ]
late down [ 4 | ... | 9 ] -> [ 0 | ... | 3 Carry ]
late down [ 5 | ... | 9 ] -> [ 0 | ... | 4 Carry ]
late down [ 6 | ... | 9 ] -> [ 0 | ... | 5 Carry ]
late down [ 7 | ... | 9 ] -> [ 0 | ... | 6 Carry ]
late down [ 8 | ... | 9 ] -> [ 0 | ... | 7 Carry ]
late down [ 9 | ... | 9 ] -> [ 0 | ... | 8 Carry ]
( Carry )
startloop
late right [ no Number | ... | 0 | Number Carry ] -> [ | ... | 1 | Number ]
late right [ no Number | ... | 1 | Number Carry ] -> [ | ... | 2 | Number ]
late right [ no Number | ... | 2 | Number Carry ] -> [ | ... | 3 | Number ]
late right [ no Number | ... | 3 | Number Carry ] -> [ | ... | 4 | Number ]
late right [ no Number | ... | 4 | Number Carry ] -> [ | ... | 5 | Number ]
late right [ no Number | ... | 5 | Number Carry ] -> [ | ... | 6 | Number ]
late right [ no Number | ... | 6 | Number Carry ] -> [ | ... | 7 | Number ]
late right [ no Number | ... | 7 | Number Carry ] -> [ | ... | 8 | Number ]
late right [ no Number | ... | 8 | Number Carry ] -> [ | ... | 9 | Number ]
late right [ no Number | ... | 9 no Carry | Number Carry ] -> [ | ... | 0 Carry | Number ]
late right [ no Number | 0 Carry ] -> [ | 0 ]
endloop
( After scoring, set block border to grey )
late [ Scoring Block ] -> [ Scored Block ]
( Count each block, starting with the lowest value )
late [ Carry No Number No Block ] [ Grid Lost Player Block3 ] -> [ Carry Block3 ] [ Grid Lost Scoring Block3 ]
late [ Carry No Number No Block ] [ Grid Lost Player Block6 ] -> [ Carry Block6 ] [ Grid Lost Scoring Block6 ]
late [ Carry No Number No Block ] [ Grid Lost Player Block12 ] -> [ Carry Block12 ] [ Grid Lost Scoring Block12 ]
late [ Carry No Number No Block ] [ Grid Lost Player Block24 ] -> [ Carry Block24 ] [ Grid Lost Scoring Block24 ]
late [ Carry No Number No Block ] [ Grid Lost Player Block48 ] -> [ Carry Block48 ] [ Grid Lost Scoring Block48 ]
late [ Carry No Number No Block ] [ Grid Lost Player Block96 ] -> [ Carry Block96 ] [ Grid Lost Scoring Block96 ]
late [ Carry No Number No Block ] [ Grid Lost Player Block192 ] -> [ Carry Block192 ] [ Grid Lost Scoring Block192 ]
late [ Carry No Number No Block ] [ Grid Lost Player Block384 ] -> [ Carry Block384 ] [ Grid Lost Scoring Block384 ]
late [ Carry No Number No Block ] [ Grid Lost Player Block768 ] -> [ Carry Block768 ] [ Grid Lost Scoring Block768 ]
( Set score to add )
late right [ Carry Block3 | 0 | 0 | 0 | 0 | 0 ] -> [ Carry Block3 | 0 | 0 | 0 | 0 | 3 ] again
late right [ Carry Block6 | 0 | 0 | 0 | 0 | 0 ] -> [ Carry Block6 | 0 | 0 | 0 | 0 | 9 ] again
late right [ Carry Block12 | 0 | 0 | 0 | 0 | 0 ] -> [ Carry Block12 | 0 | 0 | 0 | 2 | 7 ] again
late right [ Carry Block24 | 0 | 0 | 0 | 0 | 0 ] -> [ Carry Block24 | 0 | 0 | 0 | 8 | 1 ] again
late right [ Carry Block48 | 0 | 0 | 0 | 0 | 0 ] -> [ Carry Block48 | 0 | 0 | 2 | 4 | 3 ] again
late right [ Carry Block96 | 0 | 0 | 0 | 0 | 0 ] -> [ Carry Block96 | 0 | 0 | 7 | 2 | 9 ] again
late right [ Carry Block192 | 0 | 0 | 0 | 0 | 0 ] -> [ Carry Block192 | 0 | 2 | 1 | 8 | 7 ] again
late right [ Carry Block384 | 0 | 0 | 0 | 0 | 0 ] -> [ Carry Block384 | 0 | 6 | 5 | 6 | 1 ] again
late right [ Carry Block768 | 0 | 0 | 0 | 0 | 0 ] -> [ Carry Block768 | 1 | 9 | 6 | 8 | 3 ] again
( Colour adding row of numbers )
late right [ Carry no Number | ... | Number ] -> [ Carry Grey | ... | Number Grey ]
( Show numbers )
Late [ Wall Number ] -> [ Number ]
( Show only significant digits for the adding line )
late right [ Carry No Number | 0 | 0 | 0 | 0 | 0 ] -> [ Carry Wall | 0 Wall | 0 Wall | 0 Wall | 0 Wall | 0 Wall ]
late right [ Carry No Number | 0 | 0 | 0 | 0 ] -> [ Carry No Wall | 0 Wall | 0 Wall | 0 Wall | 0 Wall ]
late right [ Carry No Number | 0 | 0 | 0 ] -> [ Carry No Wall | 0 Wall | 0 Wall | 0 Wall ]
late right [ Carry No Number | 0 | 0 ] -> [ Carry No Wall | 0 Wall | 0 Wall ]
late right [ Carry No Number | 0 ] -> [ Carry No Wall | 0 Wall ]
late right [ Carry No Block ] -> [ Carry Wall ]
( Remove block we're scoring from adding row )
late [ Carry Block ] -> [ Carry Player ]
==============
WINCONDITIONS
==============
=======
LEVELS
=======
######################
##s#....###ssss#######
####....###ssss#+00000
####....###ssss#######
####....###ssss#000000
######################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment