Skip to content

Instantly share code, notes, and snippets.

@chz16
Created April 8, 2016 10:19
Show Gist options
  • Save chz16/050f6f41b9b3f1292bc82c9f08e1ab13 to your computer and use it in GitHub Desktop.
Save chz16/050f6f41b9b3f1292bc82c9f08e1ab13 to your computer and use it in GitHub Desktop.
Telefrag code
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
(version 1.0)
title Telefrag
author CHz
homepage quiteajolt.com
again_interval 0.5
norepeat_action
run_rules_on_level_start
========
OBJECTS
========
Background
#DDDDDD
Wall
#7F552C
Goal
Yellow
Pit
Black
PlayerUp
Black Orange
.0.0.
.000.
.111.
01110
01110
PlayerRight
Black Orange
00...
11100
1110.
11100
00...
PlayerDown
Black Orange
01110
01110
.111.
.000.
.0.0.
PlayerLeft
Black Orange
...00
00111
.0111
00111
...00
Speck
White
.....
.....
..0..
.....
.....
SpeckMessageA
Transparent
SpeckMessageB
Transparent
Block1
#AA0000 #FF0000 #FFFFFF
00000
01110
02220
01110
00000
Floor1
#FF0000 #FFFFFF
.....
.000.
.111.
.000.
.....
FilledPit1
#550000 #880000 #888888
00000
01110
02220
01110
00000
Block2
#00AA00 #00FF00 #FFFFFF
00000
01210
01210
01210
00000
Floor2
#00FF00 #FFFFFF
.....
.010.
.010.
.010.
.....
FilledPit2
#005500 #008800 #888888
00000
01210
01210
01210
00000
TerminalPlaceholder
Red
Terminal1
#555555 Black #003300
00000
02210
01110
01220
00000
Terminal2
#555555 Black #003300
00000
02210
01110
02120
00000
Terminal3
#555555 Black #003300
00000
02120
01110
01220
00000
Terminal4
#555555 Black #003300
00000
02120
01110
02210
00000
Terminal5
#555555 Black #003300
00000
01220
01110
02210
00000
Terminal6
#555555 Black #003300
00000
01220
01110
02120
00000
=======
LEGEND
=======
. = Background
# = Wall
G = Goal
↑ = PlayerUp
→ = PlayerRight
↓ = PlayerDown
← = PlayerLeft
Player = PlayerUp or PlayerRight or PlayerDown or PlayerLeft
- = Pit
FilledPit = FilledPit1 or FilledPit2
1 = Block1 and Floor1
2 = Block2 and Floor2
Block = Block1 or Block2
! = TerminalPlaceholder and Floor1
@ = TerminalPlaceholder and Floor2
Terminal = Terminal1 or Terminal2 or Terminal3 or Terminal4 or Terminal5 or Terminal6
A = Pit and SpeckMessageA
B = Pit and SpeckMessageB
=======
SOUNDS
=======
sfx0 17530908 (reset blocks)
sfx1 26439904 (same as Player CantMove, manually invoked for pits)
Player CantMove 26439904
Block Move 18126307
FilledPit Create 31528704
Speck Create 16467901
ShowMessage 40724506
StartLevel 47176108
EndLevel 74636303
(80606908)
================
COLLISIONLAYERS
================
Background
Floor1, Floor2, Pit, FilledPit, Goal
Player, Wall, Block, Terminal, Speck
TerminalPlaceholder
SpeckMessageA, SpeckMessageB
======
RULES
======
(===============
USING TERMINALS
===============)
(Erase all blocks of the given type that aren't on a starting floors, including ones that are filling pits.)
[ACTION Player | Terminal Floor1] [Block1 no Floor1] -> [ACTION Player | Terminal Floor1] [ ]
[ACTION Player | Terminal Floor1] [FilledPit1] -> [ACTION Player | Terminal Floor1] [Pit]
(Fill in all starting floors that DON'T have the proper blocks on them with blocks. This check prevents the sound effect from playing if a terminal doesn't actually do anything.)
[ACTION Player | Terminal Floor1] [Floor1 no Block1 no Terminal] -> [ACTION Player | TerminalPlaceholder Terminal Floor1] [Block1 Floor1] sfx0
(Repeat for the other block type. Copy-pasting, yay.)
[ACTION Player | Terminal Floor2] [Block2 no Floor2] -> [ACTION Player | Terminal Floor2] [ ]
[ACTION Player | Terminal Floor2] [FilledPit2] -> [ACTION Player | Terminal Floor2] [Pit]
[ACTION Player | Terminal Floor2] [Floor2 no Block2 no Terminal] -> [ACTION Player | TerminalPlaceholder Terminal Floor2] [Block2 Floor2] sfx0
(===============
PLAYER MOVEMENT
===============)
UP [> Player] -> [> PlayerUp]
RIGHT [> Player] -> [> PlayerRight]
DOWN [> Player] -> [> PlayerDown]
LEFT [> Player] -> [> PlayerLeft]
(Pits are on a different collision layer for reasons, so manually block player movement into them.)
[> Player | Pit] -> [Player | Pit] sfx1
(==============
BLOCK MOVEMENT
==============)
[> Player | Block] -> [> Player | > Block]
late [Block1 Pit] -> [FilledPit1]
late [Block2 Pit] -> [FilledPit2]
(======================
TERMINAL RANDOMIZATION
======================)
(When the player hits a terminal, change the screen to something different than it's already showing.)
[TerminalPlaceholder Terminal1] -> [random Terminal2 random Terminal3 random Terminal4 random Terminal5 random Terminal6]
[TerminalPlaceholder Terminal2] -> [random Terminal1 random Terminal3 random Terminal4 random Terminal5 random Terminal6]
[TerminalPlaceholder Terminal3] -> [random Terminal1 random Terminal2 random Terminal4 random Terminal5 random Terminal6]
[TerminalPlaceholder Terminal4] -> [random Terminal1 random Terminal2 random Terminal3 random Terminal5 random Terminal6]
[TerminalPlaceholder Terminal5] -> [random Terminal1 random Terminal2 random Terminal3 random Terminal4 random Terminal6]
[TerminalPlaceholder Terminal6] -> [random Terminal1 random Terminal2 random Terminal3 random Terminal4 random Terminal5]
(On level start, just pick a random screen with no restrictions.)
[TerminalPlaceholder] -> [random Terminal1 random Terminal2 random Terminal3 random Terminal4 random Terminal5 random Terminal6]
(=================
DEATH, APPARENTLY
=================)
(You died. How did you even die? You did this on purpose, didn't you.)
[Speck] [SpeckMessageA] -> [Speck] [] message Okay, well, that's the easy place to die. Don't get too proud about having flung yourself into a pit.
[Speck] [SpeckMessageB] -> [Speck] [] message Okay, I'm legitimately impressed you died there. Now quit clowning around and rewind time already.
late [Player Pit] -> [Speck Pit] again
==============
WINCONDITIONS
==============
some Player on Goal
=======
LEVELS
=======
message Hey, use that forklift to clear a path through these blocks to the back so we can unload the trucks.
message If you mess up, drive up next to a gray terminal and hit [X] to reset the blocks to their original positions.
message Each terminal only works on one color, so you'll have to hit both to reset everything.
message It's inconvenient, I know, but the mark 2 terminals are still in the truck.
(min. # of resets: 2)
(If you beat any of these scores, let me know!)
1!####
..1.2G
→.1.2G
..1.2G
2@####
message That's the ticket.
message Hit [Z] to undo the last move, and hit [R] if you get extra stuck and want to reset everything from the beginning, including yourself.
(2)
1!#@2
#.↓.#
#1.2#
#.1.#
#2.1#
#.2.#
#1.2#
G...G
(2)
G.2.#..##
.222.1.##
#.2.111##
.1.#.1.##
111.2..##
.1.222.!1
..#.2.←@2
(3)
####G####
.2.121.2.
.2..2..2.
.2222222.
!...↑...@
1#######2
message Uh, and the extra flooring's all in the other truck. Sorry about that.
(2)
####1!#@2####
G----.↓.----G
G----.1.----G
G----121----G
G----.1.----G
(3)
#######1####
GA-....!....
G--...---...
G--...-2-...
G--.1←-1-...
G--...-2-...
G--...---...
G--....@....
#######2####
(4)
1----------
!.1.2-----G
#→1.2-----G
@.1.2-----G
2----------
(3)
GGGGGGGGGGGGGGGGGGG
GB----------------G
G-----------------G
G-----------------G
G-----------------G
G----1!-----@2----G
G----!.......@----G
G-----.-----.-----G
G-----.-121-.-----G
G-----.-2↑2-.-----G
G-----.-121-.-----G
G-----.-----.-----G
G----@.......!----G
G----2@-----!1----G
G-----------------G
G-----------------G
G-----------------G
G-----------------G
GGGGGGGGGGGGGGGGGGG
message Great. After my lunch break, we can work on unloading everything.
message END
message This game is dedicated to all the PuzzleScripters out there who've had to fix a layer overwrite bug in their game logic. :]
message Special shoutouts to PUZZLETALE by Connorses, which directly inspired this in two ways.
(
Outtake puzzle that I found really hard to cut. I like it because it *strictly* requires you to do something that none of the other puzzles do (although it does nicen up a couple of solutions). However, aesthetically it clashes really hard with the others, which are all geometric/symmetric.
The puzzles that I write tend to "look" like puzzles; typically I design them around an idea or maneuver I want the player to perform, and so they end up having noticeably asymmetric regions to the player can certain ways, or blocks/pits in inconvenient places obviously to complicate things, and so on.
As an experiment, my design philosophy for this game was to try to get away from that: I didn't want the puzzles to look like they were clearly designed with a solution in mind. I don't think I was entirely successful in that goal (particularly #6), but I'm generally satisfied that the feel of this game is a little different from the stuff I usually make.
This outtake puzzle is very much in my usual vein of puzzle design, so it doesn't fit with the rest.
Is anyone even reading this? :J
(2)
-----.....
G---..#-..
G---←21-1.
G---..@-..
G---!12-..
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment