The ZZT Exploits/Tricks Thread

NOTE: I HATE A LOT OF YOUR ZZT GAMES, SO WATCH OUT!

Moderators: Commodore, Zenith Nadir

User avatar
asiekierka
YAHOO: ALL YOUR GEOCITIES ARE BELONG TO US
Posts: 223
Joined: Sat Sep 10, 2005 10:06 am

The ZZT Exploits/Tricks Thread

Post by asiekierka »

Hi!

Here you can describe ZZT exploits or tricks!

The template:

Rating: (easy/medium/hard) to pull off
Name:
Info:
Description:
How-to:


You don't need to fill all of them, but at least describe how do you do the trick.

For example:

Rating: easy to pull off
Name: Transport in one step
Info: Transport player with one step, uses 2 player clones and 2 passages. I personally use objects and then replace them with player clones. You may use anything though.
How-to:
1) Find a 2x2 empty square on your board.
2) Put passages and placeholder objects like:

Code: Select all

X=
=X
where X are placeholders and = are passages.
You may want to surrond them with invisibles/blinking black-on-black normals though.
3) The code for placeholders:

Code: Select all

@portal
#end
:go
#become player
4) The code for executing the transporter:

Code: Select all

#send portal:go
Now go!
User avatar
Schroedingers Cat
We must invent teleportation!
Posts: 721
Joined: Mon Jun 19, 2006 11:35 pm
Location: Idaho, Wisconsin

Post by Schroedingers Cat »

Code: Select all

#put <dir>
puts a board edge in the specified direction.

that's all my tricks. I haven't used ZZT-OOP in quite awhile.
User avatar
Scribbit
is keeping the new avatar, thanks.
Posts: 543
Joined: Tue Sep 18, 2007 8:06 pm

Post by Scribbit »

Remote Player Clone Transporter
I used this in PortalZZT. You have a sending and recieving object, with a little work they can each fulfill both duties to make a two-way gate. When the sending object is touched, it sends a message to the recieving object to create a player clone. The sending object then waits in a loop until the player is no longer next to it, then tells the receiving object to shoot the player clone. Player clones can only be removed remotely by shooting or damaging them in some way.

Potential Problems: if player clone is not removed properly the player may not be able to exit the transporter. When stuck this way, you can exit by pausing, moving away, then shooting the clone yourself.
I'm nupanick.
User avatar
Scribbit
is keeping the new avatar, thanks.
Posts: 543
Joined: Tue Sep 18, 2007 8:06 pm

Post by Scribbit »

Wait for "P."
If you are starting on the title screen (like in a nanogame) you can use this to keep from bogging the player down in intro text before they start playing. Just have an object go into a loop while it checks [#if any player]. As long as the player hasn't pressed P to start yet (and there are no player clones on the title screen) this will wait until the player starts the game.
I'm nupanick.
User avatar
Dr. Dos
OH YES! USE VINE WHIP! &lt;3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

Post by Dr. Dos »

Or just #change monitor empty and then when your title screen into is over #put dir monitor
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
User avatar
Scribbit
is keeping the new avatar, thanks.
Posts: 543
Joined: Tue Sep 18, 2007 8:06 pm

Post by Scribbit »

What is the deal with the monitor, anyway? I can't figure out what it does.
I'm nupanick.
InfoSponge
Official Clamp School Defender
Posts: 169
Joined: Tue Sep 16, 2008 3:06 pm
Location: 1. n. a place of settlement, activity, or residence

Post by InfoSponge »

it empowers the title board with some mystical shit
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

I think wil used them to do some crazy shit. maybe it was it in that big collaboration game?

also I thought #put <dir> put a black hole
*POW* *CLANK* *PING*
User avatar
Dr. Dos
OH YES! USE VINE WHIP! &lt;3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

Post by Dr. Dos »

I think one is #put dir and the other is #put dir somethingthatdoesn'texist.

Monitors make the title screen keyboard input happen. If you put a monitor on a board with a player, pressing certain keys will warp to the title screen. This is used in Own of ZZT.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
User avatar
Scribbit
is keeping the new avatar, thanks.
Posts: 543
Joined: Tue Sep 18, 2007 8:06 pm

Post by Scribbit »

Oh, I remember [#put dir]. It doesn't make those black hole thingies, it makes a tile that acts like the board edge. If you or a player clone touches it, it moves you to an adjacent board.

I can't remember what does make those black hole thingies, come to think of it. The ones the player sort of hops over? Anyone remember those?
I'm nupanick.
User avatar
Ellypses
Whaf yew vauhnt?
Posts: 145
Joined: Tue Aug 24, 2004 2:14 pm
Location: In hell called earth
Contact:

Post by Ellypses »

I broke zzt again trying to give it simple commands, but still fail horribly in an attempt of innovation. ZZT just don't like me.

What I was trying to do is make a object wrap/teleportion trick. Simply, the object is set to walk in a direct more than the screen, it shouldn't move right? So this trick should work if you "walk" the object north/south 59 spaces, and when the object reaches the edge of the screen you can put in "#try cw/ccw flow" and the object wraps instantly to the otherside.

Zzt don't understand that s***. Instead, the object disappears into the unknown, or the object takes a bite out of the status bar. So when it shouldn't move, it did.

That was the test for wrapping 59 spaces across the screen.

So my guess is that the range needs to be shorter so instead I test it going vertical walking 24 spaces horizontally.

...success. Provided that I have a slab of solids that the object can walk into, then zzt won't have a heart attack and crash.

This method can be used for racing games like for pass-by drivers. That's one reason I tried discovering this trick to get it to work with the actively winding, and shrinking road I made way back when. So I bet you'll discover lots of possibility if you tried tinkering with this, like recycling object, or deviously zapping the player away and replacing it with a death animation object.

So I guess.

Rating: (medium) whether if zzt says "FU*crash*" or not
Name: object wrap/teleport
Info: Make an illusion of the object exiting and returning to the otherside of the screen, or advance managing of object resources by sending it in and out of the play field effectively.
How-to: Walk the length of the screen in the other direction, and use "try cw/ccw flow" to activate wrapping.
Last edited by Ellypses on Thu Nov 13, 2008 6:20 am, edited 1 time in total.
User avatar
Ellypses
Whaf yew vauhnt?
Posts: 145
Joined: Tue Aug 24, 2004 2:14 pm
Location: In hell called earth
Contact:

Post by Ellypses »

Oh, Nupanick. To answer your question, you make those black hole things by using zzt's editor. Fill a stat tile on the screen and then fill over it with empties. There's chances that one of those spaces filled is a stat empty.

I nearly forgot too.
User avatar
Quantum P.
Level 17 Accordion Thief
Posts: 1433
Joined: Fri Sep 12, 2003 1:41 am
Location: Edmonds, WA
Contact:

Post by Quantum P. »

I'm confused about what's going on in your object wrap/teleport trick. How many objects do you have? Can you post code/an example?
User avatar
Quantum P.
Level 17 Accordion Thief
Posts: 1433
Joined: Fri Sep 12, 2003 1:41 am
Location: Edmonds, WA
Contact:

Post by Quantum P. »

Also:

Label replacement
Rating: easy enough to do the replacement, but may make code slightly more complicated
If you're using a built-in label a lot (for example, if you have a lot of :touch labels and #zap touch commands), you can save some space by replacing it with a shorter label. Example:

Code: Select all

#end
:touch
#send t
#end
:t
1
#zap t
#end
:t
2
#zap t
#end
:t
3
#zap t
#end
:t
4
#zap t
#end
'etc...
I used #send t instead of #t because #t will cause an error if all the labels have been #zapped.

#end replacement
Rating: easy
If you're really intent on saving space, you can shave a few bytes off your program size by replacing certain commands with #[send]s and labels. For example, if you use a lot of #ends, you can replace every #end with #x and put :x at the end of your program:

Code: Select all

@counter
#x
:a
#char 48
#x
:b
#char 49
#x
:c
#char 50
#x
'snip snip...
:j
#char 57
:x
This saves you 2 bytes per #end (after the first #end, which costs 1 byte to replace). The savings isn't that much, so it probably isn't that useful unless you're really, really close to the board size limit, and you've got an abnormally large number of #ends in your program.
A similar thing can be done for #restart.

Stuff under objects
Rating: medium if you've never edited stats, easy otherwise
This is a trick that I've found really useful lately. You know how you can place objects on top of fakes, such that when the object moves, there's fake wall where it once was? Well, the file format allows pretty much any terrain to be underneath an object. In KevEdit, press Ctrl-T to edit the stats of a tile. Change the fields Under Type and Under Color, and now there's something different under the object! The effect is that you can have objects "sit on top of" walls.
User avatar
nps
so kawaii! so cute!
Posts: 810
Joined: Sun Jan 18, 2004 1:51 pm

Post by nps »

Make a board that has the "Re-enter when zapped" option on, then make an object move onto the player's starting location, then get zapped. Something kinda weird happens! Try it yourself!

Why does this happen? Unfortunately, we will never know.
Post Reply