Created
April 25, 2019 05:45
-
-
Save ncrecc/c5cd6faa0cb683a81813095dc0a5f3b8 to your computer and use it in GitHub Desktop.
Simple Block Swapping Game (PuzzleScript Script)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title Simple Block Swapping Game | |
homepage www.puzzlescript.net | |
======== | |
OBJECTS | |
======== | |
Background | |
LIGHTGREEN GREEN | |
11111 | |
01111 | |
11101 | |
11111 | |
10111 | |
Target | |
DarkBlue | |
..... | |
.000. | |
.0.0. | |
.000. | |
..... | |
Wall | |
BROWN DARKBROWN | |
00010 | |
11111 | |
01000 | |
11111 | |
00010 | |
Player | |
Black Orange White Blue | |
.000. | |
.111. | |
22222 | |
.333. | |
.3.3. | |
Crate | |
Orange Yellow | |
00000 | |
0...0 | |
0...0 | |
0...0 | |
00000 | |
RedDotTop | |
Red | |
..0.. | |
..... | |
..... | |
..... | |
..... | |
RedDotLeft | |
Red | |
..... | |
..... | |
0.... | |
..... | |
..... | |
RedDotBottom | |
Red | |
..... | |
..... | |
..... | |
..... | |
..0.. | |
RedDotRight | |
Red | |
..... | |
..... | |
....0 | |
..... | |
..... | |
======= | |
LEGEND | |
======= | |
. = Background | |
# = Wall | |
P = Player | |
* = Crate | |
@ = Crate and Target | |
O = Target | |
1 = RedDotTop and RedDotLeft and RedDotBottom and RedDotRight and Crate | |
2 = RedDotTop and RedDotLeft and Crate | |
3 = RedDotBottom and RedDotRight and Crate | |
4 = RedDotBottom and RedDotTop and Crate | |
5 = RedDotLeft and RedDotRight and Crate | |
6 = RedDotLeft and RedDotTop and RedDotBottom and Crate | |
7 = RedDotRight and RedDotTop and RedDotBottom and Crate | |
8 = RedDotBottom and RedDotLeft and RedDotRight and Crate | |
9 = RedDotTop and RedDotLeft and RedDotRight and Crate | |
A = RedDotTop and Crate | |
B = RedDotLeft and Crate | |
C = RedDotBottom and Crate | |
D = RedDotRight and Crate | |
RedDots = RedDotTop or RedDotLeft or RedDotBottom or RedDotRight | |
======= | |
SOUNDS | |
======= | |
Crate MOVE 36772507 | |
================ | |
COLLISIONLAYERS | |
================ | |
Background | |
Target | |
Player, Wall, Crate | |
RedDotTop | |
RedDotLeft | |
RedDotBottom | |
RedDotRight | |
====== | |
RULES | |
====== | |
(Is there a way to get all dots to remain on a crate when the player swaps with it without checking for every possible combination of dots? Being angry over 14 lines may seem silly, but imagine, say, TopLeft, TopRight, BottomRight, and BottomLeft dots were added - that would significantly increase the complexity of the situation and amount of redundant lines.) | |
[> Player|...|Crate RedDots] -> [Crate RedDots|...|Player] (This is what I tried, but only one dot is transferred when the player swaps, rather than all of them (when there are multiple). Is there some way to transfer all the dots over multiple rules that I'm not clever enough to imagine?) | |
[> Player|...|Crate] -> [Crate|...|Player] (Rule for swapping a player with a dotless crate.) | |
============== | |
WINCONDITIONS | |
============== | |
======= | |
LEVELS | |
======= | |
########## | |
#........# | |
#.p......# | |
#......2.# | |
#.5......# | |
#.....1..# | |
#..3.....# | |
#....4...# | |
#........# | |
########## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment