Skip to content

Instantly share code, notes, and snippets.

@Norgg
Created July 2, 2021 17:23
Show Gist options
  • Save Norgg/39d9beb269dde7d511d2320a443f7de2 to your computer and use it in GitHub Desktop.
Save Norgg/39d9beb269dde7d511d2320a443f7de2 to your computer and use it in GitHub Desktop.
Untitled PuzzleScript Script
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title L-3-FAN T
author Norgg
homepage norgg.itch.io
run_rules_on_level_start
verbose_logging
noaction
(Ideas: Make floor panels which don't work if they have dust on them?)
(Wind power? How would wind occlusion work differently?)
(TODO: Make dustmaker fun?)
(TODO: Make powering solar panels use the directional light markers)
========
OBJECTS
========
lit_background ,
#202020 #202029
11111
10101
11111
10101
11111
dark_background .
#101010 #101019
11111
10101
11111
10101
11111
nothing `
transparent
start_robot @
black
fully_charged_robot
white lightgray green
.111.
11101
12221
11111
.1.1.
robot_charged_3
white lightgray green black
.111.
11101
12231
11111
.1.1.
robot_charged_2
white lightgray green black
.111.
11101
12331
11111
.1.1.
robot_charged_1
white lightgray green black
.111.
11101
13331
11111
.1.1.
uncharged_robot
white darkgray gray black
.111.
11121
13331
11111
.1.1.
attached_hose ¬
white lightgray green
.....
.....
1111.
...1.
..121
detached_hose d
white darkgray black
.....
.....
1111.
...1.
..121
dust
#aaaa66
0....
...0.
.....
.0...
...0.
wall #
#555588 #7777aa
11111
10101
11011
10101
11111
window o
#aaaaee #7777aa #eeeeff
11111
10021
10001
10001
11111
powered_solar
blue white
11111
10101
11111
10101
11111
unpowered_solar
darkgray white lightgray
11111
10101
11111
10101
11111
dustmaker_standing m
Black Orange White Blue
.000.
.111.
22222
.333.
.3.3.
dustmaker_eating
Black Orange White Blue
.000.
.121.
.2222
.333.
.3.3.
light_marker_v
transparent
light_marker_h
transparent
dust_marker
transparent
dir_marker_up
red
.....
.....
.....
.....
.....
dir_marker_left
red
.....
.....
.....
.....
.....
dir_marker_down
red
.....
.....
.....
.....
.....
dir_marker_right
red
.....
.....
.....
.....
.....
=======
LEGEND
=======
background = lit_background or dark_background or nothing
charged_robot = fully_charged_robot or robot_charged_3 or robot_charged_2 or robot_charged_1
low_charge_robot = robot_charged_2 or robot_charged_1 or uncharged_robot
player = charged_robot
dustmaker = dustmaker_standing or dustmaker_eating
robot = player or uncharged_robot
obstacle = wall or window
hose = attached_hose or detached_hose
solar = unpowered_solar or powered_solar
pushable = solar or hose or dustmaker
pushes = solar or hose or player
power_source = powered_solar
solid = player or pushable or obstacle
opaque = wall or solar
light_marker = light_marker_v or light_marker_h
dir_marker = dir_marker_up or dir_marker_left or dir_marker_down or dir_marker_right
: = dust
s = powered_solar
=======
SOUNDS
=======
sfx0 52299303
player move 81494903
uncharged_robot create 65066302
dust destroy 52309108
================
COLLISIONLAYERS
================
background
dust
player obstacle uncharged_robot hose solar start_robot dustmaker
light_marker_v
light_marker_h
dust_marker
dir_marker
======
RULES
======
(==== player movement ====)
right [moving player | stationary hose] -> [moving player | moving hose]
(==== dustmaker movment - keep going in a direction, turn right if hit something ====)
[dir_marker no dustmaker] -> []
up [dustmaker dir_marker_up | no solid] -> [up dustmaker up dir_marker_up |]
up [dustmaker dir_marker_up | solid] -> [right dustmaker right dir_marker_right | solid]
right [dustmaker dir_marker_right | no solid] -> [right dustmaker right dir_marker_right |]
right [dustmaker dir_marker_right | solid] -> [down dustmaker down dir_marker_down | solid]
down [dustmaker dir_marker_down | no solid] -> [down dustmaker down dir_marker_down |]
down [dustmaker dir_marker_down | solid] -> [left dustmaker left dir_marker_left | solid]
left [dustmaker dir_marker_left | no solid] -> [left dustmaker left dir_marker_left |]
left [dustmaker dir_marker_left | solid] -> [up dustmaker up dir_marker_up | solid]
[moving dustmaker no dust] -> [moving dustmaker dust_marker]
[dustmaker no dir_marker] -> [dustmaker dir_marker_up]
(==== pushing ====)
[> attached_hose | pushable] -> [> attached_hose | > pushable]
[> pushes | pushable] -> [> pushes | > pushable]
[> pushes | obstacle] -> [stationary pushes | obstacle]
[> pushes | stationary pushable] -> [stationary pushes | stationary pushable]
right [stationary player | moving attached_hose] -> [stationary player | stationary attached_hose]
[stationary player] -> cancel
(==== light rules ====)
late [light_marker] -> []
late [lit_background] -> [dark_background]
late vertical [ window | no opaque] -> [window | light_marker_v]
late horizontal [ window | no opaque] -> [window | light_marker_h]
late vertical [light_marker_v | no opaque] -> [light_marker_v | light_marker_v]
late horizontal [light_marker_h | no opaque] -> [light_marker_h | light_marker_h]
late [light_marker dark_background] -> [light_marker lit_background]
(==== dustmaker dustmaking ====)
late [dust_marker no dustmaker no dust] -> [dust]
late [dust_marker] -> []
(==== power rules ====)
late [powered_solar] -> [unpowered_solar]
late vertical [light_marker_v | unpowered_solar] -> [light_marker_v | powered_solar]
late horizontal [light_marker_h | unpowered_solar] -> [light_marker_h | powered_solar]
late [window | unpowered_solar] -> [window | powered_solar]
late [power_source | low_charge_robot] -> [power_source | fully_charged_robot] sfx0
late [robot_charged_1] -> [uncharged_robot]
late [robot_charged_2] -> [robot_charged_1]
late [robot_charged_3] -> [robot_charged_2]
late [fully_charged_robot] -> [robot_charged_3]
late [power_source | robot] -> [power_source | fully_charged_robot]
(==== don't lose charge on level start ====)
late [start_robot] -> [fully_charged_robot]
(==== check hose attachment ====)
late left [attached_hose | no charged_robot] -> [detached_hose | ]
late left [detached_hose | charged_robot] -> [attached_hose | charged_robot]
late left [detached_hose | power_source] -> [attached_hose | power_source]
(==== so clean ====)
late [attached_hose dust] -> [attached_hose]
==============
WINCONDITIONS
==============
all dust on opaque
=======
LEVELS
=======
message dust must go
####o####
#@¬....:#
#.......#
####s####
message go dust go
####o####
#@...¬.:#
#..s...:#
#########
message dust no
####o##o##
#@..s..s.#
#.......¬#
#.:......#
#..#s....#
##########
message so much dust
####o###
#@.....#
#..ss..#
#......#
#......#
#...#..#
#..:::.#
os..¬..#
os..#..o
#......#
#..:::.#
########
message oh nose
###o#o##o##
#.....#..:#
#..s.....:#
#@¬...#...#
###########
message hide it away
#o#####
o...¬:#
#s..###
#..s#``
#:@.#``
#####``
message come back dust
##ooo##o#o##
#@¬...#...:#
#..........#
#.s.s.#....#
#.....#...:#
#.....#..#:#
############
message from whence, dust?
#####o######
o...@......#
#....s##...#
#.....s¬...#
#....s#.##.#
#.::.....#.#
###:......:o
#m#####o####
message stop it
##oo#`
#.@.#`
#.ss#`
#...#`
#...##
#....#
#...##
#...#`
#...#`
#.:m#`
#..¬#`
#..##`
#####`
message phew no more dust
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment