The black holes that make the player jump...

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

Moderators: Commodore, Zenith Nadir

110
What can be said now?
Posts: 0
Joined: Sat Aug 30, 2003 1:16 am

The black holes that make the player jump...

Post by 110 »

are all over my boards. I don't really notice them, but in my latest game attempt, i have an object using if not contact #go seek and when he walks over them, he changes his char. This is good since it's a trippy board, but it's annoying other times. WHAT HAVE I DONE WRONG TO MERIT THIS PUNISHMENT?!
User avatar
Zephyr
aaaa my capilaries
Posts: 129
Joined: Sat Jul 26, 2003 11:12 pm

Post by Zephyr »

That's just what the terrain does. if you don't like it, don't use them.
User avatar
My Liver Hurtz
All Hail
Posts: 15
Joined: Sun May 11, 2003 1:31 pm
Location: Ottawa, Canada
Contact:

Post by My Liver Hurtz »

Zephyr is right. Black holes are not natural to ZZT, they are artificial. Contextually speaking of course. There is no way to control what side effects result from using black holes.
I did!--I did!--You're quicker than your friend... Now for a handful of guilders I happen to have a private and uncut performance of The Rape of the Sabine Women-or rather woman, or rather Alfred--. Get your skirt on, Alfred--
110
What can be said now?
Posts: 0
Joined: Sat Aug 30, 2003 1:16 am

Post by 110 »

>_>

I didn't add them! They flocked to me! So odd...
536
What can be said now?
Posts: 0
Joined: Wed Dec 24, 2003 6:30 pm

Post by 536 »

Most likely, you did a flood fill over a group of something with stats. Black holes (or, empties with stats) DO have predictable effects, along with everything else in ZZT, and they can be quite fun to mess with.

Basically, here's what's happening with your object: the object steps over a black hole, so now there are two groups of stat information pointing to the same coordinates. Because of the order in which that information is stored on the board, the object "accidentally" uses the black hole's stats instead of the original object stats. However, the original set of stats is still the one with the code, so when the object steps away, the char should return to normal.

Using an external editor, you can view what the parameters of the black holes are. You can produce some cool effects by taking advantage of the stat switching. One example of this is creating a black hole with altered X/Y Steps and having a bullet go over it. The bullet will change directions, based on those Step values, and the bullet's original stats will be left behind on the black hole.
536
What can be said now?
Posts: 0
Joined: Wed Dec 24, 2003 6:30 pm

Post by 536 »

Here's the scoop on why the player skips over black holes:

Let's say you press left and move your player onto a black hole. As anyone who has dealt with this technical side of ZZT undoubtedly knows, the "ACE" player is the first group of stats on the board, so the black hole's stats are always after the player's. ZZT runs through the groups of stats until it finally reaches the stats for the black hole that the player just stepped onto. Those stats' coordinates now point toward a player instead of an empty/black hole, so ZZT thinks that the stats belong to the player. For the same reason that a single direction press triggers responses from all player clones on the board, the black hole's stats think that left was just pressed. So it does to the player what it normally does when the direction was just pressed: it moves it left. That's two movements in a single cycle.

If there are multiple black holes in a row, two things could happen:

1) If the next black hole's stats are past the current one's, it will be a continued chain reaction and the player will move an additional space in the same cycle.

2) If the next black hole's stats are before the current one's, those stats have already been passed on that cycle and therefore don't do anything further in that cycle. Therefore, the player stays put and you have to press the direction again in another cycle in order to move past it.

That about wraps that up.
136
What can be said now?
Posts: 0
Joined: Thu Apr 03, 2003 2:10 am

Post by 136 »

If 2 things with stats in the same place, thay will start useing ech uthers stats (becuse uve the cycle) and mes up. The stats secsen is seprit from the bord secsen, so the X and Y number in both places can be set same. So the loop uv things hapening will go thrue the stats list in order, increse the curent cycles numbers, if it matches it go back to normal and do wat that pece dus (bi checking on the bord in that X,Y place). If is object, it will do program and will show char uv object. If is monster, make it move. If it is player to wat keys you press and move ACE player that direction uv that X and Y place. If it is pasige, do nuthing, the only resin pasige with stats is so that it can store wat bord to go to bi the pasige.
519
What can be said now?
Posts: 0
Joined: Tue Dec 09, 2003 9:56 pm

Post by 519 »

Nanobot wrote:One example of this is creating a black hole with altered X/Y Steps and having a bullet go over it. The bullet will change directions, based on those Step values, and the bullet's original stats will be left behind on the black hole.
Can you elaborate on this more? Will the bullet go off in another direction?
83
What can be said now?
Posts: 0
Joined: Mon Apr 07, 2003 3:18 pm

Post by 83 »

Nanobot wrote:That's two movements in a single cycle.
Not exactly. Every time the player moves, a cycle passes. Now, the player moves 2 steps, which results in 2 cycles passed in once. Lit a torch (or touch an energizer) right before you touch a row of holes to see this!
536
What can be said now?
Posts: 0
Joined: Wed Dec 24, 2003 6:30 pm

Post by 536 »

zzo38: Yes.

theorangehamster: Basically, the bullet's X/Y Step values will switch with the black hole's X/Y Step values. If the bullet's is (0,1) (down) and the black hole's is (1,0) (right), then the bullet will head downward until it lands on top of the black hole, when it will suddenly start moving right and will continue right until something else messes with it.

Smallhacker: Actually, the torch is handled completely by the player. It's the player that responds to the T key, removes the darkness "overlay" around it, and reduces the torch cycles counter. Multiple players on the board will cause the torch to run out more quickly.

A cycle, in the way that I commonly use it, is one loop through all of the groups of stat information on the board. Basically, every time the first set of stat information does something by itself marks the beginning of the next cycle. A cycle is always the same length of time, which is the length of a #play note of length "s".

Now, when I said that the player moves the second time, I meant in the same way that a player moves by a player clone. The player element doesn't take the black hole's stats as you might think. Player movement is special and only alters the X/Y coordinates in the ACE's stats, so the player remains the ACE. In other words, the player element moves, the first set of stats (ACE stats) moves in the same direction, and the black hole's stats (the stats that are currently doing stuff) don't change.

The result is basically identical to the player simply moving twice in one cycle. However, there is a catch: any element whose stats reside between the ACE stats and the black hole's will act as though the player moved once, and the elements whose stats reside after the black hole's will act as though it moved more than once, because the player actually has moved more than once by the time ZZT ran through the later stats.
519
What can be said now?
Posts: 0
Joined: Tue Dec 09, 2003 9:56 pm

Post by 519 »

Hmm... interesting. This can make for neat bullet tricks.

What's the procedure for getting a black hole with a useable 'stat'?
536
What can be said now?
Posts: 0
Joined: Wed Dec 24, 2003 6:30 pm

Post by 536 »

Using an external editor that allows you to manually modify the X and Y steps is the easiest way. In the default editor, you could use pushers facing in the desired directions and flood fill them with empties to get the black holes. I haven't tested this, but I assume it would work.
110
What can be said now?
Posts: 0
Joined: Sat Aug 30, 2003 1:16 am

Post by 110 »

Ah. It must have been the flood fills. Thanks.
136
What can be said now?
Posts: 0
Joined: Thu Apr 03, 2003 2:10 am

Post by 136 »

Code: Select all

if(bord[stat[n].x,stat[n].y].kind==K_PLAYER) {
  if(keypress==KEY_DIR_N) {
    if(bord[stat[n].x,stat[n].y-1].kind==K_SPACE || bord[stat[n].x,stat[n].y-1].kind==K_FAKE ) {
      bord[stat[n].x,stat[n].y].kind=bord[stat[n].x,stat[n].y].under;
      bord[stat[n].x,stat[n].y-1].under=bord[stat[n].x,stat[n].y-1].kind;
      stat[0].x=stat[n].x;
      stat[0].y=stat[n].y-1;
      bord[stat[0].x,stat[0].y].kind=K_PLAYER;
    }
  }
}
Uve corse, this is not completed at all, how it rely is programed is use subrutines, variables, code in between that codes, and a lot more stuf, this is just example.

Code: Select all

0: Player -- check move direction.
1: Player (used to be space, but now same x,y as player 0) -- check move direction and move player agen
2: etc....
519
What can be said now?
Posts: 0
Joined: Tue Dec 09, 2003 9:56 pm

Post by 519 »

Flood filling pushers works. Thanks.
Post Reply