Skip to content

Instantly share code, notes, and snippets.

@patrickgh3
Created April 26, 2022 02:51
Show Gist options
  • Save patrickgh3/2723811647ddb013963e370c4b882a4b to your computer and use it in GitHub Desktop.
Save patrickgh3/2723811647ddb013963e370c4b882a4b to your computer and use it in GitHub Desktop.
Make a mountain out of a molehill (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Make a mountain out of a molehill
author Patrick
again_interval 0.1
run_rules_on_level_start
========
OBJECTS
========
Background .
lightblue
Dirt #
darkbrown
DirtMarker
transparent
DirtMarkerVisible
#292219
DarkDirt X
darkblue
DirtMarker2
transparent
DirtMarkerH
transparent
DirtMarkerV
transparent
Goal g
yellow
0.0.0
.000.
00000
.000.
0.0.0
Cloud u
yellow
0.0.0
.000.
00000
.000.
0.0.0
(
white
.....
.000.
00000
00..0
.....
)
Mole
gray lightred
.....
.000.
00001
0000.
.1.1.
MoleDirt d
gray lightred darkbrown
.222.
22222
00001
0000.
.1.1.
(
.222.
22222
00001
0000.
.1.1.
)
MoleLeft
gray lightred
..1..
1000.
.000.
1000.
.00..
MoleRight
gray lightred
..1..
.0001
.000.
.0001
..00.
MoleUp
gray lightred
.1.1.
0000.
00001
.000.
.....
MoleDown p
gray lightred
.....
.000.
00001
0000.
.1.1.
MoleLeftD
gray lightred darkbrown
..12.
10022
.0022
10022
.002.
MoleRightD
gray lightred darkbrown
.21..
22001
2200.
22001
.200.
MoleUpD
gray lightred darkbrown
.1.1.
0000.
00001
22222
.222.
MoleDownD
gray lightred darkbrown
.222.
22222
00001
0000.
.1.1.
(
MoleDown
gray lightred
.....
.000.
00001
0000.
.1.1.
)
MolePickup
transparent
MolePickup2
white
.....
.....
..0..
.....
.....
MolePickup2No
red
.....
.....
..0..
.....
.....
Fall
white
..0..
.....
..0..
..0..
.....
MolePlacing
transparent
MolePlacing2
white
.....
.....
..0..
.....
.....
MolePlacing2No
red
.....
.....
..0..
.....
.....
Timer1
white lightgray
10000
10000
10000
10000
10000
Timer2
white
.0000
.0000
.0000
.0000
.0000
Timer3
white
..000
..000
..000
..000
..000
Timer4
white
...00
...00
...00
...00
...00
Timer5
white
....0
....0
....0
....0
....0
Timer6
transparent
Clock
red yellow white black
10001
02320
02330
02220
.000.
StartTimerMarker
transparent
FirstAttemptMarker c
transparent
NoMolePickup2
transparent
=======
LEGEND
=======
Player = Mole or MoleDirt or MoleLeft or MoleRight or MoleUp or MoleDown or MoleLeftD or MoleRightD or MoleUpD or MoleDownD
Solid = Dirt or DarkDirt
=======
SOUNDS
=======
Dirt create 74940507
Dirt destroy 70748907
Fall create 63446707
================
COLLISIONLAYERS
================
Background
DirtMarker
DirtMarker2
DirtMarkerH
DirtMarkerV
DirtMarkerVisible
Timer1 Timer2 Timer3 Timer4 Timer5 Timer6 Clock
StartTimerMarker
FirstAttemptMarker
NoMolePickup2
Dirt DarkDirt
Goal Cloud
Player
MolePlacing MolePlacing2 MolePlacing2No MolePickup MolePickup2 MolePickup2No
Fall
======
RULES
======
( Remove markers )
[ DirtMarker ] -> [ ]
[ DirtMarker2 ] -> [ ]
[ DirtMarkerH ] -> [ ]
[ DirtMarkerV ] -> [ ]
[ DirtMarkerVisible ] -> [ ]
( Retransform player )
[ MoleLeft ] -> [ Mole ]
[ MoleRight ] -> [ Mole ]
[ MoleUp ] -> [ Mole ]
[ MoleDown ] -> [ Mole ]
[ MoleLeftD ] -> [ MoleDirt ]
[ MoleRightD ] -> [ MoleDirt ]
[ MoleUpD ] -> [ MoleDirt ]
[ MoleDownD ] -> [ MoleDirt ]
[ Fall ] -> [ ]
( Place dirt markers )
([ Solid ] -> [ Solid DirtMarker ]
up [ Solid | no Solid ] -> [ Solid | DirtMarker ]
right [ Solid | DirtMarker ] -> [ Solid | DirtMarker DirtMarker2 ]
right [ Solid | no Solid ] -> [ Solid | DirtMarker ]
left [ Solid | DirtMarker ] -> [ Solid | DirtMarker DirtMarker2 ]
left [ Solid | no Solid ] -> [ Solid | DirtMarker ]
down [ Solid | DirtMarker ] -> [ Solid | DirtMarker DirtMarker2 ]
down [ Solid | no Solid ] -> [ Solid | DirtMarker ])
( dirt markers only between 2 dirt tiles, sorta. awkward. )
(
[ Solid ] -> [ Solid DirtMarker ]
[ Solid | no Solid | Solid ] -> [ Solid | DirtMarker | Solid ]
[ DirtMarker | no Solid | Solid ] -> [ DirtMarker | DirtMarker | Solid ]
)
[ Solid ] -> [ Solid DirtMarker DirtMarkerVisible ]
[ DarkDirt | no Solid ] -> [ DarkDirt | DirtMarker ]
[ Dirt | no Solid ] -> [ Dirt | DirtMarker DirtMarkerVisible ]
(down [ DirtMarkerVisible no Solid | Solid ] -> [ | Solid ])
( dirt markers H and V intersect )
(
horizontal [ DirtMarker | no Solid ] -> [ DirtMarker | DirtMarkerH ]
vertical [ DirtMarker | no Solid ] -> [ DirtMarker | DirtMarkerV ]
[ DirtMarkerH DirtMarkerV ] -> [ DirtMarker DirtMarkerH DirtMarkerV ]
[ DirtMarkerH ] -> [ ]
[ DirtMarkerV ] -> [ ]
)
( Can't walk into solids )
[ > Player no MolePickup | Solid ] -> [ Player | Solid ]
( Pick up dirt )
[ action Mole no MolePickup ] -> [ Mole MolePickup ]
[ action Mole MolePickup ] -> [ Mole no MolePickup ]
[ > Mole MolePickup | Dirt ] -> [ MoleDirt no MolePickup | no Dirt ] again
[ > Mole MolePickup ] -> [ Mole MolePickup ] ( fail to pick up )
( Place dirt )
[ action MoleDirt no MolePlacing ] -> [ MoleDirt MolePlacing ]
[ action MoleDirt MolePlacing ] -> [ MoleDirt no MolePlacing ]
[ > MoleDirt MolePlacing | no Solid ] -> [ Mole no MolePlacing | Dirt ] again
([ > MoleDirt MolePlacing | no Solid DirtMarker ] -> [ Mole no MolePlacing | Dirt DirtMarker ] again)
[ > MoleDirt MolePlacing ] -> [ MoleDirt MolePlacing ] ( fail to place )
( If floating in air, fall downwards )
[ > Player ] -> [ > Player ] again
down [ Player no DirtMarker | no Solid ] -> [ Fall | Player ] again
( Animate player )
late down [ Mole | Solid ] -> [ MoleDown | Solid ]
late left [ Mole | Solid ] -> [ MoleLeft | Solid ]
late right [ Mole | Solid ] -> [ MoleRight | Solid ]
late up [ Mole | Solid ] -> [ MoleUp | Solid ]
late [ Mole ] -> [ MoleDown ]
late down [ MoleDirt | Solid ] -> [ MoleDownD | Solid ]
late left [ MoleDirt | Solid ] -> [ MoleLeftD | Solid ]
late right [ MoleDirt | Solid ] -> [ MoleRightD | Solid ]
late up [ MoleDirt | Solid ] -> [ MoleUpD | Solid ]
late [ MoleDirt ] -> [ MoleDownD ]
( Pickup and placing graphics )
[ MolePickup2 ] -> [ ]
[ MolePickup2No ] -> [ ]
([ MolePickup | ] -> [ MolePickup | MolePickup2No ])
[ MolePickup | Dirt ] -> [ MolePickup | MolePickup2 Dirt ]
[ MolePlacing2 ] -> [ ]
[ MolePlacing2No ] -> [ ]
[ MolePlacing | ] -> [ MolePlacing | MolePlacing2No ]
[ MolePlacing | ] -> [ MolePlacing | MolePlacing2 ]
( Stop pickup if nothing to pickup )
[ ] -> [ NoMolePickup2 ]
[ MolePickup2 ] [ NoMolePickup2 ] -> [ MolePickup2 ] [ ]
[ MolePickup ] [ NoMolePickup2 ] -> [ ] [ ]
[ NoMolePickup2 ] -> [ ]
( Timer )
[ Clock | Timer6 ] -> [ | Clock ]
[ Timer5 ] -> [ Timer6 ]
[ Timer4 ] -> [ Timer5 ]
[ Timer3 ] -> [ Timer4 ]
[ Timer2 ] -> [ Timer3 ]
[ Clock | Timer1 ] -> [ Clock | Timer2 ]
( Timer start )
[ Player Cloud ] [ FirstAttemptMarker ] -> [ Player Cloud StartTimerMarker ] [ ]
right [StartTimerMarker] [ Clock | ] -> [StartTimerMarker] [ Clock | Timer1 ]
right [StartTimerMarker] [ Timer1 | ] -> [StartTimerMarker] [ Timer1 | Timer1 ]
[ StartTimerMarker ] -> [ ]
[ Player Goal ] -> [ Player Goal ] win
==============
WINCONDITIONS
==============
=======
LEVELS
=======
message Arrow keys to move. Your claws can grab onto all 4 sides of dirt tiles.
.................
.................
.................
xxxxxxxxxxxxx..g.
xxxxxxxxxxxxx.xxx
xxxxxxxxxx.xx.xxx
xxxxx.........xxx
xxxxx.........xxx
xxxx.....xxx..xxx
xxxxxxxx..xx..xxx
xxxxxxxx...x..xxx
xxxxxxxx..xx...xx
xxxxxxx...xx..xxx
xxxxxxxx..xx..xxx
xxxxxxxx......xxx
xxxxxxxx..xxxxxxx
xxxxxxxx..xxxxxxx
xxxx......xxxxxxx
xxxx......xxxxxxx
xxxx......xxxxxxx
xxxx......xxxxxxx
xxxx......xxxxxxx
xxxx....xxxxxxxxx
xxxx....xxxxxxxxx
xxxx....xxxxxxxxx
xxxx.xxxxxxxxxxxx
xxp..xxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
message Press X and then an arrow key to dig dirt and place dirt.
message The dark squares are only visual guides to let you know where you can walk.
xxxxx......
xxxxx......
xxxxx......
xxxxx......
xxxxx......
xxxxx....g.
xxp#...xxxx
xxxxxxxxxxx
xxxxxxxxxxx
message There's no goal, it's just a sandbox. Make a mountain out of a molehill!
message The idiom "Make a mountain out of a molehill" means "To exaggerate or put too much focus on a minor issue and make it seem like a major one."
.....................
.....................
.....................
.....................
.....................
.....................
.....................
.....................
.....................
.....................
.....................
.....................
.....................
.....................
.....................
.........###.........
........#####........
xxxxxx#.#.p####xxxxxx
xxxxxx#...#####xxxxxx
xxxxxx#########xxxxxx
xxxxxxxxxxxxxxxxxxxxx
(
xxxxxxxxxxxx
xx.........x
x..........x
xx.........x
xx.........x
xx.........x
xx....p...gx
xx.xx.xx.xxx
xx.xx.xx.xxx
xx.xx.xx.xxx
xx.#.....#px
xxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxx
x.............
x.............
x.............
x.............
x#.p..........
xxxxxx........
xxxxxx........
xxxxxx........
xxxxxx........
xxxxxx......g.
xxxxxx...xxxxx
xxxxxx...xxxxx
xxxxxx...xxxxx
xxxxxxxxxxxxxx
)
( This is possible :)
(
.................
.................
.................
.................
........g........
.................
.................
.................
.................
.................
.................
.................
.................
.................
.................
.................
.................
.................
.................
.................
.................
.................
..p....###.......
xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment