Skip to content

Instantly share code, notes, and snippets.

@bregehr
Created September 23, 2021 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bregehr/e15d12369c9b56c084af41d9d1de5ecd to your computer and use it in GitHub Desktop.
Save bregehr/e15d12369c9b56c084af41d9d1de5ecd to your computer and use it in GitHub Desktop.
Alphaline (Puzzlescript+ Script)
Play this game by pasting the script in https://auroriax.github.io/PuzzleScript/editor.html
title Alphaline
author bregehr
homepage www.puzzlescript.net
sprite_size 7
run_rules_on_level_start
mouse_left lmb
mouse_drag drag
background_color #383838
(mechanics)
(cover up all dotted tiles)
(cannot move into slime twice in a row)
(once moved into oil, must move at least more into oil before leaving)
(walls like alcazar)
(white and black segregation)
(number shows amount of neighboring cells occupied by the line)
(hole/zero-g makes you travel in a straight line until stopped by normal ground)
(pushable blocks)
(cover up all 1 dot cells, then two, then three ect. a more restricted cover up.)
(ADD LINE EXIT to win level, for more interesting puzzles.)
(white and black embedded into blocks)
(white and black blocks, period.)
(tiles that turn into a wall when left, meaning you cannot push blocks into your line.)
(blocks of the same color glue together when pushed together)
(blocks or pieces of blocks can be nailed down so they cannot move. black and white are this by default.)
========
OBJECTS
========
lmb
transparent
drag
yellow
Background
#787878 #666666
1111111
1000001
1000001
1000001
1000001
1000001
1111111
bg1
#858585
bg2
#8f8f8f
player
transparent
Wall
#545454
lineUP
#d4d4d4
.......
.......
.......
...0...
...0...
...0...
...0...
lineDOWN
#d4d4d4
...0...
...0...
...0...
...0...
.......
.......
.......
lineLEFT
#d4d4d4
.......
.......
.......
...0000
.......
.......
.......
lineRIGHT
#d4d4d4
.......
.......
.......
0000...
.......
.......
.......
lineStart
#d4d4d4 #e3e3e3 #c2c2c2
..111..
.10000.
1000002
1000002
1000002
.00002.
..222..
lineEnd
#ffffff
.......
.......
..000..
..000..
..000..
.......
.......
cover
#317394
.......
.......
..000..
..0.0..
..000..
.......
.......
red
#db1438 #fc2b51 #ba0929
1111111
1000002
1000002
1000002
1000002
1000002
1222222
redgoal
#9e001c50
used
transparent
visualUsed
#00000040
levelstart
transparent
test
transparent
test2
transparent
exit
#d4d4d4 #c2c2c2 #a19191
.00100.
0001000
0022200
1122211
0022200
0001000
.00100.
white
#ebebeb #f7f7f7 #d1d1d1
1111111
1000002
1000002
1000002
1000002
1000002
1222222
black
#333333 #525252 #2b2b2b
1111110
1000002
1000002
1000002
1000002
1000002
0222222
together
#63636350
.......
...0...
...0...
.00000.
...0...
...0...
.......
failedx
#e00000
.......
.0...0.
..0.0..
...0...
..0.0..
.0...0.
.......
nailed
#03030360
.......
.......
.......
...0...
.......
.......
.......
regionUp
#ffe1d630 #ffe1d615
0000000
.......
.......
.......
.......
.......
.......
regionDown
#ffe1d630 #ffe1d615
.......
.......
.......
.......
.......
.......
0000000
regionLeft
#ffe1d630 #ffe1d615
0......
0......
0......
0......
0......
0......
0......
regionRight
#ffe1d630 #ffe1d615
......0
......0
......0
......0
......0
......0
......0
colorCheckFlag
transparent
showinfo
transparent
blackTogetherTest
transparent
whiteTogetherTest
transparent
=======
LEGEND
=======
. = Background
# = Wall
P = player
S = lineStart and lineEnd and levelstart and bg1 and player
, = cover
e = exit
r = red
q = red and cover
o = red and nailed
t = redgoal
u = white
w = white and nailed
i = black
b = black and nailed
z = white and together
x = black and together
n = white and together and nailed
m = black and together and nailed
region = regionUp or regionDown or regionLeft or regionRight
color = white or black
line = lineStart or lineUP or lineDOWN or lineLEFT or lineRIGHT
stop = used or wall or lineStart
blockgoal = redgoal
block = red or white or black
=======
SOUNDS
=======
lineEnd create 83423304
================
COLLISIONLAYERS
================
Background
player
bg1, bg2
Wall
exit
blockgoal
block
cover
together
nailed
lineUP
lineDOWN
lineLEFT
lineRIGHT
used
visualUsed
lineEnd
lineStart
regionUp
regionDown
regionLeft
regionRight
failedx
lmb, drag
levelstart
test
test2
colorCheckFlag
showinfo
blackTogetherTest
whiteTogetherTest
======
RULES
======
(START SETUP)
(Checkerboard)
startloop
[levelstart][bg1 | no bg1 no bg2] -> [levelstart][bg1 | bg2]
[levelstart][bg2 | no bg1 no bg2] -> [levelstart][bg2 | bg1]
endloop
[levelstart] -> []
[ lmb ] -> [ ]
[ > player] -> cancel
(show/hide extra information)
[ action player no showinfo ] -> [ player showinfo ]
[ action player showinfo ] -> [ player ]
(for movement and other rules like blocks)
[ lineEnd | drag no stop ] -> [ > lineEnd | drag ]
(insert collisions and rigidbodies here, end movement will be erased after.)
[ > lineEnd | stationary block ] -> [ > lineEnd | > block ]
(rigidbody and collisions)
startloop
[ > block | stationary block ] -> [ > block | > block ]
[ moving red | stationary red ] -> [ moving red | moving red ]
[ moving white | stationary white ] -> [ moving white | moving white ]
[ moving black | stationary black ] -> [ moving black | moving black ]
endloop
(keep modifiers on blocks when moved)
[ > block together ] -> [ > block > together ]
(wall stopping and nail stopping)
[ > block | wall ] -> cancel
[ > block nailed ] -> cancel
(line creation)
right [ > lineEnd no lineleft | drag no stop ] -> [ lineleft | lineEnd lineright drag ]
left [ > lineEnd no lineright | drag no stop ] -> [ lineright | lineEnd lineleft drag ]
up [ > lineEnd no linedown | drag no stop ] -> [ linedown | lineEnd lineup drag ]
down [ > lineEnd no lineup | drag no stop ] -> [ lineup | lineEnd linedown drag ]
[ drag ] -> [ ]
(line used)
[used] -> []
[line no used] -> [line used]
(line used VISUAL)
late [ visualUsed ] -> []
late [ showinfo ][ used no block ] -> [ showinfo ][ used visualUsed ]
(testing if white finds black)
late [ lineEnd exit ][ white ][ black ][ lineStart ] -> [ lineEnd exit ][ white ][ black ][ lineStart colorCheckFlag ]
(test spreading from white)
===============
late [ colorCheckFlag ][ white no test ] -> [ colorCheckFlag ][ white test ]
startloop
late [ colorCheckFlag ][ test | no used no wall ] -> [ colorCheckFlag ][ test | test ]
late [ colorCheckFlag ][ test | color used no test ] -> [ colorCheckFlag ][ test | color used test ]
endloop
===============
(test spreading from black)
===============
late [ colorCheckFlag ][ black no test2 ] -> [ colorCheckFlag ][ black test2 ]
startloop
late [ colorCheckFlag ][ test2 | no used no wall ] -> [ colorCheckFlag ][ test2 | test2 ]
late [ colorCheckFlag ][ test2 | color used no test ] -> [ colorCheckFlag ][ test2 | color used test2 ]
endloop
===============
late [failedx] -> []
(U failed)
late [ test black ][colorCheckFlag] -> [ test black ][]
(U win)
late [ colorCheckFlag ][ color ] -> [ colorCheckFlag ][ color colorCheckFlag ]
late [ test no test2 ] -> []
late [ test2 no test ] -> []
late [ test test2 color ] -> [ test test2 color failedx ]
(Together testing)
late [blackTogetherTest] -> []
late [whiteTogetherTest] -> []
random late [ black together no blackTogetherTest ] -> [ black together blackTogetherTest ]
random late [ white together no whiteTogetherTest ] -> [ white together whiteTogetherTest ]
startloop
late [ blackTogetherTest | no used no wall ] -> [ blackTogetherTest | blackTogetherTest ]
late [ whiteTogetherTest | no used no wall ] -> [ whiteTogetherTest | whiteTogetherTest ]
late [ blackTogetherTest | color used no blackTogetherTest ] -> [ blackTogetherTest | color used blackTogetherTest ]
late [ whiteTogetherTest | color used no whiteTogetherTest ] -> [ whiteTogetherTest | color used whiteTogetherTest ]
endloop
late [ black blackTogetherTest ][ black no blackTogetherTest ] -> [ black blackTogetherTest failedx ][ black failedx ]
late [ white whiteTogetherTest ][ white no whiteTogetherTest ] -> [ white whiteTogetherTest failedx ][ white failedx ]
(Visual regions)
late [region] -> []
late right [ showinfo ][ no used no wall | stop ] -> [ showinfo ][ regionRight | stop ]
late left [ showinfo ][ no used no wall | stop ] -> [ showinfo ][ regionLeft | stop ]
late up [ showinfo ][ no used no wall | stop ] -> [ showinfo ][ regionUp | stop ]
late down [ showinfo ][ no used no wall | stop ] -> [ showinfo ][ regionDown | stop ]
(
COLOR MECHANIC EXPLAINED
Used tiles divide the grid into sections.
In each section, there may not be white and black.
Tiles with white and black that are ALSO USED are considered a region tile, ie they become part of the region they
are next to. In other words, colors under a line allow for the flow of a region, if you imagine each region as a lake.
)
==============
WINCONDITIONS
==============
all cover on used
all exit on lineEnd
all redgoal on red
all color on colorCheckFlag
no failedx
=======
LEVELS
=======
(
Section ideas:
Pry red from wall
Seperate stuck together white and black
Basic segregation
)
(Pull red block from wall)
###########
#sttt.ttt.#
#...t.t...#
#...t.t...#
#.........#
#.rrr.rrr.#
#...r.r...#
#...r.r...#
###########
###########
#sttt.ttt.#
#..t...t..#
#..t...t..#
#.........#
#.rrr.rrr.#
#..r...r..#
#..r...r..#
###########
###########
#sttt.ttt.#
#..t....t.#
#..t....t.#
#.........#
#.rrr.rrr.#
#..r....r.#
#..r....r.#
###########
##########
####tt...#
####.tt..#
####tt...#
#s.......#
#........#
#...rr...#
#....rr..#
#e..rr####
##########
#########
#et.....#
#.t.....#
#.tr....#
#..r....#
#..r....#
####....#
####...s#
#########
#########
#s......#
#.......#
#..rtr..#
#...t...#
#..rtr..#
#.......#
#.......#
#########
###########
#...ttt...#
#.........#
#..r.r.r..#
#s........#
#..r.r.r..#
#.........#
#...ttt...#
###########
##########
#......s##
#.......e#
#tr......#
#tr......#
#ttrr....#
#####....#
##########
##########
###########
#####q#####
#.........#
#..r...r..#
#......r..#
#s........#
###########
###########
#####q#####
#.........#
#..r...r..#
#..r...r..#
#s........#
###########
==========
(testing)
###########
#####q#####
#.........#
#.........#
#....r....#
#...rr....#
#s...rr...#
###########
###########
#####q#####
#.........#
#.........#
#.....r...#
#...rrr...#
#s...r....#
###########
===========
#######
#s....#
#.....#
#.b.w.#
#.....#
#....e#
#######
#########
#s......#
#..b.w..#
#.......#
#..b.w..#
#......e#
#########
#########
###.....#
##b...#.#
#s...w#e#
##b...#.#
###.....#
#########
#######
#s....#
#...b.#
#..w..#
#.b...#
#....e#
#######
#########
#...b...#
#.......#
#s.w.w.e#
#.......#
#...b...#
#########
#######
#bbbbb#
#.....#
#..e..#
#.....#
#.....#
#..s..#
#.....#
#wwwww#
#######
#####
#...#
#.m.#
#s.e#
#.m.#
#...#
#####
#########
#s......#
#.......#
#.n.m.n.#
#.......#
#.n.m.m.#
#.......#
#......e#
#########
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment