Boulder Dash Forum Forum Index Boulder Dash Forum
The only Boulder Dash discussion board in English language!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cave scanning order effects or "Safely touch fireflies!
Goto page Previous  1, 2, 3, 4, 5
 
Post new topic   Reply to topic    Boulder Dash Forum Forum Index -> Tools, Fanstuff
View previous topic :: View next topic  
Author Message
Dustin
Member


Joined: 23 Sep 2007
Posts: 525
Location: Erlangen, Germany

PostPosted: Sat Oct 03, 2020 9:35 pm    Post subject: Reply with quote

Episode 26 - cave 21 analysis
As I've already prepared some pics anyway, I've decided to first analyze the
caves of the third video. After that, I'll try to approach the topic in a
systematic way, analyzing how exactly the BD engine works and how some of
its properties can be used for cavescanning order tricks!
So let's continue with video 3!
https://www.youtube.com/watch?v=wsodCJ2xUHM&t=62s
Cave 21 ("Pandora's Box") starts, of course, at 0:00. Here's the map:


What do we see?
A fire- and a butterfly are trapped inside small "bottles" and they can
obviously only be released together. Rockford is, of course, very much
interested in the butterfly's treasures, but there's a catch in form of a voodoo
that the firefly will directly head to when it's released. So what to do?
Rockford switches sides so he releases the flies from the left side, and he does
so exactly when the flies are ready to go out. Why is he taking that much of a
risk? And why is the firefly going back into the bottle while the butterfly comes
out?

How does it work?
1. Why doesn't Rockford just release the flies without thinking or any
specific timing?

This question should be easy to answer for the cavescanning-order-fan! Very Happy
The firefly is located above the butterfly, which means it is scanned first every
frame. So the firefly will usually come out first and directly kill the voodoo
before Rockford even has a chance to make diamonds! This means, as always,
that Rockford needs a trick! Very Happy

2. Why does the butterfly come out first in the video, in spite of what we
just discussed?

Here's the trick: Rockford waits until both flies are ready to come out...

...and only now digs the dirt to release the flies! Where's the difference? Let's check the cavescanning order:
1. The firefly is scanned before Rockford, so the dirt is still there and the
firefly can't come out! (Instead, it makes a right turn without moving.)
2. Now it's Rockford's turn, who digs the dirt.
3. The butterfly is scanned after Rockford, so the dirt is gone and the fly
is free to move out of its bottle!

Voilį - we tricked the cavescanning order so the butterfly came out first!

3. Why doesn't the firefly follow the butterfly out but moves back into its
bottle?

To answer this, let's analyze one more frame from the last picture:
1. The firefly is first again. It would still like to come out, but this time, it's
blocked by the butterfly! Enerved, it makes another 90 degree turn and now
faces into the bottle.
2. Rockford's turn. He has to escape the butterfly, of course.
3. The butterfly moves right.
I failed to prepare one more picture, but you can imagine that next frame, the
firefly would have space to come out, but it has already turned by 180
degrees and faces into the bottle again!
For a fly to make a 180-degree-turn, it must be blocked (from three sides)
for at least two frames
, and the firefly was first blocked by the dirt, then by
the butterfly, which was just enough to make it move back into the bottle! Very Happy

4. Finally, why did Rockford have to switch sides? Couldn't he have done
the exact same thing from his starting position?

I would like to leave this final question to you! It shouldn't be too hard to
answer if you remember our rules about how Rockford may or may not touch
flies... Wink

In the next cave, we'll finally see slime for the first time! The cavescanning
order rule we'll approach there might even be useful for the original
Boulderdash 2, cave E! See you then! Bye
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Dustin
Member


Joined: 23 Sep 2007
Posts: 525
Location: Erlangen, Germany

PostPosted: Sun Oct 11, 2020 7:39 pm    Post subject: Reply with quote

Episode 27 - Cave 22 analysis
https://www.youtube.com/watch?v=wsodCJ2xUHM&t=62s
Cave 22 ("Crosshair") starts at 0:23. Here's the map:


What do we see?
This one is really short, even for a mini cave! Very Happy Rockford is caught between two fireflies, but the main cavescanning order issue is the slime, whose permeability is 0 so that everything falls through it immediately. Still, Rockford is able to collect the diamond before it falls through the bottom piece of slime and gets lost. How is this possible?

How does it work?
First of all, let's clarify one slight difference between a boulder falling through a magic wall and a boulder falling through slime in terms of the way the BD engines are programmed:

Boulder falling through magic wall:
When a falling boulder is scanned and detects a piece of (active) magic wall below it, it falls through it and, at the same time, converts into a falling diamond.
Before:
B
M
S
After:
S
M
D
where B=falling boulder, S=Space, M=Magic Wall (active), D=falling diamond.
Note that the magic wall itself is a passive element, i.e. it does nothing when it's scanned - it's just skipped when the cave is scanned! (Other passive elements are space, dirt, wall, titanium wall, and voodoo.)

Boulder falling through slime:
When a piece of slime is scanned, then first of all the engine generates a random number to find out whether this piece of slime shall be active in this frame. If it is (and only then), the slime checks whether a (non-falling!) boulder or diamond lies on it and whether there's empty space under the slime. If both are true, then the slime swallows the boulder/diamond and, at the same time, spits it out again and, last but not least, makes a falling boulder out of it.
Before:
B
~
S
After:
S
~
B'
where B=Boulder, S=Space, B'=falling boulder and ~ slime.
Note that, other than the magic wall, the slime is an active element and does the swallowing itself. If a boulder is scanned and detects slime under it, nothing happens!

So let's keep these two things in mind:
Rule #1: The boulder-falls-through-slime-thing is done when the slime is scanned, not when the boulder is scanned.
Rule #2: Slime can only swallow a normal boulder, not a falling one.

So, back to the cave, more precisely to the moment where the diamond falls beside Rockford:

Frame 0:

Cavescanning order (interesting are the diamond, the middle and bottom piece of slime, and Rockford):
1. The diamond is scanned. It detects the slime below it, but according to rule #1, nothing happens.
2. Now the slime. According to rule #1 again, it swallows the diamond and converts it into a falling diamond.
3. Rockford's turn. The diamond is beside him, but it's in falling state, which means it cannot be collected!
4. The bottom piece of slime. According to rule #2, it can not swallow the diamond because it's still a falling one! (So, in fact, this clever rule prevents a diamond/boulder from being swallowed several times within one frame!)

Frame 1:

Oops, here I made a mistake - there's still a (falling) diamond to Rockford's left! Exclamation
Cavescanning order:
1. The middle piece of slime has become irrelevant now.
2. The falling diamond is next It notes that there's no empty space below it, so it cannot fall. (It cannot fall through the slime either, because of rule #1!) So it becomes a normal, non-falling diamond (which makes the typical diamond sound!).
3. Rockford's turn. As the diamond has just become non-falling, he can finally collect it! And that's just in time, because...
4. ...the bottom piece of slime was just about to swallow the diamond! Now, however, there's nothing left to be swallowed, so the slime makes a grumpy face and does nothing Very Happy

Frame 2:


So we have the diamond! But what about the fireflies...?!

Frame 3:

Looks threatening? Well, we've seen a lot of fireflies trying to catch our hero already in this threat, so I'll leave this little exercise to you: why can Rockford survive this? The cavescanning order is decisive again, of course! Very Happy

And there's something else you might want to figure out as an exercise: why couldn't Rockford move left at the beginning (instead of right) and do the same thing? Just ignore the fireflies for this! Between frames 0-2 above, there's a tiny difference with a big effect if Rockford stands at the left side of the diamond!

So here's a conclusion that also goes if the slime permeability is not 0:
If Rockford wants to collect a diamond that lies on slime and could be swallowed soon, his chances are slightly better if he approaches from the right side than from the left side!

In the next episode, we'll see how a growing wall wants to spoil Rockford's fun converting boulders into diamonds! Will it succeed or can our hero trick the wall? Of course, we know the answer, but let's see how it works in detail again! Seeya! Bye
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Dustin
Member


Joined: 23 Sep 2007
Posts: 525
Location: Erlangen, Germany

PostPosted: Fri Oct 16, 2020 7:44 pm    Post subject: Reply with quote

Episode 28 - cave 23 analysis
https://www.youtube.com/watch?v=wsodCJ2xUHM&t=62s
Cave 23 ("Marplot") starts at 0:32. Here's the map:


What do we see?
Rockford wants to push boulders through a magic wall, but there's a catch: An annoying growing wall wants to block the very space where the diamond should appear! So Rockford does some preparations and arranges everything in a way that all four boulders can convert before the growing wall can block the magic wall. How exactly is this done?

How does it work?
The decisive point is that Rockford must free the space under the magic wall exactly before the first boulder converts, so there's no time for the growing wall to interrupt the action. To achieve this, Rockford must first make the boulders fall and then qucikly move down to free the dirt below the magic wall. This already demands some trickery to gain enough time because normally, Rockford could not be under the magic wall in time before the boulders fall through! This explains why everything is prepared exactly in this way, and the help of the diamond is also strictly necessary to gain enough time!
Now let's focus on the cavescanning order business! Rockford snaps the dirt under the magic wall in this situation:
Frame 0

So one frame later, we have the following picture:
Frame 1:

Cavescanning order:
1. All four boulders are scanned before the growing wall, which means that the bottom one, falling through the magic wall, can convert into a diamond.
2. The magic wall is a passive element, so its scanning is irrelevant.
3. The growing wall is next, but it's blocked by the new diamond.
4. Next is Rockford, who must not yet snap the diamond, for reasone we will see soon!
Frame 2:

1. The boulders keep falling.
2. The growing wall cannot block the way because it's still blocked by the diamond (which is why Rockford couldn't snap it yet!)
3. Rockford's turn. The diamond is still needed to block the gwall, so Rockford just waits again!
Frame 3:
I just see that I haven't prepared more pics, but you can imagine that now the situation is analogous to frame 0, so now it's time to snap the diamond and make space for the next one!
So basically, that's the rhythm - wait two frames, snap, wait two frames, snap... this way and only this way, the growing wall can not block the way until the last diamond is collected!

In the next episode, we'll see the by far biggest cave so far, and it shows a real gauntlet where Rockford has to use the cavescanning order to escape fire-and butterflies in super-narrow tunnels!
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Dustin
Member


Joined: 23 Sep 2007
Posts: 525
Location: Erlangen, Germany

PostPosted: Fri Oct 23, 2020 6:09 pm    Post subject: Reply with quote

Episode 29 - cave 24 analysis
https://www.youtube.com/watch?v=wsodCJ2xUHM&t=62s
Cave 24 ("Multiple Choice") starts at 1:00.
No map this time, it's too big for a picture! Very Happy

What do we see?
There's a lot of dodging-fireflies-and-butterflies-in-very-narrow-space-stuff
going on again! Rockford gets the choice between two different tunnels, only
one of them can be passed in one piece. And even this becomes trickier and
trickier every time...

How does it work?
Well, it's obviously not possible for Rockford to completely avoid touching flies
here! But if you pause the video at any point, you can see Rockford touching
flies only from their top or left side, and we've already learned that this is OK
because Rockford is scanned before the fly. As we've analysed quite a few
similar situations before - see, for example, episode 10 - I will just give some
pics showing how each tunnel is done and leave it to you to make a detailed
analysis if you want to!
Just remember the rules which are important here:
1. Each frame, the cave is scanned row-by-row from top to bottom, each row
from left to right.
2. If a fire- or butterfly is scanned, it first makes an explosion check (i.e. it
explodes if it touches Rockford), and then it moves one step. After moving, it
does not make another explosion check!
3. If Rockford is scanned, he never makes explosion checks; he just does
what the player wishes.

Tunnel 1:

green=Rockford's path, white square=fly's spinning area

Tunnel 2:


Tunnel 3:


Tunnel 4:

The green dot means "stop for one frame". It's strictly necessary to do so, as
you will see when you make a frame-by-frame analysis!

Tunnel 5 - the final - is basically the same as tunnel 4, where instead of
stopping, Rockford usus the frame to snap the diamond!

Hope you have fun analysing - I had a lot of fun working everything out, and
also proving that the wrong tunnels are indeed impossible to pass!

In the next episode, we'll see a very simple cave - until the outbox location is
revealed... Laughing
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Dustin
Member


Joined: 23 Sep 2007
Posts: 525
Location: Erlangen, Germany

PostPosted: Sun Oct 25, 2020 11:14 pm    Post subject: Reply with quote

Episode 30 - cave 25 analysis
https://www.youtube.com/watch?v=wsodCJ2xUHM&t=62s
Cave 25 ("Reality Shock") starts at 1:38. Here's the map:


What do we see?
This cave looks quite simple at first sight... until the exit location is revealed!
To get access to it, Rockford first crushes the firefly, which looks like a
dangerous mission, and then the butterfly in a way that it destroys the wall
blocking the exit. How do both explosions work? And why can't Rockford crush
the butterfly first, which would be a lot easier?

How does it work?
There are three cavescanning order related questions one might ask, so let's
check them one by one:

Question 1: How is the firefly crushed?
This is done in two steps. First, Rockford traps the firefly in a loop:

Here, the firefly is scanned first and moves down. Then it's Rockford's turn
who moves up.

Now, Rockford is scanned first. He must not move left or down, because then
the firefly would make a positive explosion check afterwards. If Rockford
moves up, he would free the boulder too early because the firefly is not in a
good position to get crushed. So Rockford's only option is to wait! The firefly
makes a negative explosion check and moves right.

Now Rockford is scanned first again and he's free to escape by moving left.

In the second step, Rockford re-approaches the scene and frees the boulder
when the firefly is in a better position to get crushed. I just see I haven't
prepared any pics for this, but as we've seen a lot of Rockford-vs.-firefly-
scenarios anyway, you might want to make a frame-by-frame-analysis by
yourself again! Very Happy

Question 2: How is the butterfly crushed?
In order to free the exit, the butterfly must be crushed by a diamond while
the diamond is still at the top row of the cave! This only works because of a
kind of non-intuitive property of the BD engine (see below).

Rockford had to wait for the butterfly to touch him! Now, Rockford is luckily
scanned before the fly and moves left, while the butterfly does not move, as it
cannot make a left turn immediately. The diamond does not yet start moving,
because it was scanned before Rockford moved out of the way!

Now the diamond is scanned first. It detects enough empty space so it
decides that it can fall sideways from the bottom diamond. So it moves left
and changes its state into "falling"! That's the engine property I
mentioned before - the diamond becomes "falling" before it actually starts
"falling" (i.e. moving downwards)! After the diamond, the butterfly is scanned
and moves up, into the diamond's way. Rockford knows what will happen
next, so he moves away quickly!

Now, everything becomes clear - the "falling" diamond crushes the butterfly!

Question 3: Why can't the flies be crushed in reverse order?
It would be a lot easier to crush the butterfly to blast the wall, so why not do
this? Well, the problem is that the firefly cannot be used to free the exit. The
different moving patterns of fire- and butterfly mean that only the butterfly
can be used to free the exit, so the firefly must be crushed first!

In the next episode, we will see something entirely new: an open border
effect!
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Dustin
Member


Joined: 23 Sep 2007
Posts: 525
Location: Erlangen, Germany

PostPosted: Sun Nov 01, 2020 9:35 pm    Post subject: Reply with quote

Episode 31 - cave 26 analysis
https://www.youtube.com/watch?v=wsodCJ2xUHM&t=62s
Cave 26 ("Odd Timer") starts at 2:05.
Once again, this cave is too big for a map!

What do we see?
Rockford has to pass several "gates" which are guarded by two fireflies each.
When Rockford passes a gate, he shortly touches two fireflies! We know by
now that it's no surprise that Rockford survives the right firefly, but how can
he survive touching the left firefly? And why does Rockford always wait for a
short time before passing a gate?

How does it work?

Question 1: how does Rockford survive when he passes a gate?
Here's the trick: the cave uses open borders! The engine at Krissz's site uses
a very interesting way to visualize open borders: the map is shown as an
"infinite world" where the left and right ends of the cave are connected if
horizontal open borders are used. The map actually looks as follows (small
version with one gate only):

If you imagine that the left and right end of this map are connected, then it
looks just like in the video! But what's the point about using open borders?
The cavescanning order makes a difference!
When Rockford passes a gate, touching two fireflies...

...it looks as if one fly would be left and one right. But actually, as
you see in the picture, both flies are to the right of Rockford!
This means, according to the cavescanning order rule, that Rockford is
scanned before each of the flies, so he can escape before the flies explode!

We see why open borders are discontinuity lines - it's because the
cavescanning order reverses when two BD elements interact via the open
border. On the one hand, this can be quite a big problem when you want to
make a normal open border cave without any strange surprises (see Arno's
thread about a perfect open border implementation!), on the other hand, you
can also use the open borders for stunning new effects like in this cave! Very Happy

Question 2: why does Rockford wait for a short time before passing a gate?
The answer becomes clear if we see what happens directly after Rockford
passes a gate. Depending on the facing direction, it's possible that a firefly
follows Rockford closely. If the right firefly does so...

...that's not a problem because the fly will move down next and not follow
Rockford. But if the "left" firefly follows Rockford (unfortunately I forgot to
prepare a picture), it will follow him and, as soon as Rockford turns right at
the next corner, it will be scanned first and crush our hero!
So Rockford has to make sure that the latter scenario never happens when he
passes a gate, so he has to wait until the fireflies's facing directions fit.
But the flies' directions can't be seen, so how does Rockford know? Well, the
cave was designed in a way that Rockford can safely move through a gate
whenever the timer hits an odd number. But this is not always the case in the
video, so the player (Arno) used another, extern timer to be as quick as
possible! Very Happy

The secret of cave 12
Now that we've learned about the very interesting open border speciality w.r.t.
the cavescanning order, it's time for a little addendum on cave 12:
https://www.youtube.com/watch?v=7-3oOxrxLD8
(starting at 0:11)
The point of this cave is that, if Rockford would have moved left further (after
passing the circle of rocks), he would cross the open border line, and for one
frame, the firefly would be scanned first and suddenly kill Rockford!
Unfortunately, it's impossible to show this in a video as Krissz's site only
allows to record successful runs!

The next episode is all about growing walls, one is useful, one hindering.
Which one will grow first? It depends on... of course, the cave scanning order! Very Happy
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Dustin
Member


Joined: 23 Sep 2007
Posts: 525
Location: Erlangen, Germany

PostPosted: Mon Nov 16, 2020 12:11 am    Post subject: Reply with quote

Episode 32 - cave 27 analysis
https://www.youtube.com/watch?v=wsodCJ2xUHM&t=62s
Cave 27 ("Traffic Warden") start at 2:53. Here's the map:


What do we see?
Rockford wants to throw a boulder through a magic wall, but (of course)
there's a catch: the converted diamond will immediately fall through another
magic wall and vanish. To avoid this happening, Rockford needs the
horizontally growing wall at the left to block the lower magic wall.However,
there are also lots of vertically growing walls which might block the horizontal
gwall off. To lead the horizontal gwall to the right, Rockford alternately snaps
down and moves right. Why does this work this way and only this way?

How does it work?
Let's first check the obvious try:

What happens if Rockford just moves right here?
The horizontal gwall is scanned before Rockford, so it cannot grow yet in
this frame. However, the vertical gwall is scanned after our hero, so it
can immediately fill the gap that Rocky left behind. So the next map looks as
follows:

The horizontal gwall got blocked off, so there's nothing left to cover the lower
magic wall! That's why the simple approach doesn't work - trickery is needed!


Here's the trick: Rockford snaps down in this scenario! Where's the
difference? Well, now Rockford is in a position where the horizontal gwall is
also scanned after him. This means that the horizontal gwall can now fill
the gap that Rockford has snapped free! The vertical gwall is scanned after
the horizontal one, so the horizontal wall will already be in its way. So this
time, the next map looks as follows:

Voilį - we got what we wanted, the horizontal wall has grown right! All that is
left to do is repeat the same thing four more times so the horizontal gwall can
finally cover the lower magic wall!

This can be kind of generalized - there are four scenarios where a horizontal
and a vertical gwall compete for the same space to grow into.

Scenario 1
DDDDD
DDVDD
DH*DD
DDDDD
DDDDD
D=Dirt, H/V=horizontal/vertical gwall, *=space where the walls compete
Let's assume that * is also dirt. Rockford has three way to clear this dirt:
1. Move into * and then move away.
2. Place himself one step right of * and then snap left.
3. Place himself below * and snap up.
The result is always the same - the vertical wall will grow and block the other
gwall off. This is because in all three cases, Rockford is placed behind both
walls (speaking of the cavescanning order), so none of the walls can
immediately fill the gap. Then in the next frame, the vertical wall is scanned
first and grows.
Result: the vertical wall always grows first.

Scenario 2
DDDDD
DDVDD
DD*HD
DDDDD
DDDDD
Here, Rockford does have an influence: if he moves into *, he's scanned after
the Vwall but before the Hwall, so the Hwall can immediately fill Rockford's
gap. If, however, Rockford moves below * and then snaps up, he's scanned
after both walls, so none can immediately grow. One frame later, the Vwall is
scanned first and grows.
Result: If Rockford moves into * and then away, the Hwall grows. If
Rockford moves below * and snaps up, the Vwall grows!


Scenario 3
DDDDD
DDDDD
DH*DD
DDVDD
DDDDD
That's actually the scenario we've already discussed above.
Result: if Rockford moves into * and then away, the Vwall grows. If he
moves above * and snaps down, the Hwall grows!


Scenario 4
DDDDD
DDDDD
DD*HD
DDVDD
DDDDD
Here, no matter if Rockford moves into *, left of * or above *, he's always
scanned before both walls, so the Hwall will immediately fill the gap. There's
no way to make the Vwall grow first.
Result: Rockford has no influence; the Hwall always grows first.

Arno has made a very nice cave showing scenarios 2 and 3 (where Rockford
does have an influence) several times:
https://www.youtube.com/watch?v=tdNqUSC7iDk

And a final note: some BD clones support diagonal movements. If Rockford
can move and snap diagonally, then he also has an influence in scenarios 1
and 4! I leave it to the interested reader to figure out how! Very Happy

In the next episode, we'll see another amoeba - and an evil construction that
kills Rockford exactly four frames after the amoeba converts into diamonds!
The cavescanning order decides whether Rocky can grab three diamonds and
exit in these four frames before he explodes...
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Dustin
Member


Joined: 23 Sep 2007
Posts: 525
Location: Erlangen, Germany

PostPosted: Sun Nov 29, 2020 12:02 pm    Post subject: Reply with quote

Episode 33 - cave 28&29 analysis
As cave 28 shows a trick we already saw earlier, I decided to put it together
with cave 29 into one episode.

Cave 28
https://www.youtube.com/watch?v=wsodCJ2xUHM&t=180s
Cave 28 ("Countdown") starts at 3:06.
In this cave, we see a battle between Rockford and a bidirectional gwall. At
the beginning, Rockford is in a position where he's scanned after the gwall, so
when he starts moving, the gwall will follow him only with a 1-space gap in-
between. At the end of the cave, we see that it's essential to keep this
1-space gap because otherwise, the gwall would block the boulder off and
thereby trap Rockford if the gwall would follow Rockford without a gap.
That's why Rockford has to run through the cave without pausing in order to
keep the 1-space gap! If Rockford would stop for only a moment and allow
the gwall to catch up, he would never get another chance to win the 1-space
gap again. This is because Rockford is always at the gwall's top or left side,
which means that Rockford is scanned first and the gwall will follow him
immediately if he starts moving again.

Cave 29
Cave 29 ("Time Fuse") starts at 3:24. Here's the map:


What do we see?
At first sight, this cave may seem totally unspectacular: An amoeba gets
trapped (Rockford doesn't even have to do anything for it), Rockford collects
some diamonds and exits. But what's that? The amoeba conversion has
activated an evil construction at the top-left, and this construction killed a
voodoo in the same frame when Rockford exited!This means that Rockford
would have exploded only one frame later... that's why he had no time to
collect any bonus diamonds. Also, that's why he had to snap the first diamond
and couldn't simply collect all three diamonds from left to right in a row! This
deserves a deeper explanation, and here's where the cavescanning order
comes into play!

How does it work?
First of all, let's check what the evil construction at the top-left does exactly:

As long as the amoeba does not convert, this construction is stable and the
voodoo safe. But as soon as the amoeba gets trapped (let's define this frame
as frame 0), the construction becomes unstable!
Cavescanning order:
1. The amoeba is scanned and converts into a diamond.
2. The slime is scanned next, detects the diamond above it and swallows it
immediately. (The slime permeability is zero!) So frame 1 looks as follows:

Cavescanning order:
1. The fireflies are both scanned before the boulder, so they cannot move yet.
2. The boulder falls.
Frame 2:

Now both fireflies are free and both have a 50% chance to move next to the
voodoo. The initial directions of both flies are such that one of them will
certainly move immediately, in this case it's the top fly:
Frame 3:

The rest is clear: The fly explodes and one frame later, Rockford does so as
well.
Conclusion: After the amoeba converts into diamonds, Rockford has four
more frames to stay alive, in the fifth frame he'll inevitably explode!


In these four frames, Rockford has to collect three diamonds and exit, which
gives him no frame to waste!
Now let's see what happens if Rockford places himself one unit more left than
in the video, intending to collect three diamonds from left to right in a row:

The amoeba is trapped and converts now. This works as follows: Whenever an
amoeba is scanned next frame, the engine converts it into a diamond. So at
the end of the next frame, each amoeba piece has become a diamond.
Cavescanning order:
1. All the amoebas are scanned and convert before Rockford, except for
the three amoebas to Rockford's right.

2. So when Rockford is scanned, he detects diamonds on top and left to him,
but unfortunately, he still detects an amoeba to his right, so he cannot move
into that direction immediately.
Meanwhile, the time fuse starts its action...

The next frames speak for themselves:

Next:

Next:

The next frame becomes very painful for our hero, who just wanted to exit
but isn't allowed... *BOOM*

So Rockford was just one frame too slow! What went wrong? Well, the
problem was that he wasted the very first frame after the conversion. He
could have taken a diamond above or left to him but not right to him! So the
conclusion is clear: The first diamond that Rockford collects must be above
or left to him!


Now, finally, Rockford's strange-looking strategy in the video becomes
understandable: he places himself one step more right...

...snaps the first diamond above him...

...and now the story will finally have a happy end! Very Happy

In the next episode, we'll see something new - a competition between two
explosions! Which one overwrites the other? As usual, the cavescanning order
decides!
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
LogicDeLuxe
Member


Joined: 15 Jul 2007
Posts: 628

PostPosted: Sun Nov 29, 2020 1:37 pm    Post subject: Reply with quote

Dustin wrote:
Cave 29
Cave 29 ("Time Fuse") starts at 3:24.

This is indeed an example where the implementation matters. It works that way in Gdash, but not in PLCK, Rockford would explode in the same frame the voodoo is detected and exploded by the firefly.
Back to top
View user's profile Send private message Visit poster's website
Dustin
Member


Joined: 23 Sep 2007
Posts: 525
Location: Erlangen, Germany

PostPosted: Sun Nov 29, 2020 5:07 pm    Post subject: Reply with quote

Indeed Very Happy I thought about this while I wrote the episode, and I wondered whether I should mention that.

For everyone:
There's a minor difference between different BD engines about when the "kill Rockford" checkmark is activated if a firefly kills a voodoo:
Version 1:In the engine on Krissz's site (where the cave was made), the checkmark is activated at the end of the frame where the voodoo was killed.
Version 2: However, as I learned from Logic in the CSO university thread, the original BD2 engine and also the PLCK engines activate the checkmark immediately when the voodoo is killed.
What difference does this tiny difference make in this cave?
As the voodoo - more precisely, the firefly killing the voodoo - is scanned before Rockford, Rockford would be doomed if the "kill Rockford" checkmark was activated immediately. However, as the "kill Rockford" checkmark is activated only at the end of the frame, Rockford still gets the chance to exit in the same frame where the voodoo exploded!
This means that the same cave wouldn't work with PLCK engines. To make it work there, one of two possible changes could be made:
(1) One could reduce the diamond requirement to 2 or
(2) The voodoo construction could be moved somewhere below the main cave (which means that Rockford would be scanned before the voodoo is killed).

As a cavescanning order maniac, "of course" I like version 2 much better, because this version adds another cavescanning order effect to the list, which we will for sure discuss in the CSO university thread once the time has come! Very Happy
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
LogicDeLuxe
Member


Joined: 15 Jul 2007
Posts: 628

PostPosted: Sun Nov 29, 2020 5:54 pm    Post subject: Reply with quote

Dustin wrote:
Version 2: However, as I learned from Logic in the CSO university thread, the original BD2 engine and also the PLCK engines activate the checkmark immediately when the voodoo is killed.
BD2 has no voodoo. That was an addition to PLCK.
Back to top
View user's profile Send private message Visit poster's website
Dustin
Member


Joined: 23 Sep 2007
Posts: 525
Location: Erlangen, Germany

PostPosted: Fri Dec 04, 2020 10:33 pm    Post subject: Reply with quote

LogicDeLuxe wrote:
BD2 has no voodoo. That was an addition to PLCK.

Oops! Then I mixed it up. I had the info from question 8 of Arno's quiz, but
actually the question goes "Which two elements can be used in the
Construction Kit but do not appear in BDII?" (answer: Hidden Exit and
Voodoos)In my head, the question went "... in the BDII engine......" Very Happy
Thx again for the correction!

Episode 34 - cave 30 analysis
https://www.youtube.com/watch?v=wsodCJ2xUHM&t=180s
Cave 30 ("Mirror") starts at 3:52.
Unfortunately, the map is too big for a picture.But this cave is actually one of
my favourites! Very Happy Arno has uploaded two different solutions of this cave - I'll
explain the first one, which is the intended one!

What do we see?
A butterfly and a firefly are trapped in small cages and both have to be
crushed - the butterfly for trivial reasons and the firefly to get access to all
diamonds. The boulders killing the flies must fall through magic walls first,
and the magic wall timer is so short that both boulders must fall
simultaneousely.
That's what Rockford arranges later on, but for some reason, he switches the
flies first! Why is this necessary? Of course, it's because of the cavescanning
order!

How does it work?
The main question w.t.r. the cavescanning order is:
Why does Rockford have to switch the flies before crushing them?
To understand this, let's first see what happens if Rockford crushes the flies
immediately. Here's the map directly before the boulders crush the flies:

The cavescanning order now says that the butterfly is crushed first and the
firefly second. And here's the point: As the explosions overlap, the second
explosion overwrites parts of the first explosion!
This means that three
diamonds from the butterfly are overwritten by normal explosion smoke from
the firefly. The next frame looks as follows:

(actually, of course, the diamonds aren't "finished" immediately, but this
doesn't matter here.)
Summary: Rockford loses three diamonds here!

Now let's compare this with the actual solution, including the fly-switch:

Now the butterfly's diamonds overwrite the firefly's smoke:

Et voilą - all nine diamonds there and the cave can be solved! Very Happy

So these were the first 30 caves! I remember very well how I thought I was
out of ideas after publishing the 30th cave. But then I discovered more and
more ideas and, what can I say... a few days ago I uploaded the 100th cave! Very Happy
So this thread continues! However, I won't analyse one cave per episode from
now on, just because some of the effects repeat themselves and also because
the interested reader will by now have a good basic understanding of how
cavescanning order effects work and how they can be implemented in caves!
That's why I still want to mention each cave here, but I'll only discuss in detail
the caves which show something really new.
I hope you still enjoy reading the episodes as much as I enjoy writing them!
See you soon! Bye
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Dustin
Member


Joined: 23 Sep 2007
Posts: 525
Location: Erlangen, Germany

PostPosted: Wed Sep 08, 2021 5:34 pm    Post subject: Reply with quote

Hi all, I'm definitely intending to continue this thread, as well as the other CSO thread! Just at the moment, I lack motivation. Meanwhile, I made over 180 CSO caves, and Arno has uploaded all up to 170 on his YouTube channel (thanks!!)

At the moment, my BD time is invested in Dustin's BD 19+20 (19 being another remix game!), a BD1-3 expert remix game and creating and playing on Krissz's site! Moreover, I've got a >80 caves game with GDash-specific elements in reserve, which ALMOST got lost when my old laptop crushed. It's still a bit complicated to get it back...

Just wanted to give a lifesign here Very Happy
Cheers!
_________________
Boulder Dash X Rock, Paper, Scissors:
ROCKFORD collects DIAMOND, digs DIRT
DIAMOND outvalues DIRT & BOULDER
DIRT carries BOULDER, blocks FIREFLY
BOULDER kills FIREFLY & ROCKFORD
FIREFLY kills ROCKFORD, guards DIAMOND
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Boulder Dash Forum Forum Index -> Tools, Fanstuff All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group