Created
November 28, 2021 20:51
-
-
Save jcmiller11/28359f1a7e60e22aa900b6fa3facb3d2 to your computer and use it in GitHub Desktop.
City road builder (PuzzleScript Script)
This file contains hidden or 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 hidden or 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 City road builder | |
| author Stingby12 | |
| homepage https://confoundingcalendar.itch.io/ | |
| background_color #60117f | |
| text_color #f9960f | |
| run_rules_on_level_start | |
| ======== | |
| OBJECTS | |
| ======== | |
| Background | |
| #151244 | |
| HouseNeut | |
| #bc2f01 | |
| ..... | |
| .000. | |
| .000. | |
| .000. | |
| ..... | |
| HouseWonrg | |
| #922a95 | |
| ..... | |
| .000. | |
| .000. | |
| .000. | |
| ..... | |
| HouseRight | |
| #680703 | |
| ..... | |
| .000. | |
| .000. | |
| .000. | |
| ..... | |
| Intersect | |
| #922a95 | |
| ..... | |
| ..0.. | |
| .000. | |
| ..0.. | |
| ..... | |
| Wall | |
| #60117f | |
| Player | |
| #f9cb60 #f9960f | |
| ..... | |
| .0.0. | |
| ..1.. | |
| .0.0. | |
| ..... | |
| PlayerDone | |
| #f9cb60 #f9960f | |
| ..... | |
| ..... | |
| ..1.. | |
| ..... | |
| ..... | |
| Startpos | |
| #be7dbc | |
| ..... | |
| .0.0. | |
| ..0.. | |
| .0.0. | |
| ..... | |
| PathL | |
| #f9960f | |
| ..... | |
| ..... | |
| 000.. | |
| ..... | |
| ..... | |
| PathR | |
| #f9960f | |
| ..... | |
| ..... | |
| ..000 | |
| ..... | |
| ..... | |
| PathU | |
| #f9960f | |
| ..0.. | |
| ..0.. | |
| ..0.. | |
| ..... | |
| ..... | |
| PathD | |
| #f9960f | |
| ..... | |
| ..... | |
| ..0.. | |
| ..0.. | |
| ..0.. | |
| Corner | |
| transparent | |
| Straight | |
| transparent | |
| Cantmove | |
| #be7dbc | |
| ..... | |
| ..... | |
| ..0.. | |
| ..... | |
| ..... | |
| Win1 | |
| transparent | |
| CornerWonrg | |
| #680703 | |
| ..0.. | |
| .0.0. | |
| 0...0 | |
| .0.0. | |
| ..0.. | |
| CantWin | |
| transparent | |
| WillWin | |
| transparent | |
| ======= | |
| LEGEND | |
| ======= | |
| . = Background | |
| # = Wall | |
| O = HouseNeut | |
| + = Intersect | |
| P = Player and Startpos | |
| Path = PathL or PathR or PathU or PathD | |
| House = HouseNeut or HouseWonrg or HouseRight | |
| Wonrg = HouseWonrg or HouseNeut or CornerWonrg | |
| ======= | |
| SOUNDS | |
| ======= | |
| endlevel 83744503 | |
| startgame 92244503 | |
| ================ | |
| COLLISIONLAYERS | |
| ================ | |
| Background | |
| Corner | |
| Straight | |
| CornerWonrg | |
| Startpos | |
| House | |
| Intersect | |
| PathL | |
| PathR | |
| PathU | |
| PathD | |
| Player, PlayerDone | |
| Wall | |
| Cantmove | |
| Win1 | |
| CantWin | |
| WillWin | |
| ====== | |
| RULES | |
| ====== | |
| (clearing) | |
| [Straight] -> [] | |
| [Corner] -> [] | |
| [Cantmove no Path] -> [] | |
| [Cantwin] -> [] | |
| [WillWin] -> Win | |
| (check win conditions) | |
| [Player] [CornerWonrg] -> [Player CantWin] [CornerWonrg] | |
| [Player] [HouseNeut] -> [Player CantWin] [HouseNeut] | |
| [Player] [HouseWonrg] -> [Player CantWin] [HouseWonrg] | |
| up [up Player no CantWin|Startpos] -> [PathU|PathD Player Startpos WillWin] | |
| down [down Player no CantWin|Startpos] -> [PathD|PathU Player Startpos WillWin] | |
| left [left Player no CantWin|Startpos] -> [PathL|PathR Player Startpos WillWin] | |
| right [right Player no CantWin|Startpos] -> [PathR|PathL Player Startpos WillWin] | |
| [WillWin] -> again | |
| (moves) | |
| (forward move) | |
| right [right Player|no Wall no Cantmove] -> [PathR|PathL Player] | |
| right [no Wall no Cantmove|left Player] -> [Player PathR|PathL] | |
| down [down Player|no Wall no Cantmove] -> [PathD|PathU Player] | |
| down [no Wall no Cantmove|up Player] -> [Player PathD|PathU] | |
| (backwards undo moves) | |
| right [> Player PathR | PathL ] -> [|Player] | |
| down [> Player PathD | PathU ] -> [|Player] | |
| left [> Player PathL | PathR ] -> [|Player] | |
| up [> Player PathU | PathD ] -> [|Player] | |
| (VERY IMPORTANT) | |
| [> Player] -> [Player] | |
| (game complete) | |
| [Path] -> [Path Cantmove] | |
| [Startpos] -> [Win1 Startpos] | |
| late [Win1] [Wonrg] -> [] [Wonrg] | |
| late [Win1 Cantmove] -> [Win1] | |
| (paths) | |
| (straight) | |
| late [PathL PathR] -> [PathL PathR Straight] | |
| late [PathU PathD] -> [PathU PathD Straight] | |
| (corner) | |
| late [PathL PathU] -> [PathL PathU Corner] | |
| late [PathU PathR] -> [PathU PathR Corner] | |
| late [PathR PathD] -> [PathR PathD Corner] | |
| late [PathD PathL] -> [PathD PathL Corner] | |
| (can't turn on empty) | |
| late [Corner no House no Intersect] -> [Corner CornerWonrg] | |
| [CornerWonrg no Corner] -> [] | |
| (turning) | |
| late [Corner HouseNeut] -> [Corner HouseRight] | |
| late [Straight HouseNeut] -> [Straight HouseWonrg] | |
| [HouseRight no Corner] -> [HouseNeut] | |
| [HouseWonrg] -> [HouseNeut] | |
| ============== | |
| WINCONDITIONS | |
| ============== | |
| ======= | |
| LEVELS | |
| ======= | |
| message Build a road that turns at every houses, then return to his original position, forming a loop. | |
| ++..+.+o+ | |
| ......... | |
| .o.+o.... | |
| ....+.o++ | |
| .p.####.. | |
| ...####.. | |
| .+.....o+ | |
| ...+.o..+ | |
| +..+.+... | |
| message You are hired ! | |
| message -- Made for The CONFOUNDING Calendar -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment