(The game Pegs for the TI-83+ graphing calculator, ported to the PuzzleScript engine.) (The original Pegs was part of PuzzPack by Detached Solutions, and its main developer was Fred Coughlin. This port is by Rory O’Kane.) title Pegs author Fred Coughlin / Rory O'Kane homepage http://roryokane.com/ (homepage of the original Pegs is http://www.detachedsolutions.com/puzzpack/pegs.php) background_color LightGray text_color Black key_repeat_interval 0.25 (to prevent accidental falling down pits, etc.) run_rules_on_level_start (to draw hole boundaries) ======== OBJECTS ======== (some colors chosen using HUSL: http://boronine.com/husl/) (also mixed some colors using http://www.colorhexa.com/) Background White NormalSolidBlock #111 #222 #444 #555 #bbb 10001 02420 04340 02420 10001 CreatedSolidBlock (mixed with 25% triangle colors) (first two colors mixed with triangle outline, the rest with fill) #141d18 #202a25 #5d6b63 #6a7870 #b6c5bc 10001 02420 04340 02420 10001 NormalPlayer (Orange = #eb8931) (HUSL Lightnesses 66, 63, 58, 54) #eb8931 #db7f2d #cd762a #be6d26 .010. 0.2.0 12321 0.2.0 .010. SelectingPlayer (HUSL Lightnesses 88, 84, 80, 76) #dddddd #d1d1d1 #c6c6c6 #bbbbbb .010. 0.2.0 12321 0.2.0 .010. (peg colors are HUSL pastel Saturation 100%, Lightness 25% and 85%) (insides of selected pegs are 50% Saturation) Circle #3b3d1c #d4d8a8 (hue 90, yellow) .000. 01110 01110 01110 .000. SelectedCircle #db7f2d #d4d6bf .000. 01110 01110 01110 .000. Square #1a404e #acdbf3 (hue 225, blue) 00000 01110 01110 01110 00000 SelectedSquare #db7f2d #c2d8e4 00000 01110 01110 01110 00000 Triangle #1b432e #a8e1c0 (hue 145, green) 0.... 00... 010.. 0110. 00000 SelectedTriangle #db7f2d #bfdbca 0.... 00... 010.. 0110. 00000 Cross #543239 (hue 0, red) ..0.. ..0.. 00000 ..0.. ..0.. SelectedCross #db7f2d ..0.. ..0.. 00000 ..0.. ..0.. EmptyHole Black (the colors of falling pegs have 50% of original Lightness) HoleWithFallingCircle Black #20220d #64664e 00000 00100 01210 00100 00000 HoleWithFallingTriangle Black #0c2518 #4e6b5a 00000 01000 01200 01110 00000 HoleWithFallingCross Black #301b1f 00000 00100 01110 00100 00000 HoleWithFallingPlayer (player colors are based on the second and fourth normal colors) Black #6e3d11 #61350e 00000 00100 01210 00100 00000 HoleWithSettlingSquare #499cbb #d6ecf9 (lightened by 45%) 00000 01110 01110 01110 00000 FilledHole #ebf6fd #fbfdfe (lightened by 90%) 00000 01110 01110 01110 00000 HoleBoundaryUp #222 00000 ..... ..... ..... ..... HoleBoundaryRight #222 ....0 ....0 ....0 ....0 ....0 HoleBoundaryDown #222 ..... ..... ..... ..... 00000 HoleBoundaryLeft #222 0.... 0.... 0.... 0.... 0.... InvisibleDeadPlayer White ..... ..... ..... ..... ..... ======= LEGEND ======= Player = NormalPlayer or SelectingPlayer or InvisibleDeadPlayer SelectedBlock = SelectedCircle or SelectedSquare or SelectedTriangle or SelectedCross Block = Circle or Square or Triangle or Cross or SelectedBlock SolidBlock = NormalSolidBlock or CreatedSolidBlock Hole = EmptyHole or HoleWithFallingCircle or HoleWithFallingTriangle or HoleWithFallingCross or HoleWithFallingPlayer HoleBoundary = HoleBoundaryUp or HoleBoundaryRight or HoleBoundaryDown or HoleBoundaryLeft . = Background · = Background P = NormalPlayer ✠ = NormalPlayer X = NormalSolidBlock ⛝ = NormalSolidBlock # = EmptyHole ■ = EmptyHole o = Circle ○ = Circle s = Square □ = Square \ = Triangle ◺ = Triangle + = Cross ✚ = Cross ======= SOUNDS ======= (block interaction sounds) Block move 16776907 sfx0 57315905 (destroy by combining matching blocks) sfx1 93422102 (combine triangles, forming a wall) sfx2 29154902 (combine crosses, starting replacement selection) sfx3 39221701 (push block down hole) sfx4 9351102 (fill hole with square block) sfx5 60846506 (cycle selected block) sfx6 57903306 (confirm selection) (failure sounds) sfx9 36821508 (combined blocks don't match) sfx10 3824708 (player falls in hole) (game sounds) undo 418707 startlevel 27686900 restart 73263508 endlevel 2807108 ================ COLLISIONLAYERS ================ Background FilledHole, HoleWithSettlingSquare Player, SolidBlock, Hole, Block, SelectedBlock HoleBoundaryUp HoleBoundaryRight HoleBoundaryDown, HoleBoundaryLeft (ran out of unique layers; down boundaries will be overwritten sometimes) ====== RULES ====== (you can't move when you're dead) [ > InvisibleDeadPlayer ] -> [ InvisibleDeadPlayer ] [ Action InvisibleDeadPlayer ] -> restart (allow scrolling through selections without moving player) DOWN [ > SelectingPlayer ] [ SelectedTriangle ] -> [ SelectingPlayer ] [ SelectedCross ] sfx5 (simpler rules like this don't work for some reason: DOWN [ SelectedTriangle ] -> [ SelectedCross ]) DOWN [ > SelectingPlayer ] [ SelectedCross ] -> [ SelectingPlayer ] [ SelectedSquare ] sfx5 DOWN [ > SelectingPlayer ] [ SelectedSquare ] -> [ SelectingPlayer ] [ SelectedCircle ] sfx5 DOWN [ > SelectingPlayer ] [ SelectedCircle ] -> [ SelectingPlayer ] [ SelectedTriangle ] sfx5 UP [ > SelectingPlayer ] [ SelectedTriangle ] -> [ SelectingPlayer ] [ SelectedCircle ] sfx5 UP [ > SelectingPlayer ] [ SelectedCircle ] -> [ SelectingPlayer ] [ SelectedSquare ] sfx5 UP [ > SelectingPlayer ] [ SelectedSquare ] -> [ SelectingPlayer ] [ SelectedCross ] sfx5 UP [ > SelectingPlayer ] [ SelectedCross ] -> [ SelectingPlayer ] [ SelectedTriangle ] sfx5 [ > SelectingPlayer ] -> [ SelectingPlayer ] (action confirms selection) [ Action SelectingPlayer ] [ SelectedCircle ] -> [ NormalPlayer ] [ Circle ] sfx6 [ Action SelectingPlayer ] [ SelectedSquare ] -> [ NormalPlayer ] [ Square ] sfx6 [ Action SelectingPlayer ] [ SelectedTriangle ] -> [ NormalPlayer ] [ Triangle ] sfx6 [ Action SelectingPlayer ] [ SelectedCross ] -> [ NormalPlayer ] [ Cross ] sfx6 (player can push blocks) [ > Player | Block ] -> [ > Player | > Block ] (square pegs fill holes; other pegs fall in and disappear) (when you fall down a hole, you must reset or undo) (finish falling animations:) [ HoleWithSettlingSquare ] -> [ FilledHole ] [ HoleWithFallingCircle ] -> [ EmptyHole ] [ HoleWithFallingTriangle ] -> [ EmptyHole ] [ HoleWithFallingCross ] -> [ EmptyHole ] [ HoleWithFallingPlayer ] -> [ EmptyHole ] message You fell and died. (trigger falling animations:) [ > Square | Hole ] -> [ | HoleWithSettlingSquare ] sfx4 again [ > Circle | Hole ] -> [ | HoleWithFallingCircle ] sfx3 again [ > Triangle | Hole ] -> [ | HoleWithFallingTriangle ] sfx3 again [ > Cross | Hole ] -> [ | HoleWithFallingCross ] sfx3 again [ > Player | Hole ] -> [ InvisibleDeadPlayer | HoleWithFallingPlayer ] sfx10 again (draw hole boundaries) UP [ Hole no HoleBoundaryUp | no Hole ] -> [ Hole HoleBoundaryUp | no Hole ] RIGHT [ Hole no HoleBoundaryRight | no Hole ] -> [ Hole HoleBoundaryRight | no Hole ] DOWN [ Hole no HoleBoundaryDown | no Hole ] -> [ Hole HoleBoundaryDown | no Hole ] LEFT [ Hole no HoleBoundaryLeft | no Hole ] -> [ Hole HoleBoundaryLeft | no Hole ] (remove hole boundaries when the hole disappears) [ HoleBoundary no Hole ] -> [ ] (some pegs disappear when combined) [ > Circle | Circle ] -> [ | ] sfx0 [ > Square | Square ] -> [ | ] sfx0 (combined triangles turn into a solid block) [ > Triangle | Triangle ] -> [ | CreatedSolidBlock ] sfx1 (combined crosses let you freely select a replacement) [ > Cross | Cross ] [ > Player ] -> [ | SelectedTriangle ] [ > SelectingPlayer ] sfx2 (player gets scolded if non-matching pegs are combined) [ > Circle | Block no Circle ] -> [ Circle | Block ] sfx9 message They don't match. [ > Triangle | Block no Triangle ] -> [ Triangle | Block ] sfx9 message They don't match. [ > Square | Block no Square ] -> [ Square | Block ] sfx9 message They don't match. [ > Cross | Block no Cross ] -> [ Cross | Block ] sfx9 message They don't match. ============== WINCONDITIONS ============== No Block ======= LEVELS ======= (help) message To beat each level you must message destroy all of the pegs. message If two like pegs are message pushed into each other message they disappear, message except for triangles message which form a solid block message and plusses which allow you to message choose a replacement block. XXXXXXXXXXXX X··········X X···P··o···X X····++\···X X···□■·o···X X··········X X··········X XXXXXXXXXXXX message Nice Pegging!!! XXXXXXXXXXXX XXX···\\···X XXX···X····X XXX···XX···X P···\\oo···X XXX···XX···X XXX···X····X XXX···\\···X message Nice Pegging!!! XXXXXXXXXXXX XXXXXXXXXXXX X·····\·P··· X·XX·XX·XX\X X··\·······X XXXXXXXXXX\X XXXXXXXXXXXX XXXXXXXXXXXX message Nice Pegging!!! XXXXXXXXXXXX ■·□·\·\····X ■·+·o·\····X ■·o·□P\····X ■·\·□·\·+··X ■·□·o·\····X ■·o·□·\····X XXXXXXXXXXXX message Nice Pegging!!! ·■■·□■··■··· ·■■·□□··■··\ \■■·■■■·X\\\ ·■■·■□■·X\·\ ·■■·■P■o■··· \■■·■■■·■··· ·■■·□···■··· ·■■··o··■oo· message Nice Pegging!!! P··········· \·········+· \··\···\\··· ·XX\XXXXXXX· ············ ·XXXX·XX·XXX ·+······o□■· ···XXXX··XXX message Nice Pegging!!! XXXX··XXXXXX XXX■··□■·XXX XXXX·XoX·XXX XXX\++P□\■XX XXXX·X\X···X XXXX··o··X·X XXXXXXX·XX·X XXXXXXX····X message Nice Pegging!!! XXXXXXXXXXXX ··+++++□++·· ··+++\++o+·· P·+++\++□+·· ··++□o++++·· ··++o\++++·· ··++\□++++·· XXXXXXXXXXXX message Nice Pegging!!! ····XX······ ·+··XX······ ····\□□+·XX· ·X··\X···XXX ···\\PX····\ ····\X··XXXX ·+X·\oo···+· ····□X······ message Nice Pegging!!! XXXX\XXX···· XXXX·XXX···P ··□·■■■···+· ·++·■■■·□+□· ·++·■■■·□+□· ····■■■·+··· XXXXX·XX···· XXXXX\XX···· message Nice Pegging!!! XPX·XX■··XXX X···o□■■·\\· X\X\·X■··\\· X··\·X···++· X\X··X·X·++· ·····X·XX·X· ·+□+·X·X···· ····\\\XXXXX message Nice Pegging!!! P·····XXXXXX X\X\X\XX···X ······X··X·X X\X\X\X····X ······XXoo■X X\X\X\XX·\\X ··········\X X·XXXXXX··XX message Nice Pegging!!! XXXXXXXXXXXX ··□·\·o·□··■ ··\·o·\·□··■ P·+·□·o·□··■ ··o·□·\·□··■ ··□·\·o·□··■ ··+·+·\·□··■ XXXXXXXXXXXX message Nice Pegging!!! XXXXX··X··XX XX·\··□··\·X X■··oX·XX··X XXX··+o+··XX XX··XX·Xo··■ XX·\··□···PX XX··X··XXXXX XXXXXXXXXXXX message Nice Pegging!!! ···■·■·■·■·X ···■·■·■·■·X ·+□■·■·■·■·\ ·□·■·■□■·■·X ·+·■·■·■·■·X P··■□■·■·■·X ··□■·■·■□■·X ··□■·■·■·■·X message Congratulations! message You finished Pegs!