Skip to content

Instantly share code, notes, and snippets.

@sponege
Last active December 15, 2024 08:59
Show Gist options
  • Save sponege/7606cf6ebe0071ef7e7a88d488ce4ca7 to your computer and use it in GitHub Desktop.
Save sponege/7606cf6ebe0071ef7e7a88d488ce4ca7 to your computer and use it in GitHub Desktop.
Advent of Code 2024 Day 15 Part 2 (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Advent of Code 2024 Day 15 Part 2
author sponege
homepage github.com/sponege
========
OBJECTS
========
Background
darkgrey
Wall
grey
BoxLeft
orange
00000
0....
0....
0....
00000
BoxRight
orange
00000
....0
....0
....0
00000
Robot
blue white
10101
10101
11111
01110
10001
=======
LEGEND
=======
. = Background
# = Wall
@ = Robot
[ = BoxLeft
] = BoxRight
Box = BoxLeft or BoxRight
Player = Robot
=======
SOUNDS
=======
Box move 33781707
================
COLLISIONLAYERS
================
Background
Robot, Box, Wall
======
RULES
======
[ > Robot | Box ] -> [ > Robot | > Box ]
+ [ > Box | Box ] -> [ > Box | > Box ]
+ rigid right [ moving BoxLeft | BoxRight ] -> [ moving BoxLeft | moving BoxRight ]
+ rigid right [ BoxLeft | moving BoxRight ] -> [ moving BoxLeft | moving BoxRight ]
(If any crate can't move, cancel the turn.)
[ > Box | Wall ] -> cancel
==============
WINCONDITIONS
==============
=======
LEVELS
=======
####################
##....[]....[]..[]##
##............[]..##
##..[][]....[]..[]##
##....[]@.....[]..##
##[]##....[]......##
##[]....[]....[]..##
##..[][]..[]..[][]##
##........[]......##
####################
( <vv>^<v^>v>^vv^v>v<>v^v<v<^vv<<<^><<><>>v<vvv<>^v^>^<<<><<v<<<v^vv^v>^ )
( vvv<<^>^v^^><<>>><>^<<><^vv^^<>vvv<>><^^v>^>vv<>v<<<<v<^v>^<^^>>>^<v<v )
( ><>vv>v^v^<>><>>>><^^>vv>v<^^^>>v^v^<^^>v^^>v^<^v>v<>>v^v^<v>v^^<^^vv< )
( <<v<^>>^^^^>>>v^<>vvv^><v<<<>^^^vv^<vvv>^>v<^^^^v<>^>vvvv><>>v^<<^^^^^ )
( ^><^><>>><>^^<<^^v>>><^<v>^<vv>>v>>>^v><>^v><<<<v>>v<v<v>vvv>^<><<>^>< )
( ^>><>^v<><^vvv<^^<><v<<<<<><^v<<<><<<^^<v<^^^><^>>^<v^><<<^>>^v<v^v<v^ )
( >^>>^v>vv>^<<^v<>><<><<v<<v><>v<^vv<<<>^^v^>^^>>><<^v>>v^v><^^>>^<>vv^ )
( <><^^>^^^<><vvvvv^v<v<<>^v<v>v<<^><<><<><<<^^<<<^<<>><<><^^^>^^<>^>v<> )
( ^^>vv<^v^v<vv>^<><v<^v>^^^>>>^^vvv^>vvv<>>>^<^>>>>>^<<^v>^vvv<>^<><<v> )
( v^^>>><<^^<>>^v^<v^vv<>v^<<>^<^v^v><^<<<><<^<v><v<>vv>>v><v^<vv<>v^<<^ )
( There is no win condition to get to the next level, just copy and paste the below and paste it into the first level )
##############
##......##..##
##..........##
##....[][]@.##
##....[]....##
##..........##
##############
( <vv<<^^<<^^ )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment