Skip to content

Instantly share code, notes, and snippets.

@RuralAnemone
Last active October 11, 2023 02:14
Show Gist options
  • Save RuralAnemone/21069f2f9eacbbd0482b9f4866e453e6 to your computer and use it in GitHub Desktop.
Save RuralAnemone/21069f2f9eacbbd0482b9f4866e453e6 to your computer and use it in GitHub Desktop.
gem setter: puzzlescript edition (Puzzlescript Plus Script)

Play this game by going to https://auroriax.github.io/PuzzleScript/play.html?p=21069f2f9eacbbd0482b9f4866e453e6

View the source code in action at https://auroriax.github.io/PuzzleScript/editor.html?hack=21069f2f9eacbbd0482b9f4866e453e6


TODO

· yep yep yep this is just gonna be one big checklist

✅ add sliding

✅ sfx

✅ mark and unmark text tiles as read

✅ click on ice to switch sprites (baby steps :) lol)

⬜ make ice work

⬜ ice right click mechanism

⬜ switches (might expand on this later)

⬜ more levels (tutorial ones at least)

⬜ one ways (this will be hell without colliders :D )

⬜ add all (or at least necessary) sprites


devlog

  • this will all be just one gist from now on
  • (4.dec.22) finally got movement mechanism to work, although message boxes now re-trigger every .1 seconds after you close them...
  • (5.dec.22) adding mouse inputs...? also I need to find a way to have the messages not re-trigger
    maybe mark them as read/unread? idk
  • (5.dec.22) added sfx, tweaked runtime
  • (5.dec.22) oh god no I almost did it aaaaaaaaaaaaaaaaaaaaaaaaaaa
  • (6.dec.22) just as I thought; I needed to sleep on it. it's a lot more playable now lol
  • (6.dec.22) ice ice baby?
  • (6.dec.22) another update I think
  • (6.dec.22) there may have been changes uhhhh really jsut doing this so I can transfer between computers lol
  • (6.dec.22) finally, I made a texttile sprite :) (also no, as of now, you won't be able to play as tess the deuteragonist)
  • (6.dec.22) fixed a minor text error thing that was bothering me for a long time
  • (6.dec.22) this is enough for tonight my brain hurts 💀 anyways I think I fixed the texttiles
  • (6.dec.22) huh so I accidentally just read "texttiles" as "testicles"
    well anyways I've kinda decided to do more sprite work lol
  • (7.dec.22) more more MORE MORE MORE (but not the rest) sprite work
  • (10.dec.22) how am I not done with sprites ;-;
  • (10.dec.22) after hours of tweaking this is probably as good as I'll get the star sprites to look
  • (10.dec.22) screw it I'm not doing a custom font lol

  • (19.jan.23) oh right this exists... uh... well... finals/midterms... I'll work on it later... uhh....
  • (08.feb.23) hack
title gem setter: puzzlescript edition
author Onefin + RuralAnemone
homepage www.puzzlescript.net
youtube OsVVOcOb-r4
( youtube mTF4GJcSapE (no? ok) )
sprite_size 16
color_palette 14
( noaction )
realtime_interval 0.05
again_interval 0.05
tween_length 0.069
runtime_metadata_twiddling
mouse_left MouseDown
mouse_drag MouseDrag
mouse_right MouseDownRight
skip_title_screen (I'd love to in order to preserve the port's authenticity but also it doesn't load the font so uh )
continue_is_level_select
level_select
( level_select_solve_symbol ✓ )
message_text_align left
text_message_continue Press space to continue
( text_controls use wasd or the arrow keys to move. )
( debug )
( verbose_logging )
========
OBJECTS
========
RigidMarker
transparent
MouseDown
( black white #a60101 #cf0101 #f00 #05f #3aceff #beeeef00 )
transparent transparent transparent transparent transparent transparent transparent transparent
7777777777777777
7777777777777777
7777000007777777
7770444440777777
7704444444077777
7700004444000777
7061650444044077
7055550444033077
7700004444033077
7703344433033077
7703333333022077
7703330333000777
7703307033077777
7703307033077777
7770077700777777
7777777777777777
MouseDrag copy:MouseDown
( black white #a60101 #cf0101 #f00 #05f #3aceff #beeeef00 )
transparent transparent transparent transparent transparent transparent transparent transparent
MouseDownRight (copy:MouseDrag) copy:MouseDown
( black white #a60101 #cf0101 #f00 #05f #3aceff #beeeef00 )
transparent transparent transparent transparent transparent transparent transparent transparent
Background
#5f639c #595e92
0000000000000000
0111111111111110
0100000000000010
0100000000000010
0100000000000010
0100000000000010
0100000000000010
0100000000000010
0100000000000010
0100000000000010
0100000000000010
0100000000000010
0100000000000010
0100000000000010
0111111111111110
0000000000000000
TextTile_master
#00000041 white #666 #f79eff
..000000000000..
.00000000000000.
0000000333000000
0000333333333000
0003333111333300
0003333131333300
0033333331333330
0033333313333330
0033333333333330
0003333313333300
0000333333333000
0003003333300000
0030000000000000
0000000000000000
.00000000000000.
..000000000000..
TextTile_1_1_unread copy:TextTile_master
#00000041 white #666 #f79eff
TextTile_1_1_read copy:TextTile_master
#00000041 white #666 #f79eff
TextTile_2_1_unread copy:TextTile_master
#00000041 white #666 #f79eff
TextTile_2_1_read copy:TextTile_master
#00000041 white #666 #f79eff
TextTile_2_2_unread copy:TextTile_master
#00000041 white #666 #f79eff
TextTile_2_2_read copy:TextTile_master
#00000041 white #666 #f79eff
TextTile_3_1_unread copy:TextTile_master
#00000041 white #666 #f79eff
TextTile_3_1_read copy:TextTile_master
#00000041 white #666 #f79eff
Target_master
black white
0000111100001111
0000111100001111
0000111100001111
0000111100001111
1111000011110000
1111000011110000
1111000011110000
1111000011110000
0000111100001111
0000111100001111
0000111100001111
0000111100001111
1111000011110000
1111000011110000
1111000011110000
1111000011110000
Target_unread copy:Target_master
black white
Target_read copy:Target_master
black white
WallSolid
#8a8aff
WallShadow
#8a8aff #7878de
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
1111111111111111
1111111111111111
1111111111111111
1111111111111111
Player
white #ff7ff7 #e580e0 #ffb2ff
..111111111111..
.31111111111112.
.31111111111112.
3311111111111122
3311111111111122
3311111111110022
3311111001110022
3311111001110022
3311111001111122
3311111111111122
3322222220222222
3122222222000222
1122222222222222
1122222222222222
.12222222222222.
..222222222222..
DriftLeft copy:Player
white #ff7ff7 #e580e0 #ffb2ff
DriftRight copy:Player
white #ff7ff7 #e580e0 #ffb2ff
DriftUp copy:Player
white #ff7ff7 #e580e0 #ffb2ff
DriftDown copy:Player
white #ff7ff7 #e580e0 #ffb2ff
Ice_untouched
white #94e4e7bd #a2fbffbd #a2fbff7d
.33333333333033.
3333333333333033
3333333333333303
3111111111111110
1222222222222222
2222222222222222
2222222222222222
2222222222222222
2222222222222222
0222222222222222
2022222222222222
2202222222222222
1220222222222222
1111111111111111
1111111111111111
.11111111111111.
Ice_grab copy:Ice_untouched
white #e794e4bd #ffa3f9bd #ffa3f97d
Fire_active
#ff4c63 #e73a5f
................
.01..01..01..01.
0011001100110011
0..10..10..10..1
.01..01..01..01.
0011001100110011
0..10..10..10..1
.01..01..01..01.
0011001100110011
0..10..10..10..1
.01..01..01..01.
0011001100110011
0..10..10..10..1
.01..01..01..01.
0011001100110011
0..10..10..10..1
Fire_inactive
#753947 #5a2c37
................
................
0011001100110011
0011001100110011
................
0011001100110011
0011001100110011
................
0011001100110011
0011001100110011
................
0011001100110011
0011001100110011
................
0011001100110011
0011001100110011
SwitchToggle_square_unfilled
#ff7 transparent
................
................
................
...0000000000...
...0........0...
...0.111111.0...
...0.111111.0...
...0.111111.0...
...0.111111.0...
...0.111111.0...
...0.111111.0...
...0........0...
...0000000000...
................
................
................
SwitchToggle_square_filled copy:SwitchToggle_square_unfilled
#ff7 #ff7
SwitchBlock_square_active
#ff7 #dede68 #efef70
0000000000000000
0222222222222220
0200000000000020
0200000000000020
0200000000000020
0200001111000020
020000....000020
020000....000020
020000....000020
0200000000000020
0200000000000020
0222222222222220
0000000000000000
1111111111111111
1111111111111111
1111111111111111
SwitchBlock_square_inactive
#fff67888 #eeef6588
0000000000000000
0111111111111110
0100000000000010
0100000000000010
0100000000000010
0100000000000010
010000....000010
010000....000010
010000....000010
010000....000010
0100000000000010
0100000000000010
0100000000000010
0100000000000010
0111111111111110
0000000000000000
SwitchToggle_diamond_unfilled
#77ff82 transparent
................
................
........0.......
.......0.0......
......0...0.....
.....0..1..0....
....0..111..0...
...0..11111..0..
..0..1111111..0.
...0..11111..0..
....0..111..0...
.....0..1..0....
......0...0.....
.......0.0......
........0.......
................
SwitchToggle_diamond_filled copy:SwitchToggle_diamond_unfilled
#77ff82 #77ff82
SwitchBlock_diamond_active
#77ff82 #68de71 #70ef7a
0000000000000000
0222222222222220
0200000000000020
0200000010000020
0200000111000020
0200001111100020
0200011111110020
02000011.1100020
0200000...000020
02000000.0000020
0200000000000020
0222222222222220
0000000000000000
1111111111111111
1111111111111111
1111111111111111
SwitchBlock_diamond_inactive
#77ff8288 #68de7188
0000000000000000
0111111111111110
0100000000000010
0100000000000010
01000000.0000010
0100000...000010
010000.....00010
01000.......0010
010000.....00010
0100000...000010
01000000.0000010
0100000000000010
0100000000000010
0100000000000010
0111111111111110
0000000000000000
SwitchToggle_yoink_unfilled
#f77 transparent
................
................
........0.......
.......0.0......
..00000...00000.
...0....1....0..
....0.11111.0...
.....0.111.0....
.....0.111.0....
....0.11111.0...
...0....1....0..
..00000...00000.
.......0.0......
........0.......
................
................
SwitchToggle_yoink_filled copy:SwitchToggle_yoink_unfilled
#f77 #f77
SwitchBlock_yoink_active
#f77 #de6868 #ef7070
0000000000000000
0222222222222220
0200000000000020
0200000000000020
0200000110000020
0200011111100020
0200001111000020
0200011..1100020
0200000..0000020
0200000000000020
0200000000000020
0222222222222220
0000000000000000
1111111111111111
1111111111111111
1111111111111111
SwitchBlock_yoink_inactive
#ff777788 #de686888
0000000000000000
0111111111111110
0100000000000010
0100000000000010
0100000000000010
0100000000000010
0100000..0000010
01000......00010
010000....000010
01000......00010
0100000..0000010
0100000000000010
0100000000000010
0100000000000010
0111111111111110
0000000000000000
=======
LEGEND
=======
. = Background
# = WallSolid
_ = WallShadow
P = Player
\ = Ice_untouched
@ = Ice_untouched and Target_unread
O = Target_unread
* = Fire_active ( no you can't build with inactive fire )
q = SwitchToggle_square_filled
w = SwitchBlock_square_active
e = SwitchBlock_square_inactive
r = TextTile_1_1_unread
t = TextTile_2_1_unread
y = TextTile_2_2_unread
u = TextTile_3_1_unread
i = SwitchToggle_square_unfilled
a = SwitchToggle_diamond_unfilled
s = SwitchToggle_diamond_filled
d = SwitchBlock_diamond_inactive
f = SwitchBlock_diamond_active
g = SwitchBlock_yoink_inactive
h = SwitchBlock_yoink_active
j = SwitchToggle_yoink_filled
k = SwitchToggle_yoink_unfilled
(debug)
( ; = Ice_grab )
( i = Fire_inactive )
( don't look )
TextTile_read = TextTile_1_1_read or TextTile_2_1_read or TextTile_2_2_read or TextTile_3_1_read
TextTile_unread = TextTile_1_1_unread or TextTile_2_1_unread or TextTile_2_2_unread or TextTile_3_1_unread
Target = Target_master or Target_unread or Target_read
Mouse = MouseDown or MouseDrag or MouseDownRight (actually I can't do this! the compiler yells at me! yay! see COLLISIONLAYERS for more info I guess! wow!)
SwitchBlocks_square = SwitchBlock_square_active or SwitchBlock_square_inactive
SwitchBlocks_diamond = SwitchBlock_diamond_active or SwitchBlock_diamond_inactive
SwitchBlocks_yoink = SwitchBlock_yoink_active or SwitchBlock_yoink_inactive
SwitchBlocks_active = SwitchBlock_square_active or SwitchBlock_diamond_active or SwitchBlock_yoink_active
SwitchBlocks_inactive = SwitchBlock_square_inactive or SwitchBlock_diamond_inactive or SwitchBlock_yoink_inactive
SwitchToggles_square = SwitchToggle_square_unfilled or SwitchToggle_square_filled
SwitchToggles_diamond = SwitchToggle_diamond_unfilled or SwitchToggle_diamond_filled
SwitchToggles_yoink = SwitchToggle_yoink_unfilled or SwitchToggle_yoink_filled
SwitchToggles = SwitchToggles_square or SwitchToggles_diamond or SwitchToggles_yoink
SwitchBlocks = SwitchBlocks_active or SwitchBlocks_inactive
Ice = Ice_untouched or Ice_grab
TextTile = TextTile_master or TextTile_unread or TextTile_read
Wall = WallSolid or WallShadow
Solid = Wall or Ice_untouched or SwitchBlocks_active or Fire_active
Intangible = Fire_inactive or TextTile or SwitchBlocks_inactive or SwitchToggles (or Mouse)
Drift = DriftLeft or DriftRight or DriftUp or DriftDown
PD = Drift or Player
( you can look now )
=======
SOUNDS
=======
sfx0 771508 (death)
sfx1 27714507 (move)
sfx2 12364504 (hit solid)
sfx3 60377707 (flp switch)
sfx4 58874303 (ice connect)
sfx5 32558708 (ice disconnect)
sfx6 47698303 (texttile until further notice)
sfx10 6712508 (win until further notice)
================
COLLISIONLAYERS
================
(fine here you go they're all on separate layers)
MouseDown
MouseDrag
MouseDownRight
(anyways,)
===========
( Mouse )
Background
Target
RigidMarker
Intangible
Solid, Player, Drift, Ice_grab
======
RULES
======
[ Player no RigidMarker ] -> [ Player RigidMarker ]
=====================================================================
( movement )
=====================================================================
( start )
[ > RigidMarker | Solid ] -> cancel
left [ left Player ] -> [ left DriftLeft ] sfx1
+ right [ right Player ] -> [ right DriftRight ] sfx1
+ up [ up Player ] -> [ up DriftUp ] sfx1
+ down [ down Player ] -> [ down DriftDown ] sfx1
( mid-move )
( startloop )
left [ stationary DriftLeft ] -> [ left DriftLeft ] again sfx1
+ right [ stationary DriftRight ] -> [ right DriftRight ] again sfx1
+ up [ stationary DriftUp ] -> [ up DriftUp ] again sfx1
+ down [ stationary DriftDown ] -> [ down DriftDown ] again sfx1
( end )
left [ DriftLeft | Solid ] -> [ Player | Solid ] sfx2
+ right [ DriftRight | Solid ] -> [ Player | Solid ] sfx2
+ up [ DriftUp | Solid ] -> [ Player | Solid ] sfx2
+ down [ DriftDown | Solid ] -> [ Player | Solid ] sfx2
( endloop )
=====================================================================
( ice )
=====================================================================
(grab)
[ MouseDown Ice_untouched | Player ] -> [ Ice_grab RigidMarker | Player ] sfx4
[ MouseDown Ice_grab RigidMarker | Player ] -> [ Ice_untouched | Player ] sfx5
( [ MouseDown Ice_untouched | Ice_grab ] )
(drag)
[]->[]
(right click)
[]->[]
(rigid movement)
( [ moving PD | Ice_grab ] -> [ moving PD | moving Ice_grab ] )
=====================================================================
( switches )
=====================================================================
( [ PD SwitchToggles_square ] -> find any square switch blocks and flip their state. GODDAMMIT I NEED BOOLEAN AAAAAAAAAAA )
=====================================================================
( messages )
=====================================================================
[ Player TextTile_unread ] -> sfx6
[ Player TextTile_1_1_unread ] -> [ Player TextTile_1_1_read ] message use wasd or the arrow keys to move. yeah, like that!
[ Player TextTile_2_1_unread ] -> [ Player TextTile_2_1_read ] message click on neighboring ice blocks to connect them.
[ Player TextTile_2_2_unread ] -> [ Player TextTile_2_2_read ] message you can also right click to connect many ice blocks at once.
( maybe??? I think????? ) (edit: yep! at least it's possible!)
[ Drift | TextTile_1_1_read ] -> [ Drift | TextTile_1_1_unread ]
[ Drift | TextTile_2_1_read ] -> [ Drift | TextTile_2_1_unread ]
[ Drift | TextTile_2_2_read ] -> [ Drift | TextTile_2_2_unread ]
[ Drift | TextTile_3_1_read ] -> [ Drift | TextTile_3_1_unread ]
=====================================================================
( win )
=====================================================================
(me when the, uh, your mom?!)
[ Player Target_unread ] -> [ Player Target_read ] sfx10 message complete!\n\npress space to advance\nor esc to exit.
=====================================================================
( cleanup )
=====================================================================
[Mouse] -> []
=====================================================================
( debug )
=====================================================================
( [> player]->[> player] )
( [ > player | Ice ] -> [> player | > ice] )
( [> player | ice | ice] ->[> player|> ice|> ice] )
[action Player][SwitchBlock_square_active] -> [Player][SwitchBlock_square_inactive]
[action player][SwitchBlock_square_inactive] -> [Player][SwitchBlock_square_active]
[action Player][SwitchBlock_diamond_active] -> [Player][SwitchBlock_diamond_inactive]
[action player][SwitchBlock_diamond_inactive] -> [Player][SwitchBlock_diamond_active]
[action player][SwitchBlock_yoink_inactive] -> [Player][SwitchBlock_yoink_active]
[action player][SwitchBlock_yoink_active] -> [Player][SwitchBlock_yoink_inactive]
==============
WINCONDITIONS
==============
( pretend I commented some comment markers here because I actually need this to be uncommented uhh )
some Player on Target_read (needs a message, see rules)
=======
LEVELS
=======
section about movement
message press mute and then unmute (top right) to play the music if you'd like
message I forget exactly what it is but as far as I know browsers don't let audio automatically play
message and all the music player is doing is iframe-ing a youtube video with display:none
message oh well :)
message minor inconvenience
message lol
message ...
message
message so,
message
message do you still want to play?\n\nY | N
message no you don't
message this is a mess
message anyways
message
message
message
message guh
message
#____####__#____#
#p..r_#__..#....#
#___..#...._._..#
#....._......o._#
#........_.#....#
##....#....#.._.#
##....#....##...#
#################
section debug
message skip this, it's a debug level lol
#___#
#p.e#
#...#
#q.i#
#####
section debug also
message skip this, it's a debug level lmao
#_____#
#.....#
#.....#
#.p\..#
#.....#
#.....#
#######
section debug?
message skip this, it's a debug level?
#___#
#p.d#
#...#
#s.a#
#####
section debug!
message skip this, it's a debug level!
#___#
#p.g#
#...#
#j.k#
#####
section about ice
(#pt;...#)
#______#
#pt\...#
##__#y##
##..#\##
##.._\##
##...._#
##....o#
#####.##
########
@RuralAnemone
Copy link
Author

help I have been sucked into the event horizon which is puzzlescript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment