centipede movement in zzt++ 0.8.48
Moderator: Terryn
- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
zzt 2.0 make a world called PHYSICS
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
uuhmm
commodore,
i probably worded it wrong, but i meant what you said.
another weird thing: if you place a head with a couple centipedes in a place with just one empty position -behind- the last segment, all segments turn into heads.
BUT
if you take the same space an keep an empty place in front of the head, the centipede will keep reversing.
AND
when you give the centipede no room to move at all, nothing happens. segments stay segments and don't become heads.
someone should visit E3 some time and nail tim for the source code. i'm sure he didn't lose it. he just pretended to in order to concentrate on new games.
i probably worded it wrong, but i meant what you said.
another weird thing: if you place a head with a couple centipedes in a place with just one empty position -behind- the last segment, all segments turn into heads.
BUT
if you take the same space an keep an empty place in front of the head, the centipede will keep reversing.
AND
when you give the centipede no room to move at all, nothing happens. segments stay segments and don't become heads.
someone should visit E3 some time and nail tim for the source code. i'm sure he didn't lose it. he just pretended to in order to concentrate on new games.
wep
On Centipedes
Heads are always on the move and never stop unless there is no room to move.
Heads normally only change direction when they are at a player axis
or when they hit an obstruction. Intelligence determines the odds of
whether it will move towards or away from the player.
Deviance will influence the number of times a head will change direction
for no reason at all.
A head with the lowest intelligence will mostly just go forward until
it hits a wall and then change direction.
A higer deviance will determine how often a head will change direction.
When a head with segments cannot move in any direction but towards
its segments, the last segments becomes the head and the head becomes
the last segment.
Segments that are not part of a list will become heads.
When a centipede's head is boxed in, but there is room behind the last segment,
all segments become heads.
When a centipede's head is surrounded by segments, all segments also become
heads.
When a centipede is boxed in and there is no room to go anywhere, it just sits
there without changing. Under water, the segments aren't linked to the head.
When you save a game a split second after starting it (with centipedes on the
board), you can catch zzt setting up the centipedes. This can be seen by
looking at the "next segment" and "previous segment" pointers. Right after
saving a new board, all these segment pointer have the value 0xFFFF. But, if
you save at exactly the right moment, you will see segments with "previous
segment" pointers with a value of 0xFFFE. After the centipede has taken a single
step, this is no longer visible. This proves that zzt sets up the centipedes
at the first move of the head.
When setting up centipedes, zzt uses clock wise and counter clock wise methods:
1. a head sitting half way and to the left of a column of segments,
will link the segments in the lower half of the column (clockwise)
2. a head sitting half way and to the right of a column of segments,
will link the segments in the upper half of the column (clockwise)
3. a head sitting half way and above of a row of segments,
will link the segments in the right half of the row (counter clockwise)
4. a head sitting half way and below a row of segments,
will link the segments in the left half of the row (counter clockwise)
Regardless of these directions, a segment adjacent to a linked centipede,
will sometimes be linked at the end of the centipede and sometimes go on
as a head.
Heads are always on the move and never stop unless there is no room to move.
Heads normally only change direction when they are at a player axis
or when they hit an obstruction. Intelligence determines the odds of
whether it will move towards or away from the player.
Deviance will influence the number of times a head will change direction
for no reason at all.
A head with the lowest intelligence will mostly just go forward until
it hits a wall and then change direction.
A higer deviance will determine how often a head will change direction.
When a head with segments cannot move in any direction but towards
its segments, the last segments becomes the head and the head becomes
the last segment.
Segments that are not part of a list will become heads.
When a centipede's head is boxed in, but there is room behind the last segment,
all segments become heads.
When a centipede's head is surrounded by segments, all segments also become
heads.
When a centipede is boxed in and there is no room to go anywhere, it just sits
there without changing. Under water, the segments aren't linked to the head.
When you save a game a split second after starting it (with centipedes on the
board), you can catch zzt setting up the centipedes. This can be seen by
looking at the "next segment" and "previous segment" pointers. Right after
saving a new board, all these segment pointer have the value 0xFFFF. But, if
you save at exactly the right moment, you will see segments with "previous
segment" pointers with a value of 0xFFFE. After the centipede has taken a single
step, this is no longer visible. This proves that zzt sets up the centipedes
at the first move of the head.
When setting up centipedes, zzt uses clock wise and counter clock wise methods:
1. a head sitting half way and to the left of a column of segments,
will link the segments in the lower half of the column (clockwise)
2. a head sitting half way and to the right of a column of segments,
will link the segments in the upper half of the column (clockwise)
3. a head sitting half way and above of a row of segments,
will link the segments in the right half of the row (counter clockwise)
4. a head sitting half way and below a row of segments,
will link the segments in the left half of the row (counter clockwise)
Regardless of these directions, a segment adjacent to a linked centipede,
will sometimes be linked at the end of the centipede and sometimes go on
as a head.
wep