Skip to content

Instantly share code, notes, and snippets.

@bbb651
Last active March 23, 2024 22:56
Show Gist options
  • Select an option

  • Save bbb651/b6c9beec2ece1819e98a5a79f7540e68 to your computer and use it in GitHub Desktop.

Select an option

Save bbb651/b6c9beec2ece1819e98a5a79f7540e68 to your computer and use it in GitHub Desktop.
Sokogram (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Sokogram
author bbb651
homepage github.com/bbb651
========
OBJECTS
========
Background .
black #1b1b1b
00000
00000
00100
00000
00000
Player p
red
Indicator
red
.....
.....
..0..
.....
.....
Goal $
green
Target o
lightblue
.....
.000.
.0.0.
.000.
.....
SolidZero 0
black white
00000
01100
01010
01010
00110
SolidOne 1
black white
00000
00100
00100
00100
00100
SolidTwo 2
black white
00000
01100
00010
00100
01110
SolidThree 3
black white
00000
01100
00110
00010
01100
SolidFour 4
black white
00000
01010
01010
00110
00010
SolidFive 5
black white
00000
01110
01100
00110
01100
GhostOne ₁
black darkgray
00000
00100
00100
00100
00100
GhostTwo ₂
black darkgray
00000
01100
00010
00100
01110
MinusOne -
black lightred
00000
00010
11010
00010
00010
( Push into a number to modify it )
( AddOne + )
( #1b1b1b white black )
( 00000 )
( 01221 )
( 11121 )
( 01221 )
( 00000 )
Crate *
brown
00000
0...0
0...0
0...0
00000
Mirror m
orange lightblue
00000
01110
01110
01110
00000
Once
transparent
Active
transparent
Done
transparent
Mirrored
transparent
=======
LEGEND
=======
@ = Crate and Target
Push = Crate or Mirror
Solid = Push or Player or 0 or 1 or 2 or 3 or 4 or 5 or MinusOne
One = SolidOne or GhostOne
Two = SolidTwo or GhostTwo
Mover = Mirror or 0 or One or Two or 3 or 4 or 5 or MinusOne
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
Goal, Target
Mover
Indicator
Player, Crate
Once
Active, Done
Mirrored
======
RULES
======
[> Player] -> [> Player Once]
+ [< Player Mirrored Once | ... | Mover no Done] -> [< Player Mirrored | ... | Mover Active]
+ [> Player Once | ... | Mover no Done] -> [> Player | ... | Mover Active]
+ [> Player Mirrored] [Mirror Active] -> [> Player] [Mirror Done]
+ [> Player] [Mirror Active] -> [> Player Mirrored] [Mirror Done]
+ [> Player] [0 Active] -> [ Player] [0 Done]
+ [> Player | no Solid] [One Active] -> [ | Player] [One Done]
+ [> Player | Push | no Solid] [One Active] -> [ | Player | Push] [One Done]
+ [> Player | | no Solid] [Two Active] -> [ | | Player] [Two Done]
+ [> Player | | Push | no Solid] [Two Active] -> [ | | Player | Push] [Two Done]
+ [> Player | | | no Solid] [3 Active] -> [ | | | Player] [3 Done]
+ [> Player | | | Push | no Solid] [3 Active] -> [ | | | Player | Push] [3 Done]
+ [> Player | | | | no Solid] [4 Active] -> [ | | | | Player] [4 Done]
+ [> Player | | | | Push | no Solid] [4 Active] -> [ | | | | Player | Push] [4 Done]
+ [> Player | | | | | no Solid] [5 Active] -> [ | | | | | Player] [5 Done]
+ [> Player | | | | | Push | no Solid] [5 Active] -> [ | | | | | Player | Push] [5 Done]
+ [< Player | no Solid] [MinusOne Active] -> [ | Player] [MinusOne Done]
+ [< Player | Push | no Solid] [MinusOne Active] -> [ | Player | Push] [MinusOne Done]
+ [Active] -> [Done]
[Done] -> []
[Mirrored] -> []
[> Player] -> cancel
(⚠ Horrible code ahead, proceed with caution ⚠)
[Player] [Indicator] -> [Player up Indicator] [Indicator]
[action Player no Indicator] -> [Player up Indicator]
[action Player Indicator] -> [Player]
[Indicator no Player] -> []
STARTLOOP
[Player] -> [Player Once]
+ [< Indicator Mirrored Once | ... | Mover no Done] -> [< Indicator Mirrored | ... | Mover Active]
+ [> Indicator Once | ... | Mover no Done] -> [> Indicator | ... | Mover Active]
+ [> Indicator Mirrored] [Mirror Active] -> [> Indicator] [Mirror Done]
+ [> Indicator] [Mirror Active] -> [> Indicator Mirrored] [Mirror Done]
+ [> Indicator] [0 Active] -> [ Player ] [0 Done]
+ [> Indicator | no Solid] [One Active] -> [ | > Indicator] [One Done]
+ [> Indicator | Push | no Solid] [One Active] -> [ | > Indicator Push | ] [One Done]
+ [> Indicator | | no Solid] [Two Active] -> [ | | > Indicator] [Two Done]
+ [> Indicator | | Push | no Solid] [Two Active] -> [ | | > Indicator Push | ] [Two Done]
+ [> Indicator | | | no Solid] [3 Active] -> [ | | | > Indicator] [3 Done]
+ [> Indicator | | | Push | no Solid] [3 Active] -> [ | | | > Indicator Push | ] [3 Done]
+ [> Indicator | | | | no Solid] [4 Active] -> [ | | | | > Indicator] [4 Done]
+ [> Indicator | | | | Push | no Solid] [4 Active] -> [ | | | | > Indicator Push | ] [4 Done]
+ [> Indicator | | | | | no Solid] [5 Active] -> [ | | | | | > Indicator] [5 Done]
+ [> Indicator | | | | | Push | no Solid] [5 Active] -> [ | | | | | > Indicator Push | ] [5 Done]
+ [< Indicator | no Solid] [MinusOne Active] -> [ | < Indicator] [MinusOne Done]
+ [< Indicator | Push | no Solid] [MinusOne Active] -> [ | < Indicator Push | ] [MinusOne Done]
+ [Active] -> [Done]
[Done] -> []
[Mirrored] -> []
(Rotate indicator direction)
[Player] [right Indicator] -> [Player] [Indicator]
[Player] [left Indicator] -> [Player right Indicator] [Indicator]
[Player] [down Indicator] -> [Player left Indicator] [Indicator]
[Player] [up Indicator] -> [Player down Indicator] [Indicator]
ENDLOOP
==============
WINCONDITIONS
==============
all Goal on Player
all Target on Push
=======
LEVELS
=======
( ........ )
( .1121... )
( .1.o-... )
( .1..121. )
( .1@p..2. )
( .2..*.₁. )
( .1..125. )
( .1111... )
( ........ )
....13..
..1...2.
2....p.1
..*03...
...1....
...2.4$.
..2..12.
.....35.....
.2*.....4...
.0$.3.......
5.4...p.2...
..13.....4..
2..*......3.
......**...1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment