Skip to content

Instantly share code, notes, and snippets.

@jcmiller11
Created June 22, 2022 20:07
Show Gist options
  • Select an option

  • Save jcmiller11/c80648db8227aaa6c365bc85cc559067 to your computer and use it in GitHub Desktop.

Select an option

Save jcmiller11/c80648db8227aaa6c365bc85cc559067 to your computer and use it in GitHub Desktop.
Unnamed Magnet Game (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Unnamed Magnet Game
author Omen777
homepage https://stingby12.itch.io/
text_color #0055CC
background_color #522A2A
key_repeat_interval 0.3
========
OBJECTS
========
(Layout)
Background
white gray
00000
00000
00100
00000
00000
Hole
darkgray black
00000
01110
01110
01110
00000
Wall
darkgray
(Players)
Playerposi
Blue white
00000
00100
01110
00100
00000
Playernega
Red white
00000
00000
01110
00000
00000
(Crates)
Cratenega
darkred red
.000.
00000
01110
00000
.000.
Crateposi
purple blue
.000.
00100
01110
00100
.000.
(Targets)
Targetnega
red
00000
0...0
0...0
0...0
00000
Targetposi
blue
00000
0...0
0...0
0...0
00000
(This one was used only on the last level)
Targetplayer
gray
00000
0...0
0...0
0...0
00000
(Status)
Polar
green
.....
.0.0.
..0..
.0.0.
.....
Auranega
red darkred
11.11
1...1
.000.
1...1
11.11
Auraposi
blue purple
11.11
1.0.1
.000.
1.0.1
11.11
=======
LEGEND
=======
. = Background
# = Wall
% = Hole
player = Playerposi or Playernega
P = Playerposi
b = Playernega
crate = Cratenega or Crateposi
- = Cratenega
+ = Crateposi
O = Targetnega
0 = Targetposi
@ = Cratenega and Targetposi
X = Crateposi and Targetnega
! = Targetplayer
* = Polar
a = Auranega
z = Auraposi
blocker = wall or crate
=======
SOUNDS
=======
player move 6693107 (Movement)
player cantmove 96028704 (Wall colision)
crate move 2112507 (Pushing)
sfx0 25215703 (Status)
sfx1 68384901 (Hole)
closemessage 4384306 (Do I even need to tell you ?)
endlevel 10222700 (Do I even need to tell you ?)
restart 22726503 (Do I even need to tell you ?)
startgame 25215703 (Do I even need to tell you ?)
endgame 20301908 (Do I even need to tell you ?)
================
COLLISIONLAYERS
================
Background
Targetnega, Targetposi, Polar, Hole, Auranega, Auraposi, Targetplayer
Playerposi, Playernega, Wall, Cratenega, Crateposi
======
RULES
======
(Hole logic)
late [crate hole] -> [Background] sfx1
late [player hole] -> [Background] sfx1
(Polar and auras logic)
late [playerposi polar] -> [playernega] sfx0
late [playernega polar] -> [playerposi] sfx0
late [playerposi Auranega] -> [playernega Auranega] sfx0
late [playernega Auraposi] -> [playerposi Auraposi] sfx0
(Basic rules)
[ LEFT playerposi | cratenega ] -> [ LEFT Playerposi | LEFT cratenega ]
[ RIGHT playerposi | cratenega ] -> [ RIGHT Playerposi | RIGHT cratenega ]
[ UP Playerposi | cratenega ] -> [ UP Playerposi | UP cratenega ]
[ DOWN Playerposi | cratenega ] -> [ DOWN Playerposi | DOWN cratenega ]
[ Crateposi | Playerposi ] -> [ < Crateposi | Playerposi ]
[ LEFT playernega | Crateposi ] -> [ LEFT playernega | LEFT Crateposi ]
[ RIGHT playernega | Crateposi ] -> [ RIGHT playernega | RIGHT Crateposi ]
[ UP playernega | Crateposi ] -> [ UP playernega | UP crateposi ]
[ DOWN playernega | Crateposi ] -> [ DOWN playernega | DOWN Crateposi ]
[ cratenega | playernega ] -> [ < Cratenega | playernega ]
[> Crate|stationary blocker] -> [Crate|Blocker]
[> Player|stationary blocker] [moving Crate] -> [Player|blocker] [Crate]
==============
WINCONDITIONS
==============
All Targetnega on Cratenega
All Targetposi on Crateposi
All Targetplayer on player
=======
LEVELS
=======
Message X : Wellcome.
Message X : My name is not important for now.
Message X : You are here for some test to solve.
Message X : But first here is the training to get yourself back on track.
Message X : Use arrow keys to move.
Message X : Get the box to the target.
#########
#.......#
#...-...#
#.......#
#.P...O.#
#.......#
#.......#
#.......#
#########
Message X : Ok good !
Message X : You can use your magnetic powers to pull that crate.
#########
#.....###
#..PO..-#
#.....###
#########
Message X : Sometimes, crates can be annoying.
Message X : You should use a wall to that kind of situation.
#########
.#..#..#.
.#..O..#.
##.....##
#-..P..-#
##.....##
.#..O..#.
.#..#..#.
#########
Message X : Try moving two crates at the time.
#########
###...###
#O.....-#
#P..#...#
#O.....-#
###...###
#########
Message X : Alright ! Everything seems to work well !
Message X : Here is something slightly different.
Message X : Can you interact with this crate ?
#########
#.......#
#...+...#
#.......#
#.P...0.#
#.......#
#.......#
#.......#
#########
Message X : Perfect !
Message X : Here is the last level to conclude your training.
Message X : One last thing before you start...
Message X : If you screwed up somewere,
Message X : Press R to restart the level !
Message X : You can also press Z to undo your last move.
Message X : Alright, enough chit-chat, let's get into it.
###########
#.........#
#.........#
#.@..P..X.#
#.........#
#.........#
###########
Message X : Great job for completing the tutorial !
Message X : Now we can start the real tests.
Message X : The tests are sorted in terms of difficulty.
Message X : Remember, R to restart, Z to undo.
Message X : With that being said, let's start the first tests.
Message Pack 1 : Magnetism | Difficulty : Easy | Level : 1/7
###########
#.........#
#.0.....0.#
#.........#
#....+....#
#P..+.+...#
#....+....#
#.........#
#.0.....0.#
#.........#
###########
Message Pack 1 : Magnetism | Difficulty : Easy | Level : 2/7
#############
####.....####
#...........#
#..X..P..@..#
#...........#
####.....####
#############
Message X : These were just some warm ups. Let's try harder !
Message Pack 1 : Magnetism | Difficulty : Easy | Level : 3/7
.#######.
##.....##
#-..#..O#
##......#
#-..#P.O#
##......#
#-..#..O#
##.....##
.#######.
Message Pack 1 : Magnetism | Difficulty : Easy | Level : 4/7
##########
#........#
#.-.P..+.#
#........#
#...0O...#
#...O0...#
#........#
#.+....-.#
#........#
##########
Message X : Maybe you should try something about the red crate that is blocking the target for the blue one.
Message Pack 1 : Magnetism | Difficulty : Easy | Level : 5/7
#######..
###..#...
#....###.
#p#+.@#..
#....###.
###..#...
#######..
Message Pack 1 : Magnetism | Difficulty : Easy | Level : 6/7
#####..#...
#...######.
#....#...##
#....X.P.@#
#....#...##
#...######.
#####..#...
Message X : This one is going to be a little bit trickier.
Message X : Try using everything you see in the level.
Message Pack 1 : Magnetism | Difficulty : Easy | Level : 7/7
#############
##.........##
#...@...@...#
#...........#
#.....P.....#
#...........#
#...X...X...#
##.........##
#############
Message X : Oh, you beat every levels in the pack ?
Message X : You're doing great !
Message X : The next pack is going to be exiting...
Message X : Collect the green dot to the right and see what happens...
#########
#.....###
#*.P0..+#
#.....###
#########
Message X : That looks cool, huh ?
Message X : I think I'm going to call it a "polar".
Message X : Polar... That sounds good enough.
Message X : So anyways, back to the tests.
Message X : Make sure you don't use all of the polars for nothing !
Message X : I have a pretty limited amount of them, so that would be nice.
Message Pack 2 : Polarity | Difficulty : Medium | Level : 1/8
###########
#.........#
#.-.....O.#
#....P....#
#.........#
#.........#
#.........#
#....*....#
#.O.....-.#
#.........#
###########
Message Pack 2 : Polarity | Difficulty : Medium | Level : 2/8
#############
#+....P....0#
###.......###
#-#.*...*.#-#
#.#.......#.#
#############
Message Pack 2 : Polarity | Difficulty : Medium | Level : 3/8
###########
#0...*...0#
#.........#
#.........#
#...#+#...#
#P..+#+...#
#...#+#...#
#.........#
#.........#
#0...*...0#
###########
Message X : Hey, you know that order matters, right ?
Message X : This is very important so don't forget that !
Message Pack 2 : Polarity | Difficulty : Medium | Level : 4/8
###########
#.-.#O#*..#
#...#.#...#
#.........#
#....P....#
#.........#
#...#.#...#
#.+.#0#*..#
###########
Message Pack 2 : Polarity | Difficulty : Medium | Level : 5/8
###########
#-.#***#.-#
####...####
#.........#
#....P....#
#.........#
##.#####.##
##@#.+.#X##
###########
Message X : You have to place all of the blocs but with limited polars...
Message X : What is your strategy ? let me see what are you doing !
Message Pack 2 : Polarity | Difficulty : Medium | Level : 6/8
-###########+
-#...#0#...#+
-#.*.#O#.*.#+
-#...#0#...#+
##...#O#...##
#..-.....+..#
#..-..P..+..#
#...........#
#############
Message Pack 2 : Polarity | Difficulty : Medium | Level : 7/8
##############
#.##......##.#
###....*...###
#0O........+-#
#0O...P....+-#
#0O........+-#
###...*....###
#.##......##.#
##############
Message Pack 2 : Polarity | Difficulty : Medium | Level : 8/8
###########
#...#O#...#
#.*.#0#.O.#
###..+....#
#0-.......#
###......##
#####.#..##
#.-.#.+..##
#+*+#-#..##
#.-.###P###
###########
Message X : All the test were amazing so far !
Message X : ...
Message X : Oh yeah ! I almost forgot something !
Message X : The magnet has a bug that occurs when you interract a wall.
Message X : Making it so when you try to move through the wall, the block you sticked with will move to the next free spot.
Message X : But that don't matter since anything esle is working fine !
Message X : Now, let's move on to the next tests...
Message X : Try placing something in the hole.
############
#...#.....##
#.O.%..-P.-#
#...#.....##
############
Message X : Yeah, I thought using these would be a great idea.
Message X : No sure if they can work well with my tests...
Message X : I guess they can be used as obstacles.
Message X : ...Let's just start the tests.
Message Pack 3 : Watchout | Difficulty : Medium | Level : 1/6
#######..---.
#..P..#.#####
#.....###...#
#.-O+.%...@.#
#.....###...#
#.....#.#####
#######..---.
Message X : Be carefull not to fall in these !
Message Pack 3 : Watchout | Difficulty : Medium | Level : 2/6
##########
#%.......#
#%.....-.#
#%+.P..@.#
#%.....-.#
#%.......#
##########
Message X : I guess for this one,
Message X : You need to exploit the bug I mentioned earlier.
Message Pack 3 : Watchout | Difficulty : Medium | Level : 3/6
##########*
#+#......#-
#+#.-....#*
###......##
#.%....%%O#
#.#......##
#-#.-....#*
#P#......#-
##########*
Message Pack 3 : Watchout | Difficulty : Medium | Level : 4/6
######
##..P#
#..OO#
#....#
#-..-#
######
Message X : Woah woah woah !
Message X : Hold on, this is not a bug exploitation site !
Message X : We are here to test your skills !
Message X : So let's continue with this one...
Message Pack 3 : Watchout | Difficulty : Medium | Level : 5/6
%%#######%%....
%##%%%%%##%%%%%
##%%...%%#####%
#%%.....%%%%%#%
#%..........%##
#%...%......%%#
#%...%%......%#
#%....%%%%...%#
#%%...%#%....%#
#%....%%%...%%#
#%.-.%%.o...%##
#%-p-%%o.o.%%#%
#%.-.%%.o.%%##%
#%%%%%%%%%%##%%
############%%.
Message Pack 3 : Watchout | Difficulty : Medium | Level : 6/6
+########-
##%%%%%%##
#%%.P..%%#
#%......%#
#%..@X..%#
#%..X@..%#
#%......%#
#%%....%%#
##%%%%%%##
-########+
Message X : ...
Message X : Yeah...
Message X : That was a pretty short one.
Message X : Now that I think about it, the holes were pretty bad ideas.
Message X : So anyways, let's switch from boring to cool again.
Message X : See those auras ?
Message X : Try to step on them.
#########
#z..#...#
#..P.O#-#
#a..#...#
#########
Message X : While you were on the polarity pack, I was thinking...
Message X : "What if there was something like a polar that could be used infinitively ?"
Message X : And there you go ! The auras !
Message X : Honestly, I'm very proud of what I made.
Message X : Let's see what we can do with them right away !
Message Pack 4 : Emanation | Difficulty : Hard | Level : 1/8
############+
#0.+.......#+
###a####...##
++#-.P.a.O.z#
###a####...##
#0.+.......#+
############+
Message Pack 4 : Emanation | Difficulty : Hard | Level : 2/8
++########
+##......#
##.....a.#
#........#
#....#####
#.P..X@X@#
#....#####
#........#
##.....z.#
-##......#
--########
Message X : Don't worry, I checked every levels and all of them are possible.
Message Pack 4 : Emanation | Difficulty : Hard | Level : 3/8
###########
#+.......+#
#....0....#
#..aaaaa..#
#..azzza..#
#.0azPza0.#
#..azzza..#
#..aaaaa..#
#....0....#
#+.......+#
###########
Message Pack 4 : Emanation | Difficulty : Hard | Level : 4/8
.a###########a.
.a#..a...a..#a.
aa#..a.a....#aa
###..a..aa..###
#-O..aa..aP.-O#
###....a.a..###
aa#..a...a..#aa
.a#..aaaaa..#a.
.a###########a.
Message Pack 4 : Emanation | Difficulty : Hard | Level : 5/8
..#...######.
.######....##
##...#......#
#z.X....+...#
##...#......#
.#####.OP.0.#
##...#......#
#a.@....-...#
##...#......#
.######....##
..#...######.
Message X : This level is going to be harder than before.
Message X : As you can see, there are negative auras near each target.
Message X : So you need to get the 2 crates outside of theirs holes.
Message Pack 4 : Emanation | Difficulty : Hard | Level : 6/8
z#########z
+#O#...#O#+
z#a#.#.#a#z
##.#...#.##
#..#...#..#
#..##P##..#
#...#.#...#
#.........#
#.........#
###-###-###
z+###+###+z
Message X : Smaller puzzles = Better puzzles, they said.
Message X : Hmmm... Let's see...
Message Pack 4 : Emanation | Difficulty : Hard | Level : 7/8
#########
#..z.a..#
#.xzpa@.#
#..z.a..#
#########
Message Pack 4 : Emanation | Difficulty : Hard | Level : 8/8
a.a.##############
a.a.##a....#..####
a.a.##a.aa.#....##
a.a.##a.a..#aa#.a#
a.a.##a.aa....a.a#
a.####a....#a.P.a#
a.#0##a.aaa#aa.aa#
###+##....a#aa+aa#
#0......a.a#a...a#
###+#a.#...#.....#
a.#0#......#.....#
a.###..aa###.....#
a.a.##############
Message X : You're doing great !
Message X : These tests are amazing !
Message X : These are the last tests.
Message X : They will work on what you have learned so far.
Message X : If you complete all of them, I'll have a surprise for you...
Message X : And I'm sure you will really like it !
Message X : Heheheheh...
Message Pack 5 : Conclude | Difficulty : Hard | Level : 1/5
#######...#######
#.....#####.....#
#.....X...@.....#
#.....X.P.@.....#
#.....X...@.....#
#.....#####.....#
#######...#######
Message Pack 5 : Conclude | Difficulty : Hard | Level : 2/5
###########
#.........#
#.X..X..X.#
#.........#
#....P....#
###.#.#.###
#z#*#*#*#a#
###.#.#.###
#.........#
#.........#
#.@..@..@.#
#.........#
###########
Message Pack 5 : Conclude | Difficulty : Hard | Level : 3/5
...%%#######%%%%%%....
..%%##%%%%%######%%%%%
.%%##%%...%%%%%%#####%
.%##%%.....%...%%%%%#%
.%#%%......a.......%#%
.%#%....%a.a.a.....%#%
.%#%..aa...a..aa...%#%
%%#%...a...%...%...%#%
%##%%..a..%%...%.O.%#%
%#%%...a..aaa..%O.O%#%
%#%aa.a%.......%.O.%#%
%#%a..a%%.....%%%%%%#%
%#%a.a%%aaa%%%%%%%###%
%#%a...a...a.%...%%%#%
%#%a.a...a.........%#%
%#%a...a...a...a...%#%
%#%%aaa%%%%%aaa%a..%#%
%##%%%%%%.-....a...%#%
%%######%-P-.a...a%%#%
.%%%%%%#%.-..a...%%##%
......%#%%%%%%%%%%##%%
......%############%%.
Message Pack 5 : Conclude | Difficulty : Hard | Level : 4/5
#######*#######
#.....###.....#
#.....z.a.....#
#..X..z.a..@..#
#.....z.a.....#
#.....z+a.....#
##zzzz###aaaa##
*#...-#*#-...#*
##aaaa###zzzz##
#.....a+z.....#
#.....a.z.....#
#..@..aPz..X..#
#.....a.z.....#
#.....###.....#
#######*#######
Message Pack 5 : Conclude | Difficulty : Hard | Level : 5/5
#################################
#...............................#
#...............................#
#..#.#.##..##..###.###.###.##...#
#..#.#.#+#.#0#.#%#.###.#*..#.#..#
#..#.#.#*#.#.#.###.#+#.###.#b#..#
#..#p#.#.#.#.#.#.#.#.#.#*..#.#..#
#..###.#%#.#.#.#.#.#.#.###.##...#
#...............................#
#...............z...............#
###..###.###..##a##..###.###..###
--#..###.#a#.#...#-#.#@..0#0..#.a
..#..#%#.###.#...#-#.###..#...#z.
++#..#%#.#.#.#+#.#-#.#x...#...#.z
..#..#%#.#.#.###.#-#.###..#...#-.
**#.........za.....az.........#.-
..#.........za.....az.........#+.
%%#####...##.###a###.###..#####.+
..%%..#..#...#*#z###.#0...#%..**.
aa..%%#..#...###.#-#.###..#.%%..*
..aa..#..#+#.#-#.#.#.#o...#a..%%.
zz..aa#..###.#.#.#.#.###..#.aa..%
..zz..#...................#z..aa.
--..zz#...................#.zz..a
..--..#####################-..zz.
Message X : Wait, what ?
Message X : You finished all of the tests, with the hardest ones ?
Message X : I can't believe this !
Message X : This is a honor !
Message X : I always wanted someone that is brave enough to finish all of my tests !
Message X : ...
Message X : Here.
Message X : Step on the gray target.
Message X : Take your prise.
azazazazazazazazaza
*--%--*--%--*--%--*
###################
#.P.............!.#
###################
%++*++%++*++%++*++%
zazazazazazazazazaz
Message X : ...
Message ??? : A R E Y O U R E A D Y ?
Message X : I am more than ready.
Message ??? : T H E N L E T S B E G I N
Message
Message The end ?
Message
Message Anyways I hope you liked my ga-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment