Episode 24 - cave 20 analysis
https://www.youtube.com/watch?v=7-3oOxrxLD8
Cave 20 ("Amoeba Arrow") starts at 2:55. Here's the map:

Oops, I just note that the pic is somewhat overwirtten by the "CKit" lettering.
Plug for Krissz's site!
What do we see?
The main attraction is an amoeba again. It is trapped together with three flies
inside a big "arrow wall". Rockford blasts a hole into that arrow at a very
certain place, which is quite an effort. One of two diamonds is sacrificed, while
the other seems to get lost in the explosion as well, but actually Rockford
manages to snap it just in time before it gets destroyed! And
afterwards, we see another striking attraction: the butterfly traps the amoeba
without exploding! How is this possible? And why was it necessary to blast the
wall at exactly that spot? Questions over questions, which we will discuss and
answer one by one!
How does it work?
First of all, there are several ways to get 19 diamonds, which is why I
found it funny to add the "19<20" lettering, to remind the player that 19 are
just not enough!

So how can we get 20 diamonds? Well, obviously the butterfly should give us
9 diamonds, and there are two basic possibilities to get 11 more:
Possibility A: If we want to collect both visible diamonds, then the
amoeba has to blast the wall from inside. In this case, it would be enough to
get 9 more diamonds from the amoeba.
Possibility B: As A will soon turn out not to work - see below - it's clear
that one of the two diamonds has to be sacrificed to blast the wall from
outside. (Note that the boulder is a heavy one which cannot be pushed!) Now
we need ten diamonds from the amoeba, which means that it must grow at
least to the spot where it would diagonally contact the butterfly and the
bottom firefly.
Question 1: Why doesn't possibility A work?
If Rockford wants to go for this possibility, he must wait until the amoeba
suffocates and explodes into the flies:

Cave scanning order:
1. The butterfly is first and nothing happens.
2. The amoeba is next. Let's assume it grows now.
3. The right firefly is next, sees the amoeba and explodes. This means that
the butterfly will get lost in the explosion - a clear fail which already
rules out this possibility!
So Rockford's main plan is clear: 9 diamonds from the butterfly, collect one of
the two visible diamonds while sacrificing the other, and 10 diamonds must come from the amoeba!
Question 2: Why not just blast away the rightmost piece of wall, releasing
only the right firefly inside the wall?
Let's see what would happen if the right firefly wasn't there:

Cavescanning order:
1. The butterfly - nothing happens.
2. The amoeba grows.
3. The bottom firefly explodes because of the amoeba that has just grown.
So this time the butterfly survives and the amoeba is trapped by the explosion
smoke, immediately turning into diamonds. Looks way better than before,
doesn't it? But there's a catch:
The explosion also destroys one piece of
amoeba which we needed So the amoeba would give us only 9 diamonds,
which leads to 19 in total - not enough!
So we have another clear conclusion:
the amoeba must convert without
exploding any flies!
At first sight, we have reached a dead end. It's impossible to blast the
butterfly free from outside, and if we blast one or both fireflies free and then
snap the dirt below the butterfly, it will inevitably run directly into the amoeba.
However, the video shows the solution, which involves two more cavescanning
order tricks! First, Rockford blasts the wall in a way that both fireflies are
freed, and then the butterfly traps the amoeba without exploding!
Question 3: How can Rockford snap the diamond that was about to get lost
in an explosion?
Frame 0

Let's analyse from here, two frames before the explosion happens.
Cavescanning order:
1. The top diamond is first and falls sideways from the bottom diamond.
2. The bottom diamond itself is next but doesn't do anything.
3. Rockford is next
and snaps the bottom diamond..
4. Finally, the firefly moves.
Frame 1:

We see that Rockford managed to snap the diamond just one frame before the
explosion!
Next, let's get to the heart of the cave! (Actually, what follows wasn't even
part of the original cave, but a player - I think it was Arno or Nesdori -
discovered the trick, which highly inspired me to make a second version
where this trick is necessary to solve the cave!)
Question 4: How can the butterfly trap the amoeba without exploding?
Frame 0

Rockford has just freed the butterly and moved away. Cavescanning order:
1. The butterfly is first.
First, it checks whether it should explode,
which is not the case. Only
then, it moves down. (
Now it
touches the amoeba, but after moving, it does not make an explosion-check
again, so it's safe for now!)
2. The amoeba is scanned and sees the butterfly blocking its way! However,
as we've already seen in a previous episode, an amoeba does never
actively kill a fly. If an amoeba is scanned and sees a fly touching it, it
simply regards the fly as an obstacle, preventing it from growing. So what
happens in this case? Yes!
Instead of harming the butterfly, the amoeba
regards it as an obstacle! So the engine notes that the ameba had no
possibility to grow in this frame, thus the engine changes the amoeba state
from "alive" into "trapped" and next frame, every piece of amoeba will be
changed into diamonds. However, that's not the end of the story - the amoeba
is still there for one frame and the fly could still explode! So let's analyse
further:
Frame 1

1. Now, the amoeba is scanned first and, one by one, changes into diamonds.
2. Next, it's the butterfly's turn. Does it explode? No!
The deadly amoeba
has just changed into harmless diamonds! So, instead of exploding, the
butterfly chills and moves on!
Note that this fly-traps-amoeba-without-exploding-trick only works if the fly
approaches the amoeba from the
top-right side! That's because...
1. ...in frame 0, it was important that the butterfly was scanned
before
the amoeba, so the butterfly moved down and blocked the amoeba. If the amoeba had been scanned first, it would still have a
possibility to grow, so there would be no reason to change the amoeba's state
into "trapped"!
2. In frame 1, the butterfly had to be scanned
afterthe amoeba.
Otherwise, the butterfly would have been scanned when the amoeba was still
an amoeba, and exploded!
This can also be generalized because several cavescanning order tricks work
similar: We have two BD elements A and B close to each other. In one frame,
we want element A to be scanned before B, but in the next frame, after A
or B has moved/fallen/grown, B shall be scanned before A.
It turns out that the only way this can work with the engine's cavescanning order is as follows:
Frame 0:
XA
BX
Frame 1:
BA
XX
(if B moves up) or
XX
BA
(if A moves down).
The most famous example of this is one that we've discussed already at the
very beginning of this thread, where A=firefly and B=Rockford, when B moves
up. This way, Rockford is able to pass and release a stationary firefly and
survive to tell the story! (BTW, who does Rockford tell stories? Well, according
to one of No1's games, Rockford has a son, so treasure-diving can not be
everything he did in the last 36 years...!!!

)
In our actual cave, we have A=Amoeba and B=Butterfly (funnily, the letters A and B fit perfectly here!), when B moves down.
This episode ends the second video! Before checking the third one, the next
episode will be a special one. Be surprised!
