Last active
November 9, 2024 00:44
-
-
Save sfiera/f8d040b1e87901a565aedca1812f085c to your computer and use it in GitHub Desktop.
Movement Routines (PuzzleScript Script) https://www.puzzlescript.net/editor.html?hack=f8d040b1e87901a565aedca1812f085c
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 Movement Routines | |
author sfiera | |
homepage www.puzzlescript.net | |
noaction | |
realtime_interval 0.3 | |
======== | |
OBJECTS | |
======== | |
Background | |
lightgray | |
Target | |
green | |
..... | |
.000. | |
.0.0. | |
.000. | |
..... | |
Wall | |
black | |
Player | |
green | |
00000 | |
0...0 | |
0.0.0 | |
0...0 | |
00000 | |
DeadPlayer | |
darkgreen | |
0...0 | |
.0.0. | |
..0.. | |
.0.0. | |
0...0 | |
Crate | |
darkgray | |
PatrollerUp | |
red | |
..0.. | |
.000. | |
.000. | |
.0.0. | |
..0.. | |
PatrollerRight | |
red | |
..... | |
.000. | |
0.000 | |
.000. | |
..... | |
PatrollerDown | |
red | |
..0.. | |
.0.0. | |
.000. | |
.000. | |
..0.. | |
PatrollerLeft | |
red | |
..... | |
.000. | |
000.0 | |
.000. | |
..... | |
HuggerUp | |
red | |
00000 | |
..0.. | |
00000 | |
..0.. | |
..0.. | |
HuggerRight | |
red | |
..0.0 | |
..0.0 | |
00000 | |
..0.0 | |
..0.0 | |
HuggerDown | |
red | |
..0.. | |
..0.. | |
00000 | |
..0.. | |
00000 | |
HuggerLeft | |
red | |
0.0.. | |
0.0.. | |
00000 | |
0.0.. | |
0.0.. | |
FloorReader | |
red | |
..0.. | |
.0.0. | |
0...0 | |
.0.0. | |
..0.. | |
FloorMarkUp | |
white | |
..0.. | |
.000. | |
..... | |
..... | |
..... | |
FloorMarkRight | |
white | |
..... | |
...0. | |
...00 | |
...0. | |
..... | |
FloorMarkDown | |
white | |
..... | |
..... | |
..... | |
.000. | |
..0.. | |
FloorMarkLeft | |
white | |
..... | |
.0... | |
00... | |
.0... | |
..... | |
======= | |
LEGEND | |
======= | |
. = Background | |
# = Wall | |
P = Player | |
* = Crate | |
@ = Crate and Target | |
O = Target | |
⇡ = PatrollerUp | |
⇢ = PatrollerRight | |
⇣ = PatrollerDown | |
⇠ = PatrollerLeft | |
↑ = FloorMarkUp | |
→ = FloorMarkRight | |
↓ = FloorMarkDown | |
← = FloorMarkLeft | |
⇑ = FloorReader and FloorMarkUp | |
⇒ = FloorReader and FloorMarkRight | |
⇓ = FloorReader and FloorMarkDown | |
⇐ = FloorReader and FloorMarkLeft | |
▴ = HuggerUp | |
▸ = HuggerRight | |
▾ = HuggerDown | |
◂ = HuggerLeft | |
Patroller = PatrollerUp or PatrollerRight or PatrollerDown or PatrollerLeft | |
Hugger = HuggerUp or HuggerRight or HuggerDown or HuggerLeft | |
Blocker = Wall or Crate | |
FloorMark = FloorMarkUp or FloorMarkRight or FloorMarkDown or FloorMarkLeft | |
Pushable = Crate | |
Enemy = Patroller or Hugger or FloorReader | |
Solid = Player or DeadPlayer or Wall or Crate or Enemy | |
======= | |
SOUNDS | |
======= | |
================ | |
COLLISIONLAYERS | |
================ | |
Background | |
Target, FloorMark | |
Solid | |
====== | |
RULES | |
====== | |
[DeadPlayer] -> restart | |
[> Player | Pushable] -> [> Player | > Pushable] | |
(Ensure each enemy can only move once) | |
[stationary Player] [Enemy] -> [Player] [action Enemy] | |
(Patrollers move in their facing if possible, or the opposite if not) | |
up [action PatrollerUp | no Blocker] -> [> PatrollerUp |] | |
right [action PatrollerRight | no Blocker] -> [> PatrollerRight |] | |
down [action PatrollerDown | no Blocker] -> [> PatrollerDown |] | |
left [action PatrollerLeft | no Blocker] -> [> PatrollerLeft |] | |
up [action PatrollerUp ] -> [< PatrollerDown ] | |
right [action PatrollerRight] -> [< PatrollerLeft ] | |
down [action PatrollerDown ] -> [< PatrollerUp ] | |
left [action PatrollerLeft ] -> [< PatrollerRight] | |
(Wall huggers move in their facing if possible. | |
If they move in a direction, they rotate 1 step counter-clockwise. | |
If they can’t move in a direction, they try the next possibility clockwise) | |
up [action HuggerUp | no Blocker] -> [> HuggerLeft |] | |
right [action HuggerUp | no Blocker] -> [> HuggerUp |] | |
down [action HuggerUp | no Blocker] -> [> HuggerRight |] | |
left [action HuggerUp | no Blocker] -> [> HuggerDown |] | |
right [action HuggerRight | no Blocker] -> [> HuggerUp |] | |
down [action HuggerRight | no Blocker] -> [> HuggerRight |] | |
left [action HuggerRight | no Blocker] -> [> HuggerDown |] | |
up [action HuggerRight | no Blocker] -> [> HuggerLeft |] | |
down [action HuggerDown | no Blocker] -> [> HuggerRight |] | |
left [action HuggerDown | no Blocker] -> [> HuggerDown |] | |
up [action HuggerDown | no Blocker] -> [> HuggerLeft |] | |
right [action HuggerDown | no Blocker] -> [> HuggerUp |] | |
left [action HuggerLeft | no Blocker] -> [> HuggerDown |] | |
up [action HuggerLeft | no Blocker] -> [> HuggerLeft |] | |
right [action HuggerLeft | no Blocker] -> [> HuggerUp |] | |
down [action HuggerLeft | no Blocker] -> [> HuggerRight |] | |
(Floor readers move in whatever direction their floor marker says) | |
up [action FloorReader FloorMarkUp ] -> [> FloorReader FloorMarkUp ] | |
right [action FloorReader FloorMarkRight] -> [> FloorReader FloorMarkRight] | |
down [action FloorReader FloorMarkDown ] -> [> FloorReader FloorMarkDown ] | |
left [action FloorReader FloorMarkLeft ] -> [> FloorReader FloorMarkLeft ] | |
(Player dies if they end next to an enemy) | |
late [Player | Enemy] -> [DeadPlayer | Enemy] | |
============== | |
WINCONDITIONS | |
============== | |
all Target on Player | |
======= | |
LEVELS | |
======= | |
..→→↓#..⇡ | |
..⇑←←#.⇡. | |
↓←O..#⇡.. | |
↓↑..*#### | |
⇒↑.*..*.. | |
####.▾*.. | |
P..#**... | |
...#..... | |
⇢..*..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment